diff options
author | Timothy Arceri <[email protected]> | 2018-04-12 09:23:02 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-04-12 11:51:08 +1000 |
commit | c7e3d31b0b5f22299a6bd72655502ce8427b40bf (patch) | |
tree | 4ac008f93165c77c6ccb0d43b8b312dc38748dc2 /src/compiler | |
parent | f3b14ca2e1cb4655300272a44f63c9474c48689e (diff) |
glsl: fix compat shaders in GLSL 1.40
The compatibility and core tokens were not added until GLSL 1.50,
for GLSL 1.40 just assume all shaders built with a compat profile
are compat shaders.
Fixes rendering issues in Dawn of War II on radeonsi which has
enabled OpenGL 3.1 compat support.
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/compiler')
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index 0cc57f5a887..5dd362b3e38 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -429,6 +429,8 @@ _mesa_glsl_parse_state::process_version_directive(YYLTYPE *locp, int version, this->language_version = version; this->compat_shader = compat_token_present || + (this->ctx->API == API_OPENGL_COMPAT && + this->language_version == 140) || (!this->es_shader && this->language_version < 140); bool supported = false; |