diff options
author | Ian Romanick <[email protected]> | 2011-09-20 16:45:43 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-08-20 16:06:32 -0700 |
commit | 5a193557d115e62bf70c599e4037d8e1e3f5a9fc (patch) | |
tree | 8986817b28dcd119c68449bc8e955337d8fd3c43 /src/mesa/main | |
parent | 02344107913f6322360fe4bb09133eda5d57e5b8 (diff) |
mesa/es: Remove redundant light pname and light validation
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/APIspec.xml | 58 | ||||
-rw-r--r-- | src/mesa/main/es1_conversion.c | 52 |
2 files changed, 2 insertions, 108 deletions
diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index d0aaaa387ee..a64b57af472 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -120,35 +120,6 @@ <param name="param" type="GLtype"/> </vector> </proto> - - <desc name="light"> - <range base="GL_LIGHT" from="0" to="7"/> - </desc> - - <desc name="pname"> - <value name="GL_AMBIENT"/> - <value name="GL_DIFFUSE"/> - <value name="GL_SPECULAR"/> - <value name="GL_POSITION"/> - - <desc name="params" vector_size="4"/> - </desc> - - <desc name="pname"> - <value name="GL_SPOT_DIRECTION"/> - - <desc name="params" vector_size="3"/> - </desc> - - <desc name="pname"> - <value name="GL_SPOT_EXPONENT"/> - <value name="GL_SPOT_CUTOFF"/> - <value name="GL_CONSTANT_ATTENUATION"/> - <value name="GL_LINEAR_ATTENUATION"/> - <value name="GL_QUADRATIC_ATTENUATION"/> - - <desc name="params" vector_size="1"/> - </desc> </template> <template name="LightModel"> @@ -1190,35 +1161,6 @@ <param name="pname" type="GLenum"/> <vector name="params" type="GLtype *" size="dynamic"/> </proto> - - <desc name="light"> - <range base="GL_LIGHT" from="0" to="7"/> - </desc> - - <desc name="pname"> - <value name="GL_AMBIENT"/> - <value name="GL_DIFFUSE"/> - <value name="GL_SPECULAR"/> - <value name="GL_POSITION"/> - - <desc name="params" vector_size="4"/> - </desc> - - <desc name="pname"> - <value name="GL_SPOT_DIRECTION"/> - - <desc name="params" vector_size="3"/> - </desc> - - <desc name="pname"> - <value name="GL_SPOT_EXPONENT"/> - <value name="GL_SPOT_CUTOFF"/> - <value name="GL_CONSTANT_ATTENUATION"/> - <value name="GL_LINEAR_ATTENUATION"/> - <value name="GL_QUADRATIC_ATTENUATION"/> - - <desc name="params" vector_size="1"/> - </desc> </template> <template name="GetMaterial" direction="get"> diff --git a/src/mesa/main/es1_conversion.c b/src/mesa/main/es1_conversion.c index ff5e45176e2..ebd1e889f8d 100644 --- a/src/mesa/main/es1_conversion.c +++ b/src/mesa/main/es1_conversion.c @@ -263,17 +263,7 @@ _es_GetLightxv(GLenum light, GLenum pname, GLfixed *params) unsigned int n_params = 4; GLfloat converted_params[4]; - switch(light) { - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - break; - default: + if (light < GL_LIGHT0 || light > GL_LIGHT7) { _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, "glGetLightxv(light=0x%x)", light); return; @@ -605,34 +595,6 @@ _es_LightModelxv(GLenum pname, const GLfixed *params) void GL_APIENTRY _es_Lightx(GLenum light, GLenum pname, GLfixed param) { - switch(light) { - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - break; - default: - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - "glLightx(light=0x%x)", light); - return; - } - switch(pname) { - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - break; - default: - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - "glLightx(pname=0x%x)", pname); - return; - } - _mesa_Lightf(light, pname, (GLfloat) (param / 65536.0f)); } @@ -643,17 +605,7 @@ _es_Lightxv(GLenum light, GLenum pname, const GLfixed *params) unsigned int n_params = 4; GLfloat converted_params[4]; - switch(light) { - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - break; - default: + if (light < GL_LIGHT0 || light > GL_LIGHT7) { _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, "glLightxv(light=0x%x)", light); return; |