summaryrefslogtreecommitdiff
path: root/src/mesa/shader/prog_print.c
diff options
context:
space:
mode:
authorBrian <brian@nostromo.localnet.net>2007-02-06 22:31:19 -0700
committerBrian <brian@nostromo.localnet.net>2007-02-06 22:31:19 -0700
commitf22ed0986a743e033d827c78371612c7115ff913 (patch)
treec9df47eeb7033ebdc2b5b596737bd14b24f41c9d /src/mesa/shader/prog_print.c
parent5f7d4668c4b7de1c0d2269809d30aef6d0a089e9 (diff)
Implement CONT, improve BRK.
IR_LOOP's BranchNode ptr is the head of a linked list of CONT and BRK nodes. After emitting loop, walk over the linked list, filling in the CONT/BRK instruction's BranchTarget field (location of the ENDLOOP instruction, or one past).
Diffstat (limited to 'src/mesa/shader/prog_print.c')
-rw-r--r--src/mesa/shader/prog_print.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c
index 3d4a474b05..6c303de9b5 100644
--- a/src/mesa/shader/prog_print.c
+++ b/src/mesa/shader/prog_print.c
@@ -338,8 +338,14 @@ _mesa_print_instruction(const struct prog_instruction *inst, GLint indent)
_mesa_printf("ENDLOOP (goto %d)\n", inst->BranchTarget);
break;
case OPCODE_BRK:
- /* XXX just like BRA */
- _mesa_printf("BRK (%s%s) (for loop beginning at %d)",
+ _mesa_printf("BRK (%s%s) (goto %d)",
+ condcode_string(inst->DstReg.CondMask),
+ swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE),
+ inst->BranchTarget);
+ print_comment(inst);
+ break;
+ case OPCODE_CONT:
+ _mesa_printf("CONT (%s%s) (goto %d)",
condcode_string(inst->DstReg.CondMask),
swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE),
inst->BranchTarget);