summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/es1_conversion.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-07-27 12:37:05 -0700
committerIan Romanick <[email protected]>2012-08-29 15:09:35 -0700
commit10e7db1ccf4d3b2023f04663f7a6c079eb6afc57 (patch)
treeab2f9703af2482ebfcdffc5945c8fadb11730147 /src/mesa/main/es1_conversion.c
parentb7c7e5e45a14ed78eda104ebca25072172730645 (diff)
mesa/es: Validate glFog pname 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.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/src/mesa/main/es1_conversion.c b/src/mesa/main/es1_conversion.c
index 75cdfc88711..c1d7b83306c 100644
--- a/src/mesa/main/es1_conversion.c
+++ b/src/mesa/main/es1_conversion.c
@@ -134,28 +134,7 @@ _es_DrawTexxvOES(const GLfixed *coords)
void GL_APIENTRY
_es_Fogx(GLenum pname, GLfixed param)
{
- bool convert_param_value = true;
-
- switch(pname) {
- case GL_FOG_MODE:
- if (param != GL_EXP && param != GL_EXP2 && param != GL_LINEAR) {
- _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM,
- "glFogx(pname=0x%x)", pname);
- return;
- }
- convert_param_value = false;
- break;
- case GL_FOG_DENSITY:
- case GL_FOG_START:
- case GL_FOG_END:
- break;
- default:
- _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM,
- "glFogx(pname=0x%x)", pname);
- return;
- }
-
- if (convert_param_value) {
+ if (pname != GL_FOG_MODE) {
_mesa_Fogf(pname, (GLfloat) (param / 65536.0f));
} else {
_mesa_Fogf(pname, (GLfloat) param);
@@ -173,11 +152,6 @@ _es_Fogxv(GLenum pname, const GLfixed *params)
switch(pname) {
case GL_FOG_MODE:
- if (params[0] != GL_EXP && params[0] != GL_EXP2 && params[0] != GL_LINEAR) {
- _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM,
- "glFogxv(pname=0x%x)", pname);
- return;
- }
convert_params_value = false;
n_params = 1;
break;