diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-04-01 16:45:09 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-05 23:26:04 +0000 |
commit | 40160c576d2c7f11e9690bb542a707a7cf0134af (patch) | |
tree | 4c72d884fbe361213707d8d2660074506732dc56 /src/panfrost | |
parent | 7c887d368e6d72f2b4d189a60a37ccee18b8a8cb (diff) |
pan/bit: Add verbose printing for tests
We'd like to dump both the generated IR (so we know exactly what's being
tested) as well as the compiled program (so we know what's running for
comparison).
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/bifrost/test/bi_test_pack.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/panfrost/bifrost/test/bi_test_pack.c b/src/panfrost/bifrost/test/bi_test_pack.c index c693f8509f5..36e392602f5 100644 --- a/src/panfrost/bifrost/test/bi_test_pack.c +++ b/src/panfrost/bifrost/test/bi_test_pack.c @@ -26,6 +26,8 @@ #include "bit.h" #include "bi_print.h" +#include "util/half_float.h" +#include "bifrost/disassemble.h" /* Instruction packing tests */ @@ -142,8 +144,15 @@ bit_test_single(struct panfrost_device *dev, panfrost_program prog; bi_pack(ctx, &prog.compiled); - return bit_vertex(dev, prog, input, 16, NULL, 0, + bool succ = bit_vertex(dev, prog, input, 16, NULL, 0, s.r, 16, debug); + + if (debug >= BIT_DEBUG_ALL || (!succ && debug >= BIT_DEBUG_FAIL)) { + bi_print_shader(ctx, stderr); + disassemble_bifrost(stderr, prog.compiled.data, prog.compiled.size, true); + } + + return succ; } /* Utilities for generating tests */ |