From 1a1c55709e486df80cd05e23a7a1b312d0066c0f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 5 Apr 2020 18:45:00 -0400 Subject: [PATCH] pan/bit: Make run more useful ..by printing some output. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/test/bi_submit.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/panfrost/bifrost/test/bi_submit.c b/src/panfrost/bifrost/test/bi_submit.c index c9c9c90e8b7..d827b25bc56 100644 --- a/src/panfrost/bifrost/test/bi_submit.c +++ b/src/panfrost/bifrost/test/bi_submit.c @@ -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; -- 2.30.2