pan/bit: Make run more useful
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sun, 5 Apr 2020 22:45:00 +0000 (18:45 -0400)
committerMarge Bot <eric+marge@anholt.net>
Sun, 5 Apr 2020 23:26:04 +0000 (23:26 +0000)
..by printing some output.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458>

src/panfrost/bifrost/test/bi_submit.c

index c9c9c90e8b72d6ce080ae44ce84fa8a0d8aee0ea..d827b25bc5667d4510033daa650d3ea9c37c6a4e 100644 (file)
@@ -231,11 +231,11 @@ bit_vertex(struct panfrost_device *dev, panfrost_program prog,
 
         /* Check the output varyings */
 
-        if (sz_expected) {
-                uint32_t *output = (uint32_t *) (var->cpu + 1024);
-                float *foutput = (float *) output;
-                float *fexpected = (float *) expected;
+        uint32_t *output = (uint32_t *) (var->cpu + 1024);
+        float *foutput = (float *) output;
+        float *fexpected = (float *) expected;
 
+        if (sz_expected) {
                 unsigned comp = memcmp(output, expected, sz_expected);
                 succ &= (comp == 0);
 
@@ -252,6 +252,13 @@ bit_vertex(struct panfrost_device *dev, panfrost_program prog,
 
                         fprintf(stderr, "\n");
                 }
+        } else if (debug == BIT_DEBUG_ALL) {
+                fprintf(stderr, "got [");
+
+                for (unsigned i = 0; i < 4; ++i)
+                        fprintf(stderr, "%08X /* %f */ ", output[i], foutput[i]);
+
+                fprintf(stderr, "\n");
         }
 
         return succ;