vc4: Stash some debug code for format support checks.
authorEric Anholt <eric@anholt.net>
Mon, 11 Aug 2014 23:00:28 +0000 (16:00 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 12 Aug 2014 21:03:35 +0000 (14:03 -0700)
This can be useful for looking at context init setup and texture format
choices, and there's no reason for the silly retval computation we do if
you're not going to have this code (mostly from freedreno) around.

src/gallium/drivers/vc4/vc4_screen.c

index 08419306f431ca6f76a29a62abb14426d5f70d9b..62c5b2b49721a89114b434846680dad8955e1b8f 100644 (file)
@@ -376,6 +376,15 @@ vc4_screen_is_format_supported(struct pipe_screen *pscreen,
         if (usage & PIPE_BIND_TRANSFER_WRITE)
                 retval |= PIPE_BIND_TRANSFER_WRITE;
 
+#if 0
+       if (retval != usage) {
+               fprintf(stderr,
+                        "not supported: format=%s, target=%d, sample_count=%d, "
+                        "usage=0x%x, retval=0x%x\n", util_format_name(format),
+                        target, sample_count, usage, retval);
+       }
+#endif
+
         return retval == usage;
 }