diff options
Diffstat (limited to 'mesalib/src/mesa/main/es1_conversion.c')
-rw-r--r-- | mesalib/src/mesa/main/es1_conversion.c | 64 |
1 files changed, 3 insertions, 61 deletions
diff --git a/mesalib/src/mesa/main/es1_conversion.c b/mesalib/src/mesa/main/es1_conversion.c index ebd1e889f..75cdfc887 100644 --- a/mesalib/src/mesa/main/es1_conversion.c +++ b/mesalib/src/mesa/main/es1_conversion.c @@ -1237,56 +1237,11 @@ _check_TexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params) void GL_APIENTRY _es_TexParameterx(GLenum target, GLenum pname, GLfixed param) { - GLfloat converted_param; - bool convert_param_value = true; - - switch(target) { - case GL_TEXTURE_2D: - case GL_TEXTURE_CUBE_MAP: - case GL_TEXTURE_EXTERNAL_OES: - break; - default: - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - "glTexParameterx(target=0x%x)", target); - return; - } - switch(pname) { - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - if (param != GL_CLAMP_TO_EDGE && param != GL_REPEAT && param != GL_MIRRORED_REPEAT) { - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - "glTexParameterx(pname=0x%x)", pname); - return; - } - convert_param_value = false; - break; - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_MAG_FILTER: - convert_param_value = false; - break; - case GL_GENERATE_MIPMAP: - if (param != GL_TRUE && param != GL_FALSE) { - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - "glTexParameterx(pname=0x%x)", pname); - return; - } - convert_param_value = false; - break; - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - break; - default: - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - "glTexParameterx(pname=0x%x)", pname); - return; - } - - if (convert_param_value) { - converted_param = (GLfloat) (param / 65536.0f); + if (pname == GL_TEXTURE_MAX_ANISOTROPY_EXT) { + _mesa_TexParameterf(target, pname, (GLfloat) (param / 65536.0f)); } else { - converted_param = (GLfloat) param; + _mesa_TexParameterf(target, pname, (GLfloat) param); } - - _mesa_TexParameterf(target, pname, converted_param); } void GL_APIENTRY @@ -1310,25 +1265,12 @@ _es_TexParameterxv(GLenum target, GLenum pname, const GLfixed *params) switch(pname) { case GL_TEXTURE_WRAP_S: case GL_TEXTURE_WRAP_T: - if (params[0] != GL_CLAMP_TO_EDGE && params[0] != GL_REPEAT && params[0] != GL_MIRRORED_REPEAT) { - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - "glTexParameterxv(pname=0x%x)", pname); - return; - } convert_params_value = false; n_params = 1; break; case GL_TEXTURE_MIN_FILTER: case GL_TEXTURE_MAG_FILTER: - convert_params_value = false; - n_params = 1; - break; case GL_GENERATE_MIPMAP: - if (params[0] != GL_TRUE && params[0] != GL_FALSE) { - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - "glTexParameterxv(pname=0x%x)", pname); - return; - } convert_params_value = false; n_params = 1; break; |