From: Tapani Pälli Date: Fri, 27 Mar 2020 07:04:31 +0000 (+0200) Subject: glsl: stop processing function parameters if error happened X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=53e4159eaaf692071bf63365eb27a16c97c9a3e5;p=mesa.git 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 Reviewed-by: Timothy Arceri Part-of: --- 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);