diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-04-01 12:59:53 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-05 23:26:04 +0000 |
commit | 82597c46c3df19ba04fcb6694a5f4874cdc916ec (patch) | |
tree | 72e524c5d471cada3dd8dcc38f46430cc95596e0 /src | |
parent | 1a1c55709e486df80cd05e23a7a1b312d0066c0f (diff) |
pan/bit: Add mode to run unit tests
Probably the most useful of the bunch going forward.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/bifrost/cmdline.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/cmdline.c b/src/panfrost/bifrost/cmdline.c index f82c613115b..e640a898f76 100644 --- a/src/panfrost/bifrost/cmdline.c +++ b/src/panfrost/bifrost/cmdline.c @@ -124,6 +124,16 @@ test_vertex(char **argv) } static void +tests(void) +{ + void *memctx = NULL; /* TODO */ + struct panfrost_device *dev = bit_initialize(memctx); + bit_fmod(dev, BIT_DEBUG_FAIL); + bit_fma(dev, BIT_DEBUG_FAIL); + bit_csel(dev, BIT_DEBUG_FAIL); +} + +static void run(const char *filename) { FILE *fp = fopen(filename, "rb"); @@ -169,6 +179,8 @@ main(int argc, char **argv) disassemble(argv[2], false); else if (strcmp(argv[1], "disasm-verbose") == 0) disassemble(argv[2], true); + else if (strcmp(argv[1], "tests") == 0) + tests(); else if (strcmp(argv[1], "test-vertex") == 0) test_vertex(&argv[2]); else if (strcmp(argv[1], "run") == 0) |