From 19ff2326e94a7a773bcb1dd9bfd22197b999daf9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 13 Aug 2008 17:20:40 -0600 Subject: gallium: fix exec_kilp(), fix Exec/FuncMask test for TGSI_OPCODE_RET Fixes a few glean glsl regressions. --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index df2a7cc4b3e..a96209db1af 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -1234,10 +1234,13 @@ static void exec_kilp(struct tgsi_exec_machine *mach, const struct tgsi_full_instruction *inst) { + uint kilmask; /* bit 0 = pixel 0, bit 1 = pixel 1, etc */ + if (inst->InstructionExtNv.CondFlowEnable) { uint swizzle[4]; uint chan_index; - uint kilmask = 0; /* bit 0 = pixel 0, bit 1 = pixel 1, etc */ + + kilmask = 0x0; swizzle[0] = inst->InstructionExtNv.CondSwizzleX; swizzle[1] = inst->InstructionExtNv.CondSwizzleY; @@ -1254,9 +1257,12 @@ exec_kilp(struct tgsi_exec_machine *mach, kilmask |= 1 << i; } } - - mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] |= kilmask; } + else { + /* "unconditional" kil */ + kilmask = mach->ExecMask; + } + mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] |= kilmask; } @@ -2176,7 +2182,7 @@ exec_instruction( mach->FuncMask &= ~mach->ExecMask; UPDATE_EXEC_MASK(mach); - if (mach->ExecMask == 0x0) { + if (mach->FuncMask == 0x0) { /* really return now (otherwise, keep executing */ if (mach->CallStackTop == 0) { -- cgit v1.2.3