glsl_to_tgsi: fix emission of boolean constants

We use 0xffffffff for true, but visit(ir_constant *) was emitting 1.
This commit is contained in:
Bryan Cain 2012-01-07 15:28:27 -06:00
parent c4529d10be
commit 673535f607
1 changed files with 1 additions and 1 deletions

View File

@ -2374,7 +2374,7 @@ glsl_to_tgsi_visitor::visit(ir_constant *ir)
gl_type = native_integers ? GL_BOOL : GL_FLOAT;
for (i = 0; i < ir->type->vector_elements; i++) {
if (native_integers)
values[i].b = ir->value.b[i];
values[i].u = ir->value.b[i] ? ~0 : 0;
else
values[i].f = ir->value.b[i];
}