nir: add deref lowering sanity checking

This will be removed at the end of the transition, but add some tracking
plus asserts to help ensure that lowering passes are called at the
correct point (pre or post deref instruction lowering) as passes are
converted and the point where lower_deref_instrs() is called is moved.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Rob Clark
2018-05-16 10:02:55 -04:00
committed by Jason Ekstrand
parent 74212c2414
commit d80c342d89
36 changed files with 85 additions and 0 deletions

View File

@@ -287,6 +287,8 @@ nir_split_var_copies(nir_shader *shader)
{
bool progress = false;
nir_assert_lowered_derefs(shader, nir_lower_load_store_derefs);
nir_foreach_function(function, shader) {
if (function->impl)
progress = split_var_copies_impl(function->impl) || progress;