From: Marcin Ĺšlusarz Date: Fri, 21 Apr 2023 10:51:47 +0000 (+0200) Subject: anv: move nir_shader_gather_info to anv_pipeline_nir_preprocess X-Git-Tag: upstream/23.3.3~9634 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa45b13398547d7433479c91a5cf2ae904ef677e;p=platform%2Fupstream%2Fmesa.git anv: move nir_shader_gather_info to anv_pipeline_nir_preprocess Fixes dEQP-VK.mesh_shader.ext.misc.custom_attributes*. Fixes: 16c7c377186 ("anv: move preprocessing of NIR right before compilation") Reviewed-by: Lionel Landwerlin Part-of: --- diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 0744d5e..a8f5a2d 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -1815,12 +1815,6 @@ anv_graphics_pipeline_load_nir(struct anv_graphics_base_pipeline *pipeline, stages[s].imported.nir; } - /* We might not have a NIR version of shader if it's coming from a - * library. - */ - if (stages[s].nir != NULL) - nir_shader_gather_info(stages[s].nir, nir_shader_get_entrypoint(stages[s].nir)); - stages[s].feedback.duration += os_time_get_nano() - stage_start; } @@ -1896,6 +1890,8 @@ anv_pipeline_nir_preprocess(struct anv_pipeline *pipeline, nir_shader *nir) NIR_PASS(_, nir, nir_opt_dce); NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_shader_out, NULL); } + + nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir)); } static void