}
-static const char *
-condcode_string(GLuint condcode)
+const char *
+_mesa_condcode_string(GLuint condcode)
{
switch (condcode) {
case COND_GT: return "GT";
if (dstReg->CondMask != COND_TR) {
_mesa_printf(" (%s.%s)",
- condcode_string(dstReg->CondMask),
+ _mesa_condcode_string(dstReg->CondMask),
_mesa_swizzle_string(dstReg->CondSwizzle, GL_FALSE, GL_FALSE));
}
print_comment(inst);
break;
case OPCODE_BRA:
- _mesa_printf("BRA %u (%s%s)",
+ _mesa_printf("BRA %d (%s%s)",
inst->BranchTarget,
- condcode_string(inst->DstReg.CondMask),
+ _mesa_condcode_string(inst->DstReg.CondMask),
_mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE));
print_comment(inst);
break;
else {
/* Use cond codes */
_mesa_printf("IF (%s%s);",
- condcode_string(inst->DstReg.CondMask),
+ _mesa_condcode_string(inst->DstReg.CondMask),
_mesa_swizzle_string(inst->DstReg.CondSwizzle,
0, GL_FALSE));
}
case OPCODE_CONT:
_mesa_printf("%s (%s%s); # (goto %d)",
_mesa_opcode_string(inst->Opcode),
- condcode_string(inst->DstReg.CondMask),
+ _mesa_condcode_string(inst->DstReg.CondMask),
_mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE),
inst->BranchTarget);
print_comment(inst);
break;
case OPCODE_CAL:
if (mode == PROG_PRINT_NV) {
- _mesa_printf("CAL %s;\n", inst->Comment);
+ _mesa_printf("CAL %s; # (goto %d)\n", inst->Comment, inst->BranchTarget);
}
else {
_mesa_printf("CAL %u", inst->BranchTarget);
}
break;
case OPCODE_RET:
- _mesa_printf("RET (%s%s); # (goto %d)",
- condcode_string(inst->DstReg.CondMask),
- _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE),
- inst->BranchTarget);
+ _mesa_printf("RET (%s%s)",
+ _mesa_condcode_string(inst->DstReg.CondMask),
+ _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE));
print_comment(inst);
break;