summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/version.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-04-10 21:40:11 +1000
committerTimothy Arceri <[email protected]>2018-04-11 08:05:19 +1000
commita05faf80c380a03347604e79136627267ff9f893 (patch)
tree20c62eb188889f9f1b684925aea4aa061e41fbff /src/mesa/main/version.c
parent0babc8e5d665e54783c926b89183ab9a596aa04c (diff)
mesa: fix glsl version mismatch in compat profile
Drivers that only support compat 3.0 were reporting GLSL 1.40 support. This fixes issues with the menu of Dawn of War II. Fixes: a0c8b49284ef "mesa: enable OpenGL 3.1 with ARB_compatibility" Reviewed-by: Marek Olšák <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105807
Diffstat (limited to 'src/mesa/main/version.c')
-rw-r--r--src/mesa/main/version.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index 0a4e7630da6..84babd69e2f 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -620,8 +620,11 @@ _mesa_compute_version(struct gl_context *ctx)
/* Make sure that the GLSL version lines up with the GL version. In some
* cases it can be too high, e.g. if an extension is missing.
*/
- if (_mesa_is_desktop_gl(ctx) && ctx->Version >= 31) {
+ if (_mesa_is_desktop_gl(ctx)) {
switch (ctx->Version) {
+ case 30:
+ ctx->Const.GLSLVersion = 130;
+ break;
case 31:
ctx->Const.GLSLVersion = 140;
break;
@@ -629,7 +632,8 @@ _mesa_compute_version(struct gl_context *ctx)
ctx->Const.GLSLVersion = 150;
break;
default:
- ctx->Const.GLSLVersion = ctx->Version * 10;
+ if (ctx->Version >= 33)
+ ctx->Const.GLSLVersion = ctx->Version * 10;
break;
}
}