~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/compiler/nir/nir_opt_loop_unroll.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
662
662
   nir_cf_reinsert(lp_header, nir_after_block(nir_loop_last_block(loop)));
663
663
   nir_cf_reinsert(lp_body, nir_after_block(nir_loop_last_block(loop)));
664
664
 
665
 
   nir_builder b;
666
 
   nir_builder_init(&b, nir_cf_node_get_function(&loop->cf_node));
 
665
   nir_builder b = nir_builder_create(nir_cf_node_get_function(&loop->cf_node));
667
666
 
668
667
   nir_foreach_block_in_cf_node(block, &loop->cf_node) {
669
668
      nir_foreach_instr_safe(instr, block) {
1143
1142
 
1144
1143
   if (progress) {
1145
1144
      nir_metadata_preserve(impl, nir_metadata_none);
1146
 
      nir_lower_regs_to_ssa_impl(impl);
 
1145
      nir_lower_reg_intrinsics_to_ssa_impl(impl);
1147
1146
   } else {
1148
1147
      nir_metadata_preserve(impl, nir_metadata_all);
1149
1148
   }
1162
1161
 
1163
1162
   bool force_unroll_sampler_indirect = shader->options->force_indirect_unrolling_sampler;
1164
1163
   nir_variable_mode indirect_mask = shader->options->force_indirect_unrolling;
1165
 
   nir_foreach_function(function, shader) {
1166
 
      if (function->impl) {
1167
 
         progress |= nir_opt_loop_unroll_impl(function->impl, indirect_mask,
1168
 
                                              force_unroll_sampler_indirect);
1169
 
      }
 
1164
   nir_foreach_function_impl(impl, shader) {
 
1165
      progress |= nir_opt_loop_unroll_impl(impl, indirect_mask,
 
1166
                                           force_unroll_sampler_indirect);
1170
1167
   }
1171
1168
   return progress;
1172
1169
}