mesa: Don't allow GL_EXTENSIONS query in core context
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 17 Aug 2012 21:32:21 +0000 (14:32 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 29 Aug 2012 22:09:36 +0000 (15:09 -0700)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/getstring.c

index 748a943574672368939b23c9c8b422257d651dd3..9c9ade359556f37a47b04343d660c02b5b2d24f5 100644 (file)
@@ -126,6 +126,10 @@ _mesa_GetString( GLenum name )
       case GL_VERSION:
          return (const GLubyte *) ctx->VersionString;
       case GL_EXTENSIONS:
+         if (ctx->API == API_OPENGL_CORE) {
+            _mesa_error(ctx, GL_INVALID_ENUM, "glGetString(GL_EXTENSIONS)");
+            return (const GLubyte *) 0;
+         }
          return (const GLubyte *) ctx->Extensions.String;
 #if FEATURE_ARB_shading_language_100 || FEATURE_ES2
       case GL_SHADING_LANGUAGE_VERSION: