diff options
author | Ian Romanick <[email protected]> | 2013-08-09 15:15:45 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2013-08-21 07:43:48 -0700 |
commit | b15b62c54c0e3c10aaf8573a62acfcdc93979b0d (patch) | |
tree | d87cea2237ac06f0c1145c9ba2a4712a2d4c966a /src | |
parent | 00fcdc81ff06449a359e0a2e7ae3d29d39f93d36 (diff) |
glsl: Pass type to is_valid_default_precision_type instead of name
This is used by the next patch.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Cc: "9.2" <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index c439391ab27..88d9fd60b56 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -4225,10 +4225,8 @@ ast_iteration_statement::hir(exec_list *instructions, * version. */ static bool -is_valid_default_precision_type(const struct _mesa_glsl_parse_state *state, - const char *type_name) +is_valid_default_precision_type(const struct glsl_type *const type) { - const struct glsl_type *type = state->symbols->get_type(type_name); if (type == NULL) return false; @@ -4280,7 +4278,10 @@ ast_type_specifier::hir(exec_list *instructions, "arrays"); return NULL; } - if (!is_valid_default_precision_type(state, this->type_name)) { + + const struct glsl_type *const type = + state->symbols->get_type(this->type_name); + if (!is_valid_default_precision_type(type)) { _mesa_glsl_error(&loc, state, "default precision statements apply only to " "float, int, and sampler types"); |