mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
radv: initialize disk cache slightly later when creating a physical device
This will allow us to use a per physical device cache key. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27632>
This commit is contained in:
parent
0543394bfa
commit
c303d399ff
1 changed files with 12 additions and 12 deletions
|
|
@ -1956,18 +1956,6 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm
|
|||
snprintf(device->marketing_name, sizeof(device->name), "%s (RADV %s%s)",
|
||||
marketing_name ? marketing_name : "AMD Unknown", device->rad_info.name, radv_get_compiler_string(device));
|
||||
|
||||
if (radv_device_get_cache_uuid(device, device->cache_uuid)) {
|
||||
result = vk_errorf(instance, VK_ERROR_INITIALIZATION_FAILED, "cannot generate UUID");
|
||||
goto fail_wsi;
|
||||
}
|
||||
|
||||
/* The gpu id is already embedded in the uuid so we just pass "radv"
|
||||
* when creating the cache.
|
||||
*/
|
||||
char buf[VK_UUID_SIZE * 2 + 1];
|
||||
mesa_bytes_to_hex(buf, device->cache_uuid, VK_UUID_SIZE);
|
||||
device->vk.disk_cache = disk_cache_create(device->name, buf, 0);
|
||||
|
||||
if (!radv_is_conformant(device))
|
||||
vk_warn_non_conformant_implementation("radv");
|
||||
|
||||
|
|
@ -2060,6 +2048,18 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm
|
|||
}
|
||||
#endif
|
||||
|
||||
if (radv_device_get_cache_uuid(device, device->cache_uuid)) {
|
||||
result = vk_errorf(instance, VK_ERROR_INITIALIZATION_FAILED, "cannot generate UUID");
|
||||
goto fail_wsi;
|
||||
}
|
||||
|
||||
/* The gpu id is already embedded in the uuid so we just pass "radv"
|
||||
* when creating the cache.
|
||||
*/
|
||||
char buf[VK_UUID_SIZE * 2 + 1];
|
||||
mesa_bytes_to_hex(buf, device->cache_uuid, VK_UUID_SIZE);
|
||||
device->vk.disk_cache = disk_cache_create(device->name, buf, 0);
|
||||
|
||||
radv_get_physical_device_properties(device);
|
||||
|
||||
if ((device->instance->debug_flags & RADV_DEBUG_INFO))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue