summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-03-28 17:08:17 -0600
committerBrian <[email protected]>2007-03-28 17:08:17 -0600
commitba730e14ed3650748285ebc41a402594b56b2bcf (patch)
treec47951474a8eec6930cdc9898aa9c88f97a8bda3
parent1ba858591bf16ffa43eb2ab24ed1ff9c258ceeab (diff)
cond code fix
-rw-r--r--src/mesa/shader/slang/slang_emit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index a726d67003e..a316c47d7e9 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -1343,9 +1343,11 @@ emit_cont_break_if_true(slang_emit_info *emitInfo, slang_ir_node *n)
}
}
else {
+ const GLuint condWritemask = inst->DstReg.WriteMask;
assert(emitInfo->EmitCondCodes);
inst = new_instruction(emitInfo, OPCODE_BRA);
inst->DstReg.CondMask = COND_NE;
+ inst->DstReg.CondSwizzle = writemask_to_swizzle(condWritemask);
return inst;
}
}
@@ -1791,7 +1793,7 @@ _slang_emit_code(slang_ir_node *n, slang_var_table *vt,
emitInfo.Subroutines = NULL;
emitInfo.NumSubroutines = 0;
- emitInfo.EmitHighLevelInstructions = ctx->Shader.EmitHighLevelInstructions;
+ emitInfo.EmitHighLevelInstructions = 0*ctx->Shader.EmitHighLevelInstructions;
emitInfo.EmitCondCodes = ctx->Shader.EmitCondCodes;
emitInfo.EmitComments = ctx->Shader.EmitComments;
emitInfo.EmitBeginEndSub = 0; /* XXX for compiler debug only */
@@ -1799,6 +1801,9 @@ _slang_emit_code(slang_ir_node *n, slang_var_table *vt,
if (!emitInfo.EmitCondCodes) {
emitInfo.EmitHighLevelInstructions = GL_TRUE;
}
+ if (emitInfo.EmitComments) {
+ emitInfo.EmitBeginEndSub = GL_TRUE;
+ }
(void) emit(&emitInfo, n);