summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/cell
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2008-03-18 10:23:39 -0700
committerIan Romanick <[email protected]>2008-03-18 10:28:39 -0700
commitf432ac5a1126997f10072760fe5afbf1b96f44f7 (patch)
treee64f2fe876dfc801b6092491dd26c79d6a721dee /src/gallium/drivers/cell
parent527e30c53baadb396e5503e5188f0a9f1b2d2501 (diff)
cell: Move and (conditionally) silence debug code
Diffstat (limited to 'src/gallium/drivers/cell')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_state_emit.c10
-rw-r--r--src/gallium/drivers/cell/ppu/cell_state_per_fragment.c39
2 files changed, 39 insertions, 10 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_state_emit.c b/src/gallium/drivers/cell/ppu/cell_state_emit.c
index e2cc9de48ad..4d589bcdbf9 100644
--- a/src/gallium/drivers/cell/ppu/cell_state_emit.c
+++ b/src/gallium/drivers/cell/ppu/cell_state_emit.c
@@ -87,16 +87,6 @@ cell_emit_state(struct cell_context *cell)
dsat.read_stencil = FALSE;
}
- {
- uint32_t *p = cell->depth_stencil->code.store;
-
- printf("\t.text\n");
- for (/* empty */; p < cell->depth_stencil->code.csr; p++) {
- printf("\t.long\t0x%04x\n", *p);
- }
- fflush(stdout);
- }
-
emit_state_cmd(cell, CELL_CMD_STATE_DEPTH_STENCIL, &dsat,
sizeof(dsat));
}
diff --git a/src/gallium/drivers/cell/ppu/cell_state_per_fragment.c b/src/gallium/drivers/cell/ppu/cell_state_per_fragment.c
index 60b64438d80..0ad9344cd40 100644
--- a/src/gallium/drivers/cell/ppu/cell_state_per_fragment.c
+++ b/src/gallium/drivers/cell/ppu/cell_state_per_fragment.c
@@ -525,6 +525,45 @@ cell_generate_depth_stencil_test(struct cell_depth_stencil_alpha_state *cdsa)
}
spe_bi(f, 0, 0, 0);
+
+
+#if 0
+ {
+ const uint32_t *p = f->store;
+ unsigned i;
+
+ printf("# alpha (%sabled)\n",
+ (dsa->alpha.enabled) ? "en" : "dis");
+ printf("# func: %u\n", dsa->alpha.func);
+ printf("# ref: %.2f\n", dsa->alpha.ref);
+
+ printf("# depth (%sabled)\n",
+ (dsa->depth.enabled) ? "en" : "dis");
+ printf("# func: %u\n", dsa->depth.func);
+
+ for (i = 0; i < 2; i++) {
+ printf("# %s stencil (%sabled)\n",
+ (i == 0) ? "front" : "back",
+ (dsa->stencil[i].enabled) ? "en" : "dis");
+
+ printf("# func: %u\n", dsa->stencil[i].func);
+ printf("# op (sf, zf, zp): %u %u %u\n",
+ dsa->stencil[i].fail_op,
+ dsa->stencil[i].zfail_op,
+ dsa->stencil[i].zpass_op);
+ printf("# ref value / value mask / write mask: %02x %02x %02x\n",
+ dsa->stencil[i].ref_value,
+ dsa->stencil[i].value_mask,
+ dsa->stencil[i].write_mask);
+ }
+
+ printf("\t.text\n");
+ for (/* empty */; p < f->csr; p++) {
+ printf("\t.long\t0x%04x\n", *p);
+ }
+ fflush(stdout);
+ }
+#endif
}