diff options
author | Brian <[email protected]> | 2008-01-09 14:14:24 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2008-01-09 17:50:37 -0700 |
commit | d48c6e7b21839791ff53308187cc2aeed9fb618c (patch) | |
tree | 818cd5e93ef0a49fd93b34c5f9919242aabd87a7 /src/mesa/pipe | |
parent | abee68a7220e5ee16216caf22841ad934fb37334 (diff) |
Cell: remove some debug printfs, predicate others with Debug boolean
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r-- | src/mesa/pipe/cell/ppu/cell_flush.c | 2 | ||||
-rw-r--r-- | src/mesa/pipe/cell/ppu/cell_render.c | 3 | ||||
-rw-r--r-- | src/mesa/pipe/cell/ppu/cell_surface.c | 2 | ||||
-rw-r--r-- | src/mesa/pipe/cell/spu/main.c | 49 |
4 files changed, 30 insertions, 26 deletions
diff --git a/src/mesa/pipe/cell/ppu/cell_flush.c b/src/mesa/pipe/cell/ppu/cell_flush.c index 47003bef184..977c50da326 100644 --- a/src/mesa/pipe/cell/ppu/cell_flush.c +++ b/src/mesa/pipe/cell/ppu/cell_flush.c @@ -38,8 +38,6 @@ cell_flush(struct pipe_context *pipe, unsigned flags) struct cell_context *cell = cell_context(pipe); uint i; - printf("%s\n", __FUNCTION__); - cell_flush_prim_buffer(cell); /* Send CMD_FINISH to all SPUs */ diff --git a/src/mesa/pipe/cell/ppu/cell_render.c b/src/mesa/pipe/cell/ppu/cell_render.c index f5a91776a52..ecdd47e28b0 100644 --- a/src/mesa/pipe/cell/ppu/cell_render.c +++ b/src/mesa/pipe/cell/ppu/cell_render.c @@ -123,8 +123,6 @@ render_tri(struct draw_stage *stage, struct prim_header *prim) struct cell_prim_buffer *buf = &cell->prim_buffer; uint i; - printf("Cell render tri\n"); - if (buf->num_verts + 3 > CELL_MAX_VERTS) { cell_flush_prim_buffer(cell); } @@ -150,7 +148,6 @@ cell_flush_prim_buffer(struct cell_context *cell) if (cell->prim_buffer.num_verts == 0) return; - printf("*** Flushing prim buffer\n"); for (i = 0; i < cell->num_spus; i++) { struct cell_command_render *render = &cell_global.command[i].render; render->prim_type = PIPE_PRIM_TRIANGLES; diff --git a/src/mesa/pipe/cell/ppu/cell_surface.c b/src/mesa/pipe/cell/ppu/cell_surface.c index 1e1548c8b61..03dd41583f8 100644 --- a/src/mesa/pipe/cell/ppu/cell_surface.c +++ b/src/mesa/pipe/cell/ppu/cell_surface.c @@ -59,8 +59,6 @@ cell_clear_surface(struct pipe_context *pipe, struct pipe_surface *ps, surfIndex = 0; } - printf("Clear surf %u\n", surfIndex); - for (i = 0; i < cell->num_spus; i++) { #if 1 uint clr = clearValue; diff --git a/src/mesa/pipe/cell/spu/main.c b/src/mesa/pipe/cell/spu/main.c index 1552452ab79..8e7f8be1ebe 100644 --- a/src/mesa/pipe/cell/spu/main.c +++ b/src/mesa/pipe/cell/spu/main.c @@ -45,6 +45,8 @@ helpful headers: /opt/ibm/cell-sdk/prototype/sysroot/usr/include/libmisc.h */ +static boolean Debug = TRUE; + volatile struct cell_init_info init; struct framebuffer fb; @@ -292,7 +294,8 @@ main_loop(void) struct cell_command cmd; int exitFlag = 0; - printf("SPU %u: Enter main loop\n", init.id); + if (Debug) + printf("SPU %u: Enter main loop\n", init.id); assert((sizeof(struct cell_command) & 0xf) == 0); ASSERT_ALIGN16(&cmd); @@ -301,12 +304,14 @@ main_loop(void) unsigned opcode; int tag = 0; - printf("SPU %u: Wait for cmd...\n", init.id); + if (Debug) + printf("SPU %u: Wait for cmd...\n", init.id); /* read/wait from mailbox */ opcode = (unsigned int) spu_read_in_mbox(); - printf("SPU %u: got cmd %u\n", init.id, opcode); + if (Debug) + printf("SPU %u: got cmd %u\n", init.id, opcode); /* command payload */ mfc_get(&cmd, /* dest */ @@ -319,18 +324,19 @@ main_loop(void) switch (opcode) { case CELL_CMD_EXIT: - printf("SPU %u: EXIT\n", init.id); + if (Debug) + printf("SPU %u: EXIT\n", init.id); exitFlag = 1; break; case CELL_CMD_FRAMEBUFFER: - printf("SPU %u: FRAMEBUFFER: %d x %d at %p, cformat 0x%x zformat 0x%x\n", - init.id, - cmd.fb.width, - cmd.fb.height, - cmd.fb.color_start, - cmd.fb.color_format, - cmd.fb.depth_format); - printf("Z16 = 0x%x\n", PIPE_FORMAT_Z16_UNORM); + if (Debug) + printf("SPU %u: FRAMEBUFFER: %d x %d at %p, cformat 0x%x zformat 0x%x\n", + init.id, + cmd.fb.width, + cmd.fb.height, + cmd.fb.color_start, + cmd.fb.color_format, + cmd.fb.depth_format); fb.color_start = cmd.fb.color_start; fb.depth_start = cmd.fb.depth_start; fb.color_format = cmd.fb.color_format; @@ -345,18 +351,21 @@ main_loop(void) */ break; case CELL_CMD_CLEAR_SURFACE: - printf("SPU %u: CLEAR SURF %u to 0x%08x\n", init.id, - cmd.clear.surface, cmd.clear.value); + if (Debug) + printf("SPU %u: CLEAR SURF %u to 0x%08x\n", init.id, + cmd.clear.surface, cmd.clear.value); clear_surface(&cmd.clear); break; case CELL_CMD_RENDER: - printf("SPU %u: RENDER %u verts, prim %u\n", - init.id, cmd.render.num_verts, cmd.render.prim_type); + if (Debug) + printf("SPU %u: RENDER %u verts, prim %u\n", + init.id, cmd.render.num_verts, cmd.render.prim_type); render(&cmd.render); break; case CELL_CMD_FINISH: - printf("SPU %u: FINISH\n", init.id); + if (Debug) + printf("SPU %u: FINISH\n", init.id); /* wait for all outstanding DMAs to finish */ mfc_write_tag_mask(~0); mfc_read_tag_status_all(); @@ -369,7 +378,8 @@ main_loop(void) } - printf("SPU %u: Exit main loop\n", init.id); + if (Debug) + printf("SPU %u: Exit main loop\n", init.id); } @@ -388,7 +398,8 @@ main(unsigned long speid, unsigned long argp) DefaultTag = 1; - printf("SPU: main() speid=%lu\n", speid); + if (Debug) + printf("SPU: main() speid=%lu\n", speid); mfc_get(&init, /* dest */ (unsigned int) argp, /* src */ |