diff options
author | Brian <[email protected]> | 2007-03-28 15:45:24 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-03-28 15:45:24 -0600 |
commit | 1ba858591bf16ffa43eb2ab24ed1ff9c258ceeab (patch) | |
tree | 16b6867eb9642bd20944dc7533a5f8e65b524780 /src/mesa/shader/slang/slang_emit.c | |
parent | f2f5d06853f17bcbecf68ebb07c8cc19a2cfdeb5 (diff) |
fix cond code swizzle bug
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r-- | src/mesa/shader/slang/slang_emit.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index b00ab3c7bf3..a726d67003e 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1314,8 +1314,13 @@ emit_cont_break_if_true(slang_emit_info *emitInfo, slang_ir_node *n) const gl_inst_opcode opcode = (n->Opcode == IR_CONT_IF_TRUE) ? OPCODE_CONT : OPCODE_BRK; if (emitInfo->EmitCondCodes) { + /* Get the writemask from the previous instruction which set + * the condcodes. Use that writemask as the CondSwizzle. + */ + const GLuint condWritemask = inst->DstReg.WriteMask; inst = new_instruction(emitInfo, opcode); inst->DstReg.CondMask = COND_NE; + inst->DstReg.CondSwizzle = writemask_to_swizzle(condWritemask); return inst; } else { |