mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
iris: Convert to use nir_foreach_function_impl
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24040>
This commit is contained in:
parent
7471bc2574
commit
ec819a16b9
1 changed files with 7 additions and 12 deletions
|
|
@ -300,11 +300,8 @@ iris_lower_storage_image_derefs(nir_shader *nir)
|
|||
static bool
|
||||
iris_uses_image_atomic(const nir_shader *shader)
|
||||
{
|
||||
nir_foreach_function(function, shader) {
|
||||
if (function->impl == NULL)
|
||||
continue;
|
||||
|
||||
nir_foreach_block(block, function->impl) {
|
||||
nir_foreach_function_impl(impl, shader) {
|
||||
nir_foreach_block(block, impl) {
|
||||
nir_foreach_instr(instr, block) {
|
||||
if (instr->type != nir_instr_type_intrinsic)
|
||||
continue;
|
||||
|
|
@ -353,13 +350,11 @@ 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);
|
||||
}
|
||||
nir_foreach_function_impl(impl, nir) {
|
||||
nir_metadata_preserve(impl, nir_metadata_block_index |
|
||||
nir_metadata_dominance |
|
||||
nir_metadata_live_ssa_defs |
|
||||
nir_metadata_loop_analysis);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue