diff options
author | Timothy Arceri <[email protected]> | 2018-06-14 11:00:22 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-06-19 12:09:56 +1000 |
commit | 90dbab0f9a2e35595b7510595b464e654b870e3a (patch) | |
tree | f80364b32f4fe664d6e21f111a3e63a52b3587c0 /src/compiler/glsl/ast_function.cpp | |
parent | de93f546a7f9f3407f88ea8dd2d4b3f7158e94ed (diff) |
mesa/util: add allow_glsl_builtin_const_expression driconf override
Google Earth VR shaders uses builtins in constant expressions with
GLSL 1.10. That feature wasn't allowed until GLSL 1.20.
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ast_function.cpp')
-rw-r--r-- | src/compiler/glsl/ast_function.cpp | 3 |
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); |