summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-04-01 14:36:09 -0600
committerBrian Paul <[email protected]>2015-04-08 17:03:16 -0600
commit09e7e2016b702e2c4b79a2c01e8abc1365b4c422 (patch)
treebfc7adbe17bc91cf4b4dc0f3a56942c2035a9c44 /src/glsl/glsl_parser_extras.h
parent4deca1274c25b80351dbec972b68ab6520a89b31 (diff)
glsl: check for forced_language_version in is_version()
This is a follow-on fix from the earlier "glsl: allow ForceGLSLVersion to override #version directives" change. Since we're not changing the language_version field, we have to check forced_language_version here. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.h')
-rw-r--r--src/glsl/glsl_parser_extras.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index 1f5478bdf7e..dae7864fdaf 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -105,8 +105,10 @@ struct _mesa_glsl_parse_state {
{
unsigned required_version = this->es_shader ?
required_glsl_es_version : required_glsl_version;
+ unsigned this_version = this->forced_language_version
+ ? this->forced_language_version : this->language_version;
return required_version != 0
- && this->language_version >= required_version;
+ && this_version >= required_version;
}
bool check_version(unsigned required_glsl_version,