It seems there was a typo in gallivm breakc handling (I am actually still
not sure it is really needed but otherwise that statement really should go
away). Also fix the wrong src argument type, even though they weren't really
used.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
LLVMValueRef cond_mask = LLVMBuildAnd(builder,
mask->exec_mask,
cond, "cond_mask");
- cond_mask = LLVMBuildNot(builder, cond, "break_cond");
+ cond_mask = LLVMBuildNot(builder, cond_mask, "break_cond");
mask->break_mask = LLVMBuildAnd(builder,
mask->break_mask,
UPDATE_EXEC_MASK(mach);
}
+/* FIXME: this will only work if default is last */
static void
exec_default(struct tgsi_exec_machine *mach)
{
break;
case TGSI_OPCODE_BREAKC:
- FETCH(&r[0], 0, TGSI_CHAN_X);
+ IFETCH(&r[0], 0, TGSI_CHAN_X);
/* update CondMask */
if (r[0].u[0] && (mach->ExecMask & 0x1)) {
mach->LoopMask &= ~0x1;
case TGSI_OPCODE_SAMPLE_I:
case TGSI_OPCODE_SAMPLE_I_MS:
case TGSI_OPCODE_UIF:
+ case TGSI_OPCODE_CASE:
+ case TGSI_OPCODE_SWITCH:
+ case TGSI_OPCODE_BREAKC:
return TGSI_TYPE_UNSIGNED;
case TGSI_OPCODE_MOD:
case TGSI_OPCODE_I2F: