Mesa (master): vc4: Stash some debug code for format support checks.

Eric Anholt anholt at kemper.freedesktop.org
Tue Aug 12 21:20:49 UTC 2014


Module: Mesa
Branch: master
Commit: 8e504ce4207b6ca7863700b0f41f0985f4bbe7d0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8e504ce4207b6ca7863700b0f41f0985f4bbe7d0

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Aug 11 16:00:28 2014 -0700

vc4: Stash some debug code for format support checks.

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 |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
index 0841930..62c5b2b 100644
--- a/src/gallium/drivers/vc4/vc4_screen.c
+++ b/src/gallium/drivers/vc4/vc4_screen.c
@@ -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;
 }
 




More information about the mesa-commit mailing list