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 <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4341>
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);