summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_flush.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-05-10 16:45:25 -0600
committerBrian Paul <[email protected]>2010-05-10 17:04:19 -0600
commit47ecb51eb48b91388d95f0ad6efbaa1b7d9bd9f3 (patch)
tree3f7e988188711a5c4d63c94c4626d4bae7e64efa /src/gallium/drivers/llvmpipe/lp_flush.c
parentbd34f61a7a84b039b1c9d4aafbdb8f7656c8dd11 (diff)
llvmpipe: update image dump/debug code
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_flush.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_flush.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_flush.c b/src/gallium/drivers/llvmpipe/lp_flush.c
index 644b821957a..e1425435e19 100644
--- a/src/gallium/drivers/llvmpipe/lp_flush.c
+++ b/src/gallium/drivers/llvmpipe/lp_flush.c
@@ -31,6 +31,7 @@
#include "pipe/p_defines.h"
+#include "util/u_string.h"
#include "draw/draw_context.h"
#include "lp_flush.h"
#include "lp_context.h"
@@ -71,25 +72,25 @@ llvmpipe_flush( struct pipe_context *pipe,
}
/* Enable to dump BMPs of the color/depth buffers each frame */
-#if 0
- if (flags & PIPE_FLUSH_FRAME) {
- static unsigned frame_no = 1;
- char filename[256];
- unsigned i;
-
- for (i = 0; i < llvmpipe->framebuffer.nr_cbufs; i++) {
- util_snprintf(filename, sizeof(filename), "cbuf%u_%u", i, frame_no);
- debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.cbufs[0]);
- }
+ if (0) {
+ if (flags & PIPE_FLUSH_FRAME) {
+ static unsigned frame_no = 1;
+ char filename[256];
+ unsigned i;
+
+ for (i = 0; i < llvmpipe->framebuffer.nr_cbufs; i++) {
+ util_snprintf(filename, sizeof(filename), "cbuf%u_%u", i, frame_no);
+ debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.cbufs[0]);
+ }
- if (0) {
- util_snprintf(filename, sizeof(filename), "zsbuf_%u", frame_no);
- debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.zsbuf);
- }
+ if (0) {
+ util_snprintf(filename, sizeof(filename), "zsbuf_%u", frame_no);
+ debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.zsbuf);
+ }
- ++frame_no;
+ ++frame_no;
+ }
}
-#endif
}