mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
glsl: When we've emitted a semantic error for ==, return a bool constant.
This prevents later errors (including an assertion failure) from
cascading the failure.
Fixes invalid-equality-04.vert.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33303
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@intel.com>
(cherry picked from commit 175829f1a8)
This commit is contained in:
parent
0ab66b7d0b
commit
1d779672fa
1 changed files with 7 additions and 3 deletions
|
|
@ -1069,10 +1069,14 @@ ast_expression::hir(exec_list *instructions,
|
|||
error_emitted = true;
|
||||
}
|
||||
|
||||
result = do_comparison(ctx, operations[this->oper], op[0], op[1]);
|
||||
type = glsl_type::bool_type;
|
||||
if (error_emitted) {
|
||||
result = new(ctx) ir_constant(false);
|
||||
} else {
|
||||
result = do_comparison(ctx, operations[this->oper], op[0], op[1]);
|
||||
assert(result->type == glsl_type::bool_type);
|
||||
type = glsl_type::bool_type;
|
||||
}
|
||||
|
||||
assert(error_emitted || (result->type == glsl_type::bool_type));
|
||||
break;
|
||||
|
||||
case ast_bit_and:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue