vc4: Drop the dump_fbo() routine.
authorEric Anholt <eric@anholt.net>
Mon, 11 Aug 2014 19:47:30 +0000 (12:47 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 12 Aug 2014 21:21:56 +0000 (14:21 -0700)
Now that eglkms is working, and some tests are working under
PIGLIT_PLATFORM=gbm, I don't think I need this any more.

src/gallium/drivers/vc4/vc4_context.c

index 8ca403106638b694719aaea4ced46fe305cdf0dd..8073e79cc93a9236b50630cf0cfe5145a640475f 100644 (file)
 #include "vc4_context.h"
 #include "vc4_resource.h"
 
-static void
-dump_fbo(struct vc4_context *vc4, struct vc4_bo *fbo)
-{
-#ifndef USE_VC4_SIMULATOR
-        uint32_t *map = vc4_bo_map(fbo);
-        uint32_t width = vc4->framebuffer.width;
-        uint32_t height = vc4->framebuffer.height;
-        uint32_t chunk_w = width / 79;
-        uint32_t chunk_h = height / 40;
-        uint32_t found_colors[10];
-        uint32_t num_found_colors = 0;
-
-        for (int by = 0; by < height; by += chunk_h) {
-                for (int bx = 0; bx < width; bx += chunk_w) {
-                        bool on = false, black = false;
-
-                        for (int y = by; y < MIN2(height, by + chunk_h); y++) {
-                                for (int x = bx; x < MIN2(width, bx + chunk_w); x++) {
-                                        uint32_t pix = map[y * width + x];
-                                        on |= pix != 0;
-                                        black |= pix == 0xff000000;
-
-                                        int i;
-                                        for (i = 0; i < num_found_colors; i++) {
-                                                if (pix == found_colors[i])
-                                                        break;
-                                        }
-                                        if (i == num_found_colors &&
-                                            num_found_colors < Elements(found_colors))
-                                                found_colors[num_found_colors++] = pix;
-                                }
-                        }
-                        if (black)
-                                fprintf(stderr, "O");
-                        else if (on)
-                                fprintf(stderr, "X");
-                        else
-                                fprintf(stderr, ".");
-                }
-                fprintf(stderr, "\n");
-        }
-
-        for (int i = 0; i < num_found_colors; i++) {
-                fprintf(stderr, "color %d: 0x%08x\n", i, found_colors[i]);
-        }
-#endif
-}
-
 static void
 vc4_setup_rcl(struct vc4_context *vc4)
 {
@@ -239,8 +191,6 @@ vc4_flush(struct pipe_context *pctx)
         vc4->dirty = ~0;
         vc4->resolve = 0;
         vc4->cleared = 0;
-
-        dump_fbo(vc4, ctex->bo);
 }
 
 static void