diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-09-09 22:17:31 +0900 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-09-09 22:19:31 +0900 |
commit | d671cf460f99693ded1eccc6b32816d430098725 (patch) | |
tree | 188a266660c05bc2d65860ce7841493fe533ed90 | |
parent | bfe45670aef35c358e7d22b8a9cb8cd6532b0e3d (diff) |
softpipe: Code (commented out) to dump BMPs.
-rw-r--r-- | src/gallium/drivers/softpipe/sp_flush.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_flush.c b/src/gallium/drivers/softpipe/sp_flush.c index e03994b63b..401764bb43 100644 --- a/src/gallium/drivers/softpipe/sp_flush.c +++ b/src/gallium/drivers/softpipe/sp_flush.c @@ -73,6 +73,19 @@ softpipe_flush( struct pipe_context *pipe, softpipe_unmap_surfaces(softpipe); } + /* Enable to dump BMPs of the color/depth buffers each frame */ +#if 0 + if(flags & PIPE_FLUSH_FRAME) { + static unsigned frame_no = 1; + static char filename[256]; + util_snprintf(filename, sizeof(filename), "cbuf_%u.bmp", frame_no); + debug_dump_surface_bmp(filename, softpipe->framebuffer.cbufs[0]); + util_snprintf(filename, sizeof(filename), "zsbuf_%u.bmp", frame_no); + debug_dump_surface_bmp(filename, softpipe->framebuffer.zsbuf); + ++frame_no; + } +#endif + if (fence) *fence = NULL; } |