From 53e4159eaaf692071bf63365eb27a16c97c9a3e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tapani=20P=C3=A4lli?= Date: Fri, 27 Mar 2020 09:04:31 +0200 Subject: [PATCH] glsl: stop processing function parameters if error happened MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: --- src/compiler/glsl/ast_function.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.30.2