vc4: Print the rounded shader size in debug output.
authorEric Anholt <eric@anholt.net>
Wed, 4 Nov 2015 21:10:28 +0000 (13:10 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 4 Nov 2015 21:32:07 +0000 (13:32 -0800)
It's surprising to see "0kb" printed for debug on short shaders, while
4kb alignment won't be suprising.

src/gallium/drivers/vc4/vc4_bufmgr.c

index 171a5544bea7d02b11f9d1fbdf359c30e1193587..52ba8ab19ef1b30a1cf6a1aed78fa76c6cd5c5b9 100644 (file)
@@ -428,7 +428,7 @@ vc4_bo_alloc_shader(struct vc4_screen *screen, const void *data, uint32_t size)
         screen->bo_count++;
         screen->bo_size += bo->size;
         if (dump_stats) {
-                fprintf(stderr, "Allocated shader %dkb:\n", size / 1024);
+                fprintf(stderr, "Allocated shader %dkb:\n", bo->size / 1024);
                 vc4_bo_dump_stats(screen);
         }