aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-11-14 10:22:17 -0800
committerKenneth Graunke <[email protected]>2019-11-14 14:50:11 -0800
commit4242c572275138ec832c6a450cbf8891268e15b8 (patch)
treec10aedbe984cbfc5c43a4f2b1a4df2c7440c2ccc /src/gallium/drivers
parent39c23fd1bbdac2015cb3a15f3baab9ea95b94031 (diff)
iris: Wrap iris_fix_edge_flags in NIR_PASS
So nir_validate happens properly. Unfortunately this means we have to play the metadata song and dance, so walk over all impls and say that we didn't hurt anything. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/iris/iris_program.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c
index 04f28a7dd8e..f2269a4a147 100644
--- a/src/gallium/drivers/iris/iris_program.c
+++ b/src/gallium/drivers/iris/iris_program.c
@@ -212,6 +212,15 @@ iris_fix_edge_flags(nir_shader *nir)
nir->info.inputs_read &= ~VERT_BIT_EDGEFLAG;
nir_fixup_deref_modes(nir);
+ nir_foreach_function(f, nir) {
+ if (f->impl) {
+ nir_metadata_preserve(f->impl, nir_metadata_block_index |
+ nir_metadata_dominance |
+ nir_metadata_live_ssa_defs |
+ nir_metadata_loop_analysis);
+ }
+ }
+
return true;
}
@@ -2017,7 +2026,7 @@ iris_create_uncompiled_shader(struct pipe_context *ctx,
if (!ish)
return NULL;
- ish->needs_edge_flag = iris_fix_edge_flags(nir);
+ NIR_PASS(ish->needs_edge_flag, nir, iris_fix_edge_flags);
brw_preprocess_nir(screen->compiler, nir, NULL);