aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-01-14 19:05:55 -0700
committerBrian Paul <[email protected]>2010-01-14 19:05:55 -0700
commit16ecd2f0780c7b9123aa50d5a174c127a1e408b2 (patch)
treea17f241af3b19f9373c95a26cd8a98d54b2e8a18 /src/gallium/drivers/llvmpipe
parent4f5675e94b936d012b89937aac8a16c28143d5ec (diff)
llvmpipe: clean-up, fixing up frame dump/debug code
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_flush.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_flush.c b/src/gallium/drivers/llvmpipe/lp_flush.c
index 16fb00092e6..07f32848c7f 100644
--- a/src/gallium/drivers/llvmpipe/lp_flush.c
+++ b/src/gallium/drivers/llvmpipe/lp_flush.c
@@ -74,16 +74,21 @@ llvmpipe_flush( struct pipe_context *pipe,
/* Enable to dump BMPs of the color/depth buffers each frame */
#if 0
- if(flags & PIPE_FLUSH_FRAME) {
+ if (flags & PIPE_FLUSH_FRAME) {
static unsigned frame_no = 1;
- static char filename[256];
+ char filename[256];
unsigned i;
- for (i = 0; i < llvmpipe->framebuffer.nr_cbufs) {
- util_snprintf(filename, sizeof(filename), "cbuf%u_%u.bmp", i, frame_no);
- debug_dump_surface_bmp(filename, llvmpipe->framebuffer.cbufs[i]);
+
+ for (i = 0; i < llvmpipe->framebuffer.nr_cbufs; i++) {
+ util_snprintf(filename, sizeof(filename), "cbuf%u_%u", i, frame_no);
+ debug_dump_surface(filename, llvmpipe->framebuffer.cbufs[i]);
+ }
+
+ if (0) {
+ util_snprintf(filename, sizeof(filename), "zsbuf_%u", frame_no);
+ debug_dump_surface(filename, llvmpipe->framebuffer.zsbuf);
}
- util_snprintf(filename, sizeof(filename), "zsbuf_%u.bmp", frame_no);
- debug_dump_surface_bmp(filename, llvmpipe->framebuffer.zsbuf);
+
++frame_no;
}
#endif