diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 37251e33d5c..ce0311f0f95 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -869,12 +869,10 @@ static void radv_device_init_cache_key(struct radv_device *device) { const struct radv_physical_device *pdev = radv_device_physical(device); - const struct radv_instance *instance = radv_physical_device_instance(pdev); struct radv_device_cache_key *key = &device->cache_key; struct mesa_blake3 ctx; key->keep_shader_info = device->keep_shader_info; - key->trap_excp_flags = device->trap_handler_shader && instance->trap_excp_flags; 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 9b5dd9352bc..8c41cc76e55 100644 --- a/src/amd/vulkan/radv_device.h +++ b/src/amd/vulkan/radv_device.h @@ -61,9 +61,8 @@ struct radv_device_cache_key { uint32_t image_2d_view_of_3d : 1; uint32_t mesh_shader_queries : 1; uint32_t primitives_generated_query : 1; - uint32_t trap_excp_flags : 4; - uint32_t reserved : 24; + uint32_t reserved : 28; }; enum radv_force_vrs { diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index cbdcc033f29..c8a9e9a032e 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -64,11 +64,12 @@ radv_pipeline_skip_shaders_cache(const struct radv_device *device, const struct const struct radv_instance *instance = radv_physical_device_instance(pdev); /* Skip the shaders cache when any of the below are true: + * - trap handler is present * - shaders are dumped for debugging (RADV_DEBUG=shaders) * - shaders IR are captured (NIR, backend IR and ASM) * - binaries are captured (driver shouldn't store data to an internal cache) */ - return (instance->debug_flags & RADV_DEBUG_DUMP_SHADERS) || + return device->trap_handler_shader || (instance->debug_flags & RADV_DEBUG_DUMP_SHADERS) || (pipeline->create_flags & (VK_PIPELINE_CREATE_2_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR | VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR)); }