Mesa (master): mesa: Remove unnecessary and incorrect TexEnv parameter validation.

Kenneth Graunke kwg at kemper.freedesktop.org
Tue Oct 25 23:25:06 UTC 2011


Module: Mesa
Branch: master
Commit: 7a86bf816c3eb977a5d7e558e85f00f8f2b9868a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7a86bf816c3eb977a5d7e558e85f00f8f2b9868a

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Oct 17 16:41:57 2011 -0700

mesa: Remove unnecessary and incorrect TexEnv parameter validation.

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 at whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/mesa/main/APIspec.xml |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml
index 574480e..a92bb43 100644
--- a/src/mesa/main/APIspec.xml
+++ b/src/mesa/main/APIspec.xml
@@ -631,12 +631,6 @@
 	<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">




More information about the mesa-commit mailing list