mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 14:10:37 +02:00
agx: Add minifloat tests
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10582>
This commit is contained in:
parent
c89ab07996
commit
8191adb0d9
1 changed files with 14 additions and 0 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include "compiler/nir_types.h"
|
||||
#include "util/u_dynarray.h"
|
||||
#include "agx_compile.h"
|
||||
#include "agx_minifloat.h"
|
||||
|
||||
static int
|
||||
st_packed_uniforms_type_size(const struct glsl_type *type, bool bindless)
|
||||
|
|
@ -206,6 +207,17 @@ disassemble(const char *filename, bool verbose)
|
|||
free(code);
|
||||
}
|
||||
|
||||
static void
|
||||
tests()
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
agx_minifloat_tests();
|
||||
printf("Pass.\n");
|
||||
#else
|
||||
fprintf(stderr, "tests not compiled in NDEBUG mode");
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
|
|
@ -220,6 +232,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], "test") == 0)
|
||||
tests();
|
||||
else
|
||||
unreachable("Unknown command. Valid: compile/disasm/disasm-verbose");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue