mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 14:38:06 +02:00
Add support for bool to ir_equal and ir_nequal constant handling
This commit is contained in:
parent
8645a955fc
commit
77cce649c9
1 changed files with 6 additions and 0 deletions
|
|
@ -355,6 +355,9 @@ ir_constant_visitor::visit(ir_expression *ir)
|
|||
case GLSL_TYPE_FLOAT:
|
||||
b[0] = b[0] && op[0]->value.f[c] == op[1]->value.f[c];
|
||||
break;
|
||||
case GLSL_TYPE_BOOL:
|
||||
b[0] = b[0] && op[0]->value.b[c] == op[1]->value.b[c];
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
|
@ -376,6 +379,9 @@ ir_constant_visitor::visit(ir_expression *ir)
|
|||
case GLSL_TYPE_FLOAT:
|
||||
b[0] = b[0] || op[0]->value.f[c] != op[1]->value.f[c];
|
||||
break;
|
||||
case GLSL_TYPE_BOOL:
|
||||
b[0] = b[0] || op[0]->value.b[c] != op[1]->value.b[c];
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue