diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 7819d2e23ff..cb4e754d512 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -837,7 +837,7 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm */ char buf[VK_UUID_SIZE * 2 + 1]; disk_cache_format_hex_id(buf, device->cache_uuid, VK_UUID_SIZE * 2); - device->disk_cache = disk_cache_create(device->name, buf, 0); + device->vk.disk_cache = disk_cache_create(device->name, buf, 0); #endif if (!radv_is_conformant(device)) @@ -949,7 +949,7 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm fail_perfcounters: ac_destroy_perfcounters(&device->ac_perfcounters); - disk_cache_destroy(device->disk_cache); + disk_cache_destroy(device->vk.disk_cache); #ifdef ENABLE_SHADER_CACHE fail_wsi: #endif @@ -974,7 +974,7 @@ radv_physical_device_destroy(struct vk_physical_device *vk_device) radv_finish_wsi(device); ac_destroy_perfcounters(&device->ac_perfcounters); device->ws->destroy(device->ws); - disk_cache_destroy(device->disk_cache); + disk_cache_destroy(device->vk.disk_cache); if (device->local_fd != -1) close(device->local_fd); if (device->master_fd != -1) diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cache.c index bb033d70457..47eb98f1d53 100644 --- a/src/amd/vulkan/radv_pipeline_cache.c +++ b/src/amd/vulkan/radv_pipeline_cache.c @@ -340,16 +340,16 @@ radv_create_shaders_from_pipeline_cache( /* Don't cache when we want debug info, since this isn't * present in the cache. */ - if (radv_is_cache_disabled(device) || !device->physical_device->disk_cache) { + if (radv_is_cache_disabled(device) || !device->physical_device->vk.disk_cache) { radv_pipeline_cache_unlock(cache); return false; } uint8_t disk_sha1[20]; - disk_cache_compute_key(device->physical_device->disk_cache, sha1, 20, disk_sha1); + disk_cache_compute_key(device->physical_device->vk.disk_cache, sha1, 20, disk_sha1); entry = - (struct cache_entry *)disk_cache_get(device->physical_device->disk_cache, disk_sha1, NULL); + (struct cache_entry *)disk_cache_get(device->physical_device->vk.disk_cache, disk_sha1, NULL); if (!entry) { radv_pipeline_cache_unlock(cache); return false; @@ -541,11 +541,11 @@ radv_pipeline_cache_insert_shaders(struct radv_device *device, struct radv_pipel * * Make sure to exclude meta shaders because they are stored in a different cache file. */ - if (device->physical_device->disk_cache && cache != &device->meta_state.cache) { + if (device->physical_device->vk.disk_cache && cache != &device->meta_state.cache) { uint8_t disk_sha1[20]; - disk_cache_compute_key(device->physical_device->disk_cache, sha1, 20, disk_sha1); + disk_cache_compute_key(device->physical_device->vk.disk_cache, sha1, 20, disk_sha1); - disk_cache_put(device->physical_device->disk_cache, disk_sha1, entry, entry_size(entry), + disk_cache_put(device->physical_device->vk.disk_cache, disk_sha1, entry, entry_size(entry), NULL); } diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 4aa9f262d89..40647e13078 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -302,11 +302,6 @@ struct radv_physical_device { /* Whether to emulate ETC2 image support on HW without support. */ bool emulate_etc2; - /* This is the drivers on-disk cache used as a fallback as opposed to - * the pipeline cache defined by apps. - */ - struct disk_cache *disk_cache; - VkPhysicalDeviceMemoryProperties memory_properties; enum radeon_bo_domain memory_domains[VK_MAX_MEMORY_TYPES]; enum radeon_bo_flag memory_flags[VK_MAX_MEMORY_TYPES];