summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c3
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_info.c3
3 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index af1b8aa76ae..af8abb1fcd6 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -221,7 +221,7 @@ static void lp_exec_break_condition(struct lp_exec_mask *mask,
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,
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 8b46785d66c..75b06632b41 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -3239,6 +3239,7 @@ exec_case(struct tgsi_exec_machine *mach,
UPDATE_EXEC_MASK(mach);
}
+/* FIXME: this will only work if default is last */
static void
exec_default(struct tgsi_exec_machine *mach)
{
@@ -4200,7 +4201,7 @@ exec_instruction(
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;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
index aee2d3081b2..d5db6b953ec 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
@@ -298,6 +298,9 @@ tgsi_opcode_infer_src_type( uint opcode )
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: