summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-01-03 07:49:13 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-03 07:49:13 -0700
commit7aee3eff18decd6ce46f63a44c9a531414565265 (patch)
tree3225110ee9e314d2031857dc2ececb5ebe005b78 /src/mesa/pipe
parentf6b7e2d3bf9af34704e9624246614c1583b655da (diff)
better debug code
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/cell/ppu/cell_surface.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/mesa/pipe/cell/ppu/cell_surface.c b/src/mesa/pipe/cell/ppu/cell_surface.c
index 8b3ed4a23a..5fa37dd2cd 100644
--- a/src/mesa/pipe/cell/ppu/cell_surface.c
+++ b/src/mesa/pipe/cell/ppu/cell_surface.c
@@ -67,8 +67,21 @@ cell_clear_surface(struct pipe_context *pipe, struct pipe_surface *ps,
}
for (i = 0; i < cell->num_spus; i++) {
- /* XXX clear color varies per-SPU for debugging */
- cell_global.command[i].clear.value = clearValue | (i << 21);
+#if 1
+ uint clr = clearValue;
+ /* XXX debug: clear color varied per-SPU to visualize tiles */
+ if ((clr & 0xff) == 0)
+ clr |= 64 + i * 8;
+ if ((clr & 0xff00) == 0)
+ clr |= (64 + i * 8) << 8;
+ if ((clr & 0xff0000) == 0)
+ clr |= (64 + i * 8) << 16;
+ if ((clr & 0xff000000) == 0)
+ clr |= (64 + i * 8) << 24;
+ cell_global.command[i].clear.value = clr;
+#else
+ cell_global.command[i].clear.value = clearValue;
+#endif
send_mbox_message(cell_global.spe_contexts[i], CELL_CMD_CLEAR_TILES);
}
}