mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
glsl: Correctly handle unary plus operator.
Previously, any occurence of the unary plus operator would trigger a bogus type mismatch error. Fix this by making the ast_plus case look more like the ast_neg case as far as type-checking is concerned. With this change the shaders/CorrectPreprocess8.frag test in piglit now passes.
This commit is contained in:
parent
f38d15b80d
commit
c24bcad9f8
1 changed files with 3 additions and 3 deletions
|
|
@ -660,9 +660,9 @@ ast_expression::hir(exec_list *instructions,
|
|||
case ast_plus:
|
||||
op[0] = this->subexpressions[0]->hir(instructions, state);
|
||||
|
||||
error_emitted = op[0]->type->is_error();
|
||||
if (type->is_error())
|
||||
op[0]->type = type;
|
||||
type = unary_arithmetic_result_type(op[0]->type, state, & loc);
|
||||
|
||||
error_emitted = type->is_error();
|
||||
|
||||
result = op[0];
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue