diff options
author | Jason Ekstrand <[email protected]> | 2020-05-21 22:24:28 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-11 05:08:12 +0000 |
commit | 27b7b8992250252f319dfe75d7cf17e0355d368b (patch) | |
tree | c0f6268e73d066e3382f57f7072f0714e7500508 /src/gallium/drivers | |
parent | 92cfbb7d0ce3012684f07ace5b09c0a607258b62 (diff) |
iris: Better handle metadata in NIR passes
Reviewed-by: Kenneth Graunke <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5171>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/iris/iris_program.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index 98c1c3e93e7..4790ef34576 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -267,8 +267,10 @@ iris_lower_storage_image_derefs(nir_shader *nir) static bool iris_fix_edge_flags(nir_shader *nir) { - if (nir->info.stage != MESA_SHADER_VERTEX) + if (nir->info.stage != MESA_SHADER_VERTEX) { + nir_shader_preserve_all_metadata(nir); return false; + } nir_variable *var = NULL; nir_foreach_variable(v, &nir->outputs) { @@ -278,8 +280,10 @@ iris_fix_edge_flags(nir_shader *nir) } } - if (!var) + if (!var) { + nir_shader_preserve_all_metadata(nir); return false; + } exec_node_remove(&var->node); var->data.mode = nir_var_shader_temp; @@ -294,6 +298,8 @@ iris_fix_edge_flags(nir_shader *nir) nir_metadata_dominance | nir_metadata_live_ssa_defs | nir_metadata_loop_analysis); + } else { + nir_metadata_preserve(f->impl, nir_metadata_all); } } |