From ae521aaa2a42aed37ca741a4bb8b35c53e508fee Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 28 Sep 2022 20:24:14 +0100 Subject: [PATCH] radv: compile GS copy shader after geometry shader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This affects the pipeline feedback durations: GS copy shader compilation is now included in the GS compilation duration. Signed-off-by: Rhys Perry Reviewed-by: Timur Kristóf Part-of: --- src/amd/vulkan/radv_pipeline.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 92ca29ff46b..7ff863774dc 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -3657,13 +3657,6 @@ radv_pipeline_nir_to_asm(struct radv_pipeline *pipeline, struct radv_pipeline_st bool pipeline_has_ngg = last_vgt_api_stage != MESA_SHADER_NONE && stages[last_vgt_api_stage].info.is_ngg; - if (stages[MESA_SHADER_GEOMETRY].nir && !pipeline_has_ngg) { - pipeline->gs_copy_shader = - radv_pipeline_create_gs_copy_shader(pipeline, stages, pipeline_key, pipeline_layout, - keep_executable_info, keep_statistic_info, - gs_copy_binary); - } - for (int s = MESA_VULKAN_SHADER_STAGES - 1; s >= 0; s--) { if (!(active_stages & (1 << s)) || pipeline->shaders[s]) continue; @@ -3693,6 +3686,12 @@ radv_pipeline_nir_to_asm(struct radv_pipeline *pipeline, struct radv_pipeline_st pipeline_key, keep_executable_info, keep_statistic_info, &binaries[s]); + if (s == MESA_SHADER_GEOMETRY && !pipeline_has_ngg) { + pipeline->gs_copy_shader = radv_pipeline_create_gs_copy_shader( + pipeline, stages, pipeline_key, pipeline_layout, keep_executable_info, + keep_statistic_info, gs_copy_binary); + } + stages[s].feedback.duration += os_time_get_nano() - stage_start; active_stages &= ~(1 << shaders[0]->info.stage);