mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 22:30:12 +01:00
glsl: do not attempt assignment if operand type not parsed correctly
v2: check types of both operands (Ian) Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108012
This commit is contained in:
parent
d877451b48
commit
d1fa69ed61
1 changed files with 6 additions and 0 deletions
|
|
@ -1685,6 +1685,12 @@ ast_expression::do_hir(exec_list *instructions,
|
||||||
op[1] = this->subexpressions[1]->hir(instructions, state);
|
op[1] = this->subexpressions[1]->hir(instructions, state);
|
||||||
|
|
||||||
orig_type = op[0]->type;
|
orig_type = op[0]->type;
|
||||||
|
|
||||||
|
/* Break out if operand types were not parsed successfully. */
|
||||||
|
if ((op[0]->type == glsl_type::error_type ||
|
||||||
|
op[1]->type == glsl_type::error_type))
|
||||||
|
break;
|
||||||
|
|
||||||
type = arithmetic_result_type(op[0], op[1],
|
type = arithmetic_result_type(op[0], op[1],
|
||||||
(this->oper == ast_mul_assign),
|
(this->oper == ast_mul_assign),
|
||||||
state, & loc);
|
state, & loc);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue