diff --git a/.pick_status.json b/.pick_status.json index 0d4914a2854..26065a21c24 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2074,7 +2074,7 @@ "description": "radv: Make shader related destruction happen before hw_ctx.", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 2b2b90e17c7..12c0c5dbaad 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -1166,6 +1166,12 @@ radv_DestroyDevice(VkDevice _device, const VkAllocationCallbacks *pAllocator) _mesa_hash_table_destroy(device->rt_handles, NULL); + radv_device_finish_meta(device); + + vk_pipeline_cache_destroy(device->mem_cache, NULL); + + radv_destroy_shader_upload_queue(device); + for (unsigned i = 0; i < RADV_NUM_HW_CTX; i++) { if (device->hw_ctx[i]) device->ws->ctx_destroy(device->hw_ctx[i]); @@ -1176,12 +1182,6 @@ radv_DestroyDevice(VkDevice _device, const VkAllocationCallbacks *pAllocator) simple_mtx_destroy(&device->trace_mtx); simple_mtx_destroy(&device->rt_handles_mtx); - radv_device_finish_meta(device); - - vk_pipeline_cache_destroy(device->mem_cache, NULL); - - radv_destroy_shader_upload_queue(device); - radv_trap_handler_finish(device); radv_finish_trace(device);