aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ast_function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/ast_function.cpp')
-rw-r--r--src/compiler/glsl/ast_function.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp
index 22d58e48c64..127aa1f91c4 100644
--- a/src/compiler/glsl/ast_function.cpp
+++ b/src/compiler/glsl/ast_function.cpp
@@ -529,7 +529,8 @@ generate_call(exec_list *instructions, ir_function_signature *sig,
* If the function call is a constant expression, don't generate any
* instructions; just generate an ir_constant.
*/
- if (state->is_version(120, 100)) {
+ if (state->is_version(120, 100) ||
+ state->ctx->Const.AllowGLSLBuiltinConstantExpression) {
ir_constant *value = sig->constant_expression_value(ctx,
actual_parameters,
NULL);