diff options
author | Matt Turner <[email protected]> | 2015-12-07 14:11:01 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-12-08 15:36:57 -0800 |
commit | 79da7220db645ade2903af238603c32d551ed5c4 (patch) | |
tree | 1f153b3582e340d0185d5d6a8a2c119dfe6a66e9 /src/glsl/ast_to_hir.cpp | |
parent | c200e606f7348a6d75e4cf72fb538f5d78d67649 (diff) |
glsl: Use has_420pack().
These features would not have been enabled with #version 420 otherwise.
Cc: "11.1" <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 6d7e40fb2bb..35a1e134dfa 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -3738,7 +3738,7 @@ process_initializer(ir_variable *var, ast_declaration *decl, * expressions. Const-qualified global variables must still be * initialized with constant expressions. */ - if (!state->ARB_shading_language_420pack_enable + if (!state->has_420pack() || state->current_function == NULL) { _mesa_glsl_error(& initializer_loc, state, "initializer of %s variable `%s' must be a " @@ -5367,7 +5367,7 @@ ast_jump_statement::hir(exec_list *instructions, if (state->current_function->return_type != ret_type) { YYLTYPE loc = this->get_location(); - if (state->ARB_shading_language_420pack_enable) { + if (state->has_420pack()) { if (!apply_implicit_conversion(state->current_function->return_type, ret, state)) { _mesa_glsl_error(& loc, state, |