Browse Source

mesa: added _mesa_print_swizzle() debugging helper

tags/mesa_20090313
Brian Paul 17 years ago
parent
commit
511733b862
2 changed files with 16 additions and 0 deletions
  1. 13
    0
      src/mesa/shader/prog_print.c
  2. 3
    0
      src/mesa/shader/prog_print.h

+ 13
- 0
src/mesa/shader/prog_print.c View File

@@ -356,6 +356,19 @@ _mesa_swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended)
}


void
_mesa_print_swizzle(GLuint swizzle)
{
if (swizzle == SWIZZLE_XYZW) {
_mesa_printf(".xyzw\n");
}
else {
char *s = _mesa_swizzle_string(swizzle, 0, 0);
_mesa_printf("%s\n", s);
}
}


static const char *
writemask_string(GLuint writeMask)
{

+ 3
- 0
src/mesa/shader/prog_print.h View File

@@ -43,6 +43,9 @@ _mesa_condcode_string(GLuint condcode);
extern const char *
_mesa_swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended);

extern void
_mesa_print_swizzle(GLuint swizzle);

extern void
_mesa_print_alu_instruction(const struct prog_instruction *inst,
const char *opcode_string, GLuint numRegs);

Loading…
Cancel
Save