summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast_to_hir.cpp
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-08-02 06:45:30 -0700
committerIan Romanick <[email protected]>2012-12-06 12:13:21 -0800
commitdc9f9d8e66ac3ec934a82d25da7b76902f775802 (patch)
tree1b316c5a26a3d71636759c420bb3061c36d9ac75 /src/glsl/ast_to_hir.cpp
parentd9bfaa104ed4debeff6c7d69daf4d9cc85cadb8d (diff)
glsl: Compute version_string on the fly.
Fixes a bug where version_string would be left uninitialized if no GLSL "#version" directive was used. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Carl Worth <[email protected]>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r--src/glsl/ast_to_hir.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 75b551b2db4..adada30509e 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -449,7 +449,7 @@ modulus_result_type(const struct glsl_type *type_a,
if (state->language_version < 130) {
_mesa_glsl_error(loc, state,
"operator '%%' is reserved in %s",
- state->version_string);
+ state->get_version_string());
return glsl_type::error_type;
}
@@ -2618,13 +2618,13 @@ ast_declarator_list::hir(exec_list *instructions,
_mesa_glsl_error(& loc, state,
"`out' qualifier in declaration of `%s' "
"only valid for function parameters in %s.",
- decl->identifier, state->version_string);
+ decl->identifier, state->get_version_string());
}
if (this->type->qualifier.flags.q.in) {
_mesa_glsl_error(& loc, state,
"`in' qualifier in declaration of `%s' "
"only valid for function parameters in %s.",
- decl->identifier, state->version_string);
+ decl->identifier, state->get_version_string());
}
/* FINISHME: Test for other invalid qualifiers. */
}