radv: skip shader cache if trap handler is enabled
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
This commit is contained in:
committed by
Marge Bot
parent
a58db214bb
commit
5ef8930636
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user