From fc44be97628d52e68aa7a6fb898177bfad4f64ae Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 10 Apr 2026 15:20:59 +0300 Subject: [PATCH] anv: run a single impl loop for apply_pipeline_layout Signed-off-by: Lionel Landwerlin Reviewed-by: Kenneth Graunke Part-of: --- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index 3fab08bb495..5e731b154c0 100644 --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c @@ -2536,17 +2536,11 @@ anv_nir_apply_pipeline_layout(nir_shader *shader, lower_direct_buffer_instr, nir_metadata_control_flow, &state); - } + /* We just got rid of all the direct access. Delete it so it's not in the + * way when we do our indirect lowering. + */ + progress |= nir_opt_dce_impl(impl); - /* We just got rid of all the direct access. Delete it so it's not in the - * way when we do our indirect lowering. - */ - progress |= nir_opt_dce(shader); - - nir_foreach_function_impl(impl, shader) { - nir_builder _b = nir_builder_at(nir_before_impl(impl)), *b = &_b; - state.set_idx_to_bti = build_descriptor_sets_bti_array(b, &state); - state.set_idx_to_offset = build_descriptor_sets_offset_array(b, &state); progress |= nir_function_instructions_pass(impl, apply_pipeline_layout, nir_metadata_control_flow,