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_function.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_function.cpp')
-rw-r--r-- | src/glsl/ast_function.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp index 466ece67424..18e05197743 100644 --- a/src/glsl/ast_function.cpp +++ b/src/glsl/ast_function.cpp @@ -1737,7 +1737,7 @@ ast_function_expression::handle_method(exec_list *instructions, result = new(ctx) ir_constant(op->type->array_size()); } } else if (op->type->is_vector()) { - if (state->ARB_shading_language_420pack_enable) { + if (state->has_420pack()) { /* .length() returns int. */ result = new(ctx) ir_constant((int) op->type->vector_elements); } else { @@ -1746,7 +1746,7 @@ ast_function_expression::handle_method(exec_list *instructions, goto fail; } } else if (op->type->is_matrix()) { - if (state->ARB_shading_language_420pack_enable) { + if (state->has_420pack()) { /* .length() returns int. */ result = new(ctx) ir_constant((int) op->type->matrix_columns); } else { @@ -2075,7 +2075,7 @@ ast_aggregate_initializer::hir(exec_list *instructions, } const glsl_type *const constructor_type = this->constructor_type; - if (!state->ARB_shading_language_420pack_enable) { + if (!state->has_420pack()) { _mesa_glsl_error(&loc, state, "C-style initialization requires the " "GL_ARB_shading_language_420pack extension"); return ir_rvalue::error_value(ctx); |