From 6c2d6144128feb9f096e79e326edfd3abeb923c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 7 Oct 2025 10:31:12 +0200 Subject: [PATCH] radv: hash keep_executable_info into shader key rather than device cache key for consistency. Part-of: --- src/amd/vulkan/radv_device.c | 1 - src/amd/vulkan/radv_device.h | 3 +-- src/amd/vulkan/radv_pipeline.c | 1 + src/amd/vulkan/radv_shader.h | 3 ++- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index ce0311f0f95..df34ce4282a 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -872,7 +872,6 @@ radv_device_init_cache_key(struct radv_device *device) struct radv_device_cache_key *key = &device->cache_key; struct mesa_blake3 ctx; - key->keep_shader_info = device->keep_shader_info; key->image_2d_view_of_3d = device->vk.enabled_features.image2DViewOf3D && pdev->info.gfx_level == GFX9; key->mesh_shader_queries = device->vk.enabled_features.meshShaderQueries && pdev->emulate_mesh_shader_queries; key->primitives_generated_query = radv_uses_primitives_generated_query(device); diff --git a/src/amd/vulkan/radv_device.h b/src/amd/vulkan/radv_device.h index 8c41cc76e55..ad693b633f9 100644 --- a/src/amd/vulkan/radv_device.h +++ b/src/amd/vulkan/radv_device.h @@ -57,12 +57,11 @@ struct radv_layer_dispatch_tables { }; struct radv_device_cache_key { - uint32_t keep_shader_info : 1; uint32_t image_2d_view_of_3d : 1; uint32_t mesh_shader_queries : 1; uint32_t primitives_generated_query : 1; - uint32_t reserved : 28; + uint32_t reserved : 29; }; enum radv_force_vrs { diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index c8a9e9a032e..35e204ffea3 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -134,6 +134,7 @@ radv_pipeline_get_shader_key(const struct radv_device *device, const VkPipelineS struct radv_shader_stage_key key = {0}; key.keep_statistic_info = radv_pipeline_capture_shader_stats(device, flags); + key.keep_executable_info = radv_pipeline_capture_shaders(device, flags); if (flags & VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT) key.optimisations_disabled = 1; diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index ef23a1b35d5..fb6e43bb243 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -78,6 +78,7 @@ struct radv_shader_stage_key { uint8_t optimisations_disabled : 1; uint8_t keep_statistic_info : 1; + uint8_t keep_executable_info : 1; uint8_t view_index_from_device_index : 1; /* Shader version (up to 8) to force re-compilation when RADV_BUILD_ID_OVERRIDE is enabled. */ @@ -89,7 +90,7 @@ struct radv_shader_stage_key { /* Whether the shader is used with indirect pipeline binds. */ uint8_t indirect_bindable : 1; - uint32_t reserved : 18; + uint32_t reserved : 17; }; struct radv_ps_epilog_key {