aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2020-03-27 09:04:31 +0200
committerTapani Pälli <[email protected]>2020-04-13 15:53:15 +0300
commit53e4159eaaf692071bf63365eb27a16c97c9a3e5 (patch)
treed695ee69cc92f3087bc1b236c5a80159bf81b25b /src/compiler/glsl
parentfc1068de0d124b746cc85b58564810c5453feee3 (diff)
glsl: stop processing function parameters if error happened
Fixes: d1fa69ed61d ("glsl: do not attempt assignment if operand type not parsed correctly") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2696 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4341>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/ast_function.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp
index 5cbc713e6e1..08a200347af 100644
--- a/src/compiler/glsl/ast_function.cpp
+++ b/src/compiler/glsl/ast_function.cpp
@@ -49,6 +49,10 @@ process_parameters(exec_list *instructions, exec_list *actual_parameters,
ast->set_is_lhs(true);
ir_rvalue *result = ast->hir(instructions, state);
+ /* Error happened, bail out. */
+ if (state->error)
+ return 0;
+
ir_constant *const constant =
result->constant_expression_value(mem_ctx);