mesa/src/compiler/glsl/tests
Emma Anholt 772cacff32 glsl: Write a new test for GLSL and NIR mediump lowering.
The mediump lowering tests are important for poking at the lowering pass
behavior, since you can't really assert the behavior in any given driver,
given that the GLSL spec allows any mediump op to be done in highp.

But, in hacking on mediump lowering, I wanted several things that the old
test couldn't do:

- Be able to assert about the actual NIR code we expect to generate for a
  hypothetical driver (important if other compiler stages might do invalid
  transformations like eliminating highp temps, or if we were to move the
  lowering after GLSL IR)
- Run faster (gtest unit tests rather than python forking off the standalone
  glsl compiler per testcase).
- Express expectations with a lot less escaping of typical syntax.
- High-quality logs for displaying failures.

This new test does all of that, I think, though I haven't converted all of
the unit tests over yet.  In converting, I dropped some of the
combinatorial explosion for float/int variations, instead only doing so
when it gets at some different code path (default precision flags).  I've
also included some new tests I wrote in the process of writing my proposed
gl_nir mediump lowering.

Even if the conversion isn't complete, getting these tests to run faster
is probably a good idea on its own, for anyone iterating running Mesa's
unit tests (80 tests in 25ms, compared to 109 tests in 1.5s!).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21886>
2023-03-22 22:52:45 +00:00
..
warnings
array_refcount_test.cpp glsl: pull mark_array_elements_referenced() out into common helper 2020-04-18 11:50:44 +00:00
builtin_variable_test.cpp Move compiler.h and imports.h/c from src/mesa/main into src/util 2020-03-27 21:00:09 +00:00
general_ir_test.cpp glsl: move off mtypes.h in lots of places. 2022-01-20 00:20:06 +00:00
list_iterators.cpp glsl: Fixes [-Wdeprecated-declarations] in list_iterators.cpp 2022-08-23 15:19:16 +00:00
lower_int64_test.cpp glsl: move off mtypes.h in lots of places. 2022-01-20 00:20:06 +00:00
lower_jump_cases.py glsl: Remove EmitNoLoops and the associated lower_jumps(lower_break=true) code. 2022-05-05 22:25:03 +00:00
lower_precision_test.py glsl: Write a new test for GLSL and NIR mediump lowering. 2023-03-22 22:52:45 +00:00
meson.build glsl: Write a new test for GLSL and NIR mediump lowering. 2023-03-22 22:52:45 +00:00
opt_add_neg_to_sub_test.cpp
optimization_test.py python: drop python2 support 2021-08-14 21:44:32 +00:00
sampler_types_test.cpp glsl: move off mtypes.h in lots of places. 2022-01-20 00:20:06 +00:00
sexps.py glsl/tests: remove some dead code 2021-08-14 21:44:32 +00:00
standalone_dump-builder.frag
test_gl_lower_mediump.cpp glsl: Write a new test for GLSL and NIR mediump lowering. 2023-03-22 22:52:45 +00:00
warnings_test.py python: drop python2 support 2021-08-14 21:44:32 +00:00