summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-12-08 22:48:47 +0100
committerMarek Olšák <[email protected]>2012-12-12 13:09:54 +0100
commit0ac83a20010ae5fa1635866d1950f06aac15a46d (patch)
treee5fe61920b3cec79e76f314cfe053f91bffa810a /src/mesa/main
parent25409c6da8163d9acb386511aef0c11577c7aadb (diff)
mesa: disallow creation of GL 3.1 compatibility contexts
Death to driver-specific hacks! Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/version.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index eef8f437d62..4373d7b9180 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -345,6 +345,12 @@ _mesa_compute_version(struct gl_context *ctx)
switch (ctx->API) {
case API_OPENGL_COMPAT:
+ /* Disable GLSL 1.40 and later for legacy contexts.
+ * This disallows creation of the GL 3.1 compatibility context. */
+ if (ctx->Const.GLSLVersion > 130) {
+ ctx->Const.GLSLVersion = 130;
+ }
+ /* fall through */
case API_OPENGL_CORE:
compute_version(ctx);
break;