[Mesa-dev] [PATCH 3/3] mesa/es: Validate glPointParameter pname in Mesa code rather than the ES wrapper
Ian Romanick
idr at freedesktop.org
Fri Aug 24 08:47:44 PDT 2012
From: Ian Romanick <ian.d.romanick at intel.com>
v2: Add proper core-profile filtering.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/main/APIspec.xml | 13 -------------
src/mesa/main/es1_conversion.c | 11 -----------
src/mesa/main/points.c | 2 +-
3 files changed, 1 insertions(+), 25 deletions(-)
diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml
index 947ece2..a65c5c5 100644
--- a/src/mesa/main/APIspec.xml
+++ b/src/mesa/main/APIspec.xml
@@ -929,19 +929,6 @@
<param name="param" type="GLtype"/>
</vector>
</proto>
-
- <desc name="pname">
- <value name="GL_POINT_SIZE_MIN"/>
- <value name="GL_POINT_SIZE_MAX"/>
- <value name="GL_POINT_FADE_THRESHOLD_SIZE"/>
-
- <desc name="params" vector_size="1"/>
- </desc>
-
- <desc name="pname">
- <value name="GL_POINT_DISTANCE_ATTENUATION"/>
- <desc name="params" vector_size="3"/>
- </desc>
</template>
<template name="VertexAttrib">
diff --git a/src/mesa/main/es1_conversion.c b/src/mesa/main/es1_conversion.c
index d793589..ae3c5ba 100644
--- a/src/mesa/main/es1_conversion.c
+++ b/src/mesa/main/es1_conversion.c
@@ -676,17 +676,6 @@ _es_Orthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top,
void GL_APIENTRY
_es_PointParameterx(GLenum pname, GLfixed param)
{
- switch(pname) {
- case GL_POINT_SIZE_MIN:
- case GL_POINT_SIZE_MAX:
- case GL_POINT_FADE_THRESHOLD_SIZE:
- break;
- default:
- _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM,
- "glPointParameterx(pname=0x%x)", pname);
- return;
- }
-
_mesa_PointParameterf(pname, (GLfloat) (param / 65536.0f));
}
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index eeb1b44..d66af2f 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -171,7 +171,7 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
* differ. In ARB_point_sprite the POINT_SPRITE_R_MODE is
* always ZERO. NV_point_sprite adds the S and R modes.
*/
- if (ctx->Extensions.NV_point_sprite) {
+ if (_mesa_is_desktop_gl(ctx) && ctx->Extensions.NV_point_sprite) {
GLenum value = (GLenum) params[0];
if (value != GL_ZERO && value != GL_S && value != GL_R) {
_mesa_error(ctx, GL_INVALID_VALUE,
--
1.7.6.5
More information about the mesa-dev
mailing list