From 20fdbc7a44a029687a89c064660dfd9a61ee8ff4 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 12 Jan 2024 10:02:40 +0100 Subject: [PATCH] radv: add keep_statistic_info to radv_shader_stage_key Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_pipeline.c | 4 ++-- src/amd/vulkan/radv_shader.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 95b6a389b40..e06a62585c3 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -152,6 +152,8 @@ radv_generate_pipeline_key(const struct radv_device *device, const VkPipelineSha memset(&key, 0, sizeof(key)); for (unsigned i = 0; i < MESA_VULKAN_SHADER_STAGES; i++) { + key.stage_info[i].keep_statistic_info = radv_pipeline_capture_shader_stats(device, flags); + if (flags & VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT_KHR) key.stage_info[i].optimisations_disabled = 1; } @@ -209,8 +211,6 @@ radv_generate_pipeline_key(const struct radv_device *device, const VkPipelineSha key.stage_info[stage].vertex_robustness1 = 1u; } - key.keep_statistic_info = radv_pipeline_capture_shader_stats(device, flags); - return key; } diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 07b3a736f08..b6ca899a88f 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -95,6 +95,7 @@ struct radv_shader_stage_key { uint8_t vertex_robustness1 : 1; uint8_t optimisations_disabled : 1; + uint8_t keep_statistic_info : 1; }; struct radv_ps_epilog_key { @@ -170,8 +171,6 @@ struct radv_graphics_state_key { struct radv_pipeline_key { struct radv_graphics_state_key gfx_state; - uint32_t keep_statistic_info : 1; - /* Pipeline shader version (up to 8) to force re-compilation when RADV_BUILD_ID_OVERRIDE is enabled. */ uint32_t shader_version : 3;