diff options
author | Tapani Pälli <[email protected]> | 2020-03-27 09:04:31 +0200 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2020-04-13 15:53:15 +0300 |
commit | 53e4159eaaf692071bf63365eb27a16c97c9a3e5 (patch) | |
tree | d695ee69cc92f3087bc1b236c5a80159bf81b25b | |
parent | fc1068de0d124b746cc85b58564810c5453feee3 (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>
-rw-r--r-- | src/compiler/glsl/ast_function.cpp | 4 |
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); |