mesa/es: Validate glCreateShader targets in Mesa code rather than the ES wrapper
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 25 Jul 2012 03:17:18 +0000 (20:17 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 24 Aug 2012 16:06:31 +0000 (09:06 -0700)
v2: Add proper core-profile filtering.

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

index 7efca4d1b3e4d124ad8226f3d481c3a76cca98ba..904a6d81c3b94bf1191e25d572b6bac7459a9602 100644 (file)
                <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">
index 0049e87e1d29bb313e9b19249ce9198acdc3836a..d6acade3dab7fa414343787af0fc000829dbda8d 100644 (file)
@@ -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;