mesa: Remove unnecessary and incorrect TexEnv parameter validation.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 17 Oct 2011 23:41:57 +0000 (16:41 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 25 Oct 2011 23:25:39 +0000 (16:25 -0700)
For GL_RGB_SCALE and GL_ALPHA_SCALE targets, the API wrapper code
attempts to ensure the parameter is 1.0, 2.0, or 4.0.

This is unnecessary: set_combiner_scale in texenv.c (called by
_mesa_TexEnvfv) already checks this and raises an appropriate error.

It's also incorrect: For glTexEnvx, the API validation code directly
compares the GLfixed input parameter with a floating point constant,
prior to converting fixed-point to floating point.

Fixes an issue in the OpenGL ES 1.1 conformance suite.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/APIspec.xml

index 574480e284dc7ccbb2540fef1ed54df38cea8ca4..a92bb437c91e68435b13855aa412c735aa3aef0e 100644 (file)
        <desc name="pname">
                <value name="GL_RGB_SCALE"/>
                <value name="GL_ALPHA_SCALE"/>
-
-               <desc name="param" convert="true" error="GL_INVALID_VALUE">
-                       <value name="1.0"/>
-                       <value name="2.0"/>
-                       <value name="4.0"/>
-               </desc>
        </desc>
 
        <desc name="pname">