summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/ppu/cell_context.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-09-04 18:36:22 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-09-04 18:36:22 -0600
commit5cf2e226548f08c4b79a4eb289fd636a00079fb3 (patch)
treec1873742e3448d36efb465e2e9963655275d9ffc /src/gallium/drivers/cell/ppu/cell_context.c
parenta69fc5129bdf2f245c5bf2e0fe7b542caf7809a9 (diff)
cell: implement CELL_DEBUG env/options var
Options so far: "checker" module tile clear color by SPU ID to see where the tiles are "sync" to do synchronous DMA (only partially implemented)
Diffstat (limited to 'src/gallium/drivers/cell/ppu/cell_context.c')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_context.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_context.c b/src/gallium/drivers/cell/ppu/cell_context.c
index 9ff4e86943..c8828e644c 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.c
+++ b/src/gallium/drivers/cell/ppu/cell_context.c
@@ -85,6 +85,15 @@ cell_draw_create(struct cell_context *cell)
}
+#ifdef DEBUG
+static const struct debug_named_value cell_debug_flags[] = {
+ {"checker", CELL_DEBUG_CHECKER},/**< modulate tile clear color by SPU ID */
+ {"sync", CELL_DEBUG_SYNC}, /**< SPUs do synchronous DMA */
+ {NULL, 0}
+};
+#endif
+
+
struct pipe_context *
cell_create_context(struct pipe_screen *screen,
struct cell_winsys *cws)
@@ -136,6 +145,10 @@ cell_create_context(struct pipe_screen *screen,
draw_wide_point_threshold(cell->draw, 0.0);
draw_wide_line_threshold(cell->draw, 0.0);
+ cell->debug_flags = debug_get_flags_option("CELL_DEBUG",
+ cell_debug_flags,
+ 0 );
+
/*
* SPU stuff
*/