Mesa (master): mesa/es: Validate glCreateShader targets in Mesa code rather than the ES wrapper
Ian Romanick
idr at kemper.freedesktop.org
Fri Aug 24 16:08:25 UTC 2012
Module: Mesa
Branch: master
Commit: 86f29cf7d0817f1b6c9a9665c044ce36822b23b4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=86f29cf7d0817f1b6c9a9665c044ce36822b23b4
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Tue Jul 24 20:17:18 2012 -0700
mesa/es: Validate glCreateShader targets in Mesa code rather than the ES wrapper
v2: Add proper core-profile filtering.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/main/APIspec.xml | 5 -----
src/mesa/main/shaderapi.c | 2 +-
2 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml
index 7efca4d..904a6d8 100644
--- a/src/mesa/main/APIspec.xml
+++ b/src/mesa/main/APIspec.xml
@@ -2016,11 +2016,6 @@
<return type="GLuint"/>
<param name="type" type="GLenum"/>
</proto>
-
- <desc name="type">
- <value name="GL_VERTEX_SHADER"/>
- <value name="GL_FRAGMENT_SHADER"/>
- </desc>
</template>
<template name="ShaderSource">
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 0049e87..d6acade 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -177,7 +177,7 @@ validate_shader_target(const struct gl_context *ctx, GLenum type)
#endif
#if FEATURE_ARB_geometry_shader4
case GL_GEOMETRY_SHADER_ARB:
- return ctx->Extensions.ARB_geometry_shader4;
+ return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_geometry_shader4;
#endif
default:
return false;
More information about the mesa-commit
mailing list