diff options
author | Ian Romanick <[email protected]> | 2012-07-27 16:47:27 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-08-29 15:09:35 -0700 |
commit | d2b03f6e993f08b0a80a206d7bf6f0d42b308266 (patch) | |
tree | 922c3a509837a12b39290d7802e465b54b7c3348 /src/mesa/main/es1_conversion.c | |
parent | f329adfa497b6b2e0a125ab98a38c656a017270d (diff) |
mesa/es: Validate glGetTexGen parameters in Mesa code rather than the ES wrapper
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/es1_conversion.c')
-rw-r--r-- | src/mesa/main/es1_conversion.c | 54 |
1 files changed, 2 insertions, 52 deletions
diff --git a/src/mesa/main/es1_conversion.c b/src/mesa/main/es1_conversion.c index 6edc97bd468..851dc726bc2 100644 --- a/src/mesa/main/es1_conversion.c +++ b/src/mesa/main/es1_conversion.c @@ -398,63 +398,13 @@ _es_GetTexEnvxv(GLenum target, GLenum pname, GLfixed *params) void GL_APIENTRY _check_GetTexGenivOES(GLenum coord, GLenum pname, GLint *params) { - unsigned int i; - unsigned int n_params = 1; - GLfloat converted_params[1]; - - switch(coord) { - case GL_TEXTURE_GEN_STR_OES: - break; - default: - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - "glGetTexGenivOES(coord=0x%x)", coord); - return; - } - switch(pname) { - case GL_TEXTURE_GEN_MODE: - n_params = 1; - break; - default: - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - "glGetTexGenivOES(pname=0x%x)", pname); - return; - } - - _es_GetTexGenfv(coord, pname, converted_params); - for (i = 0; i < n_params; i++) { - params[i] = (GLfloat) converted_params[i]; - } + _mesa_GetTexGeniv(coord, pname, params); } void GL_APIENTRY _check_GetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params) { - unsigned int i; - unsigned int n_params = 1; - GLfloat converted_params[1]; - - switch(coord) { - case GL_TEXTURE_GEN_STR_OES: - break; - default: - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - "glGetTexGenxvOES(coord=0x%x)", coord); - return; - } - switch(pname) { - case GL_TEXTURE_GEN_MODE: - n_params = 1; - break; - default: - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - "glGetTexGenxvOES(pname=0x%x)", pname); - return; - } - - _es_GetTexGenfv(coord, pname, converted_params); - for (i = 0; i < n_params; i++) { - params[i] = (GLfloat) converted_params[i]; - } + _mesa_GetTexGeniv(coord, pname, (GLint *) params); } void GL_APIENTRY |