mesa: Set ProfileMask properly for core profile.
authorMatt Turner <mattst88@gmail.com>
Mon, 8 Jul 2013 23:07:36 +0000 (16:07 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 9 Jul 2013 21:19:22 +0000 (14:19 -0700)
Fixes MESA_GL_VERSION_OVERRIDE=3.2 egl-create-context-verify-gl-flavor.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/context.c

index 5ad04cc9988e19b141cfac1311518ced89518b63..d687fb7c0f888edd0c53cdabbbe5c4678eda8c73 100644 (file)
@@ -636,8 +636,10 @@ _mesa_init_constants(struct gl_context *ctx)
    ctx->Const.MaxTransformFeedbackInterleavedComponents = 4 * MAX_FEEDBACK_ATTRIBS;
    ctx->Const.MaxVertexStreams = 1;
 
-   /* GL 3.2: hard-coded for now: */
-   ctx->Const.ProfileMask = GL_CONTEXT_COMPATIBILITY_PROFILE_BIT;
+   /* GL 3.2  */
+   ctx->Const.ProfileMask = ctx->API == API_OPENGL_CORE
+                          ? GL_CONTEXT_CORE_PROFILE_BIT
+                          : GL_CONTEXT_COMPATIBILITY_PROFILE_BIT;
 
    /** GL_EXT_gpu_shader4 */
    ctx->Const.MinProgramTexelOffset = -8;