nir: Add test file for vars related passes

Add basic helpers for doing tests on the vars related optimization
passes.  The main goal is to lower the barrier to create tests during
development and debugging of the passes.  Full coverage is not a
requirement.

v2: Make find_next_intrinsic() skip blocks before 'after'. (Jason)
    Move nir_imm_ivec2() to nir_builder.h. (Jason)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Caio Marcelo de Oliveira Filho
2018-08-29 16:30:09 -07:00
parent c869646b7d
commit bbda2a17f7
3 changed files with 224 additions and 11 deletions

View File

@@ -245,4 +245,15 @@ if with_tests
link_with : libmesa_util,
)
)
test(
'nir_vars',
executable(
'nir_vars_test',
files('tests/vars_tests.cpp'),
cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
include_directories : [inc_common],
dependencies : [dep_thread, idep_gtest, idep_nir],
link_with : libmesa_util,
)
)
endif