summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_debug.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-05-09 00:28:49 -0700
committerCorbin Simpson <[email protected]>2009-05-09 00:45:48 -0700
commitc4c5bf31a743bc53a9dbdef7807928dacae7958a (patch)
tree5fc47ff81d3d510ef08360ff4842da6eec8584ae /src/gallium/drivers/r300/r300_debug.c
parent7e347a0f49bd737f1a219fe8001c8ddb4f8c3d85 (diff)
r300-gallium: Start VS dumper.
Diffstat (limited to 'src/gallium/drivers/r300/r300_debug.c')
-rw-r--r--src/gallium/drivers/r300/r300_debug.c90
1 files changed, 14 insertions, 76 deletions
diff --git a/src/gallium/drivers/r300/r300_debug.c b/src/gallium/drivers/r300/r300_debug.c
index dd63136c9d6..1ff72172ebd 100644
--- a/src/gallium/drivers/r300/r300_debug.c
+++ b/src/gallium/drivers/r300/r300_debug.c
@@ -30,81 +30,6 @@ static void r300_dump_fs(struct r300_fragment_shader* fs)
}
}
-static char* r500_fs_swiz[] = {
- " R",
- " G",
- " B",
- " A",
- " 0",
- ".5",
- " 1",
- " U",
-};
-
-static char* r500_fs_op_rgb[] = {
- "MAD",
- "DP3",
- "DP4",
- "D2A",
- "MIN",
- "MAX",
- "---",
- "CND",
- "CMP",
- "FRC",
- "SOP",
- "MDH",
- "MDV",
-};
-
-static char* r500_fs_op_alpha[] = {
- "MAD",
- " DP",
- "MIN",
- "MAX",
- "---",
- "CND",
- "CMP",
- "FRC",
- "EX2",
- "LN2",
- "RCP",
- "RSQ",
- "SIN",
- "COS",
- "MDH",
- "MDV",
-};
-
-static char* r500_fs_mask[] = {
- "NONE",
- "R ",
- " G ",
- "RG ",
- " B ",
- "R B ",
- " GB ",
- "RGB ",
- " A",
- "R A",
- " G A",
- "RG A",
- " BA",
- "R BA",
- " GBA",
- "RGBA",
-};
-
-static char* r500_fs_tex[] = {
- " NOP",
- " LD",
- "TEXKILL",
- " PROJ",
- "LODBIAS",
- " LOD",
- " DXDY",
-};
-
void r500_fs_dump(struct r500_fragment_shader* fs)
{
int i;
@@ -225,12 +150,25 @@ void r500_fs_dump(struct r500_fragment_shader* fs)
}
}
+static void r300_vs_op_dump(uint32_t op)
+{
+ if (op & 0x81) {
+ debug_printf("PVS_MACRO_OP_2CLK_M2X_ADD\n");
+ } else if (op & 0x80) {
+ debug_printf(" PVS_MACRO_OP_2CLK_MADD\n");
+ } else if (op & 0x40) {
+ debug_printf("%s\n", r300_vs_me_ops[op & 0x1f]);
+ } else {
+ debug_printf("%s\n", r300_vs_ve_ops[op & 0x1f]);
+ }
+}
+
void r300_vs_dump(struct r300_vertex_shader* vs)
{
int i;
for (i = 0; i < vs->instruction_count; i++) {
- debug_printf("inst0: 0x%x\n", vs->instructions[i].inst0);
+ r300_vs_op_dump(vs->instructions[i].inst0);
debug_printf("inst1: 0x%x\n", vs->instructions[i].inst1);
debug_printf("inst2: 0x%x\n", vs->instructions[i].inst2);
debug_printf("inst3: 0x%x\n", vs->instructions[i].inst3);