diff options
| author | Brian <brian@yutani.localnet.net> | 2007-03-28 11:01:09 -0600 | 
|---|---|---|
| committer | Brian <brian@yutani.localnet.net> | 2007-03-28 11:01:09 -0600 | 
| commit | d750861dc26e3898afa2b49e3969d709dc227664 (patch) | |
| tree | 929b9a89cea0ac05124c84484ff5e4853273fc50 /src | |
| parent | 59f7f6dbe9e197482f6b5e50c6a910f86c4f6694 (diff) | |
expose _mesa_condcode_string(), fix some printing
Diffstat (limited to 'src')
| -rw-r--r-- | src/mesa/shader/prog_print.c | 23 | ||||
| -rw-r--r-- | src/mesa/shader/prog_print.h | 3 | 
2 files changed, 14 insertions, 12 deletions
| diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 4ecdc82d15..a43bebb77a 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -361,8 +361,8 @@ writemask_string(GLuint writeMask)  } -static const char * -condcode_string(GLuint condcode) +const char * +_mesa_condcode_string(GLuint condcode)  {     switch (condcode) {     case COND_GT:  return "GT"; @@ -390,7 +390,7 @@ print_dst_reg(const struct prog_dst_register *dstReg, gl_prog_print_mode mode,     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));     } @@ -561,9 +561,9 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent,        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; @@ -577,7 +577,7 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent,        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));        } @@ -600,7 +600,7 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent,     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); @@ -635,7 +635,7 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent,        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); @@ -643,10 +643,9 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent,        }        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; diff --git a/src/mesa/shader/prog_print.h b/src/mesa/shader/prog_print.h index 9c7607f9d5..36c47e0dff 100644 --- a/src/mesa/shader/prog_print.h +++ b/src/mesa/shader/prog_print.h @@ -38,6 +38,9 @@ typedef enum {  extern const char * +_mesa_condcode_string(GLuint condcode); + +extern const char *  _mesa_swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended);  extern void | 
