glsl: stop processing function parameters if error happened

Fixes: d1fa69ed61 ("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 <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4341>
This commit is contained in:
Tapani Pälli 2020-03-27 09:04:31 +02:00
parent fc1068de0d
commit 53e4159eaa
1 changed files with 4 additions and 0 deletions

View File

@ -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);