summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/i915simple/i915_debug_fp.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-08-11 13:06:24 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2007-08-11 13:06:24 +0100
commit2eb839ce1dc9a7737925d69d7b628fc839fa752d (patch)
treebedc2ff5dbecceae3e9bf5c1940ca6817bd32472 /src/mesa/pipe/i915simple/i915_debug_fp.c
parenteada74dc543348e03ef4eaf557c9b84afec7824a (diff)
make it easier to compare debug code with non-pipe version
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_debug_fp.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_debug_fp.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/src/mesa/pipe/i915simple/i915_debug_fp.c b/src/mesa/pipe/i915simple/i915_debug_fp.c
index d99c609d48..c54d36f294 100644
--- a/src/mesa/pipe/i915simple/i915_debug_fp.c
+++ b/src/mesa/pipe/i915simple/i915_debug_fp.c
@@ -37,7 +37,7 @@
-#define PRINTF( stream, ... ) (stream)->winsys->printf( (stream)->winsys, __VA_ARGS__ )
+#define PRINTF( ... ) (stream)->winsys->printf( (stream)->winsys, __VA_ARGS__ )
@@ -132,27 +132,27 @@ print_reg_type_nr(struct debug_stream *stream, GLuint type, GLuint nr)
case REG_TYPE_T:
switch (nr) {
case T_DIFFUSE:
- PRINTF(stream, "T_DIFFUSE");
+ PRINTF("T_DIFFUSE");
return;
case T_SPECULAR:
- PRINTF(stream, "T_SPECULAR");
+ PRINTF("T_SPECULAR");
return;
case T_FOG_W:
- PRINTF(stream, "T_FOG_W");
+ PRINTF("T_FOG_W");
return;
default:
- PRINTF(stream, "T_TEX%d", nr);
+ PRINTF("T_TEX%d", nr);
return;
}
case REG_TYPE_OC:
if (nr == 0) {
- PRINTF(stream, "oC");
+ PRINTF("oC");
return;
}
break;
case REG_TYPE_OD:
if (nr == 0) {
- PRINTF(stream, "oD");
+ PRINTF("oD");
return;
}
break;
@@ -160,7 +160,7 @@ print_reg_type_nr(struct debug_stream *stream, GLuint type, GLuint nr)
break;
}
- PRINTF(stream, "%s[%d]", regname[type], nr);
+ PRINTF("%s[%d]", regname[type], nr);
}
#define REG_SWIZZLE_MASK 0x7777
@@ -181,33 +181,33 @@ print_reg_neg_swizzle(struct debug_stream *stream, GLuint reg)
(reg & REG_NEGATE_MASK) == 0)
return;
- PRINTF(stream, ".");
+ PRINTF(".");
for (i = 3; i >= 0; i--) {
if (reg & (1 << ((i * 4) + 3)))
- PRINTF(stream, "-");
+ PRINTF("-");
switch ((reg >> (i * 4)) & 0x7) {
case 0:
- PRINTF(stream, "x");
+ PRINTF("x");
break;
case 1:
- PRINTF(stream, "y");
+ PRINTF("y");
break;
case 2:
- PRINTF(stream, "z");
+ PRINTF("z");
break;
case 3:
- PRINTF(stream, "w");
+ PRINTF("w");
break;
case 4:
- PRINTF(stream, "0");
+ PRINTF("0");
break;
case 5:
- PRINTF(stream, "1");
+ PRINTF("1");
break;
default:
- PRINTF(stream, "?");
+ PRINTF("?");
break;
}
}
@@ -232,15 +232,15 @@ print_dest_reg(struct debug_stream *stream, GLuint dword)
print_reg_type_nr(stream, type, nr);
if ((dword & A0_DEST_CHANNEL_ALL) == A0_DEST_CHANNEL_ALL)
return;
- PRINTF(stream, ".");
+ PRINTF(".");
if (dword & A0_DEST_CHANNEL_X)
- PRINTF(stream, "x");
+ PRINTF("x");
if (dword & A0_DEST_CHANNEL_Y)
- PRINTF(stream, "y");
+ PRINTF("y");
if (dword & A0_DEST_CHANNEL_Z)
- PRINTF(stream, "z");
+ PRINTF("z");
if (dword & A0_DEST_CHANNEL_W)
- PRINTF(stream, "w");
+ PRINTF("w");
}
@@ -256,29 +256,29 @@ print_arith_op(struct debug_stream *stream,
if (opcode != A0_NOP) {
print_dest_reg(stream, program[0]);
if (program[0] & A0_DEST_SATURATE)
- PRINTF(stream, " = SATURATE ");
+ PRINTF(" = SATURATE ");
else
- PRINTF(stream, " = ");
+ PRINTF(" = ");
}
- PRINTF(stream, "%s ", opcodes[opcode]);
+ PRINTF("%s ", opcodes[opcode]);
print_src_reg(stream, GET_SRC0_REG(program[0], program[1]));
if (args[opcode] == 1) {
- PRINTF(stream, "\n");
+ PRINTF("\n");
return;
}
- PRINTF(stream, ", ");
+ PRINTF(", ");
print_src_reg(stream, GET_SRC1_REG(program[1], program[2]));
if (args[opcode] == 2) {
- PRINTF(stream, "\n");
+ PRINTF("\n");
return;
}
- PRINTF(stream, ", ");
+ PRINTF(", ");
print_src_reg(stream, GET_SRC2_REG(program[2]));
- PRINTF(stream, "\n");
+ PRINTF("\n");
return;
}
@@ -288,27 +288,27 @@ print_tex_op(struct debug_stream *stream,
GLuint opcode, const GLuint * program)
{
print_dest_reg(stream, program[0] | A0_DEST_CHANNEL_ALL);
- PRINTF(stream, " = ");
+ PRINTF(" = ");
- PRINTF(stream, "%s ", opcodes[opcode]);
+ PRINTF("%s ", opcodes[opcode]);
- PRINTF(stream, "S[%d],", program[0] & T0_SAMPLER_NR_MASK);
+ PRINTF("S[%d],", program[0] & T0_SAMPLER_NR_MASK);
print_reg_type_nr(stream,
(program[1] >> T1_ADDRESS_REG_TYPE_SHIFT) &
REG_TYPE_MASK,
(program[1] >> T1_ADDRESS_REG_NR_SHIFT) & REG_NR_MASK);
- PRINTF(stream, "\n");
+ PRINTF("\n");
}
static void
print_dcl_op(struct debug_stream *stream,
GLuint opcode, const GLuint * program)
{
- PRINTF(stream, "%s ", opcodes[opcode]);
+ PRINTF("%s ", opcodes[opcode]);
print_dest_reg(stream,
program[0] | A0_DEST_CHANNEL_ALL);
- PRINTF(stream, "\n");
+ PRINTF("\n");
}
@@ -319,7 +319,7 @@ i915_disassemble_program(struct debug_stream *stream,
GLuint size = program[0] & 0x1ff;
GLint i;
- PRINTF(stream, "\t\tBEGIN\n");
+ PRINTF("\t\tBEGIN\n");
assert(size + 2 == sz);
@@ -327,7 +327,7 @@ i915_disassemble_program(struct debug_stream *stream,
for (i = 1; i < sz; i += 3, program += 3) {
GLuint opcode = program[0] & (0x1f << 24);
- PRINTF(stream, "\t\t");
+ PRINTF("\t\t");
if ((GLint) opcode >= A0_NOP && opcode <= A0_SLT)
print_arith_op(stream, opcode >> 24, program);
@@ -336,10 +336,10 @@ i915_disassemble_program(struct debug_stream *stream,
else if (opcode == D0_DCL)
print_dcl_op(stream, opcode >> 24, program);
else
- PRINTF(stream, "Unknown opcode 0x%x\n", opcode);
+ PRINTF("Unknown opcode 0x%x\n", opcode);
}
- PRINTF(stream, "\t\tEND\n\n");
+ PRINTF("\t\tEND\n\n");
}