diff options
author | Emil Velikov <[email protected]> | 2016-11-24 20:30:38 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-11-28 19:46:05 +0000 |
commit | de138e9cede4b1996fac9256d894c80e7b48a6d7 (patch) | |
tree | c8b97b1c50dbbb89363cbee147422b10e44c403c /src/intel/vulkan/anv_pipeline_cache.c | |
parent | 3f9397753b9db577ad41ff1e8e72d9ae90401261 (diff) |
anv: Store UUID in physical device.
Port of an equivalent commit for radv.
v2: Move the call just after MMAP_VERSION (Ken).
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_pipeline_cache.c')
-rw-r--r-- | src/intel/vulkan/anv_pipeline_cache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c index ddd51dbfd77..a8ea80f51f5 100644 --- a/src/intel/vulkan/anv_pipeline_cache.c +++ b/src/intel/vulkan/anv_pipeline_cache.c @@ -333,8 +333,8 @@ anv_pipeline_cache_load(struct anv_pipeline_cache *cache, const void *data, size_t size) { struct anv_device *device = cache->device; + struct anv_physical_device *pdevice = &device->instance->physicalDevice; struct cache_header header; - uint8_t uuid[VK_UUID_SIZE]; if (cache->cache == NULL) return; @@ -350,8 +350,7 @@ anv_pipeline_cache_load(struct anv_pipeline_cache *cache, return; if (header.device_id != device->chipset_id) return; - anv_device_get_cache_uuid(uuid); - if (memcmp(header.uuid, uuid, VK_UUID_SIZE) != 0) + if (memcmp(header.uuid, pdevice->uuid, VK_UUID_SIZE) != 0) return; const void *end = data + size; @@ -470,6 +469,7 @@ VkResult anv_GetPipelineCacheData( { ANV_FROM_HANDLE(anv_device, device, _device); ANV_FROM_HANDLE(anv_pipeline_cache, cache, _cache); + struct anv_physical_device *pdevice = &device->instance->physicalDevice; struct cache_header *header; if (pData == NULL) { @@ -497,7 +497,7 @@ VkResult anv_GetPipelineCacheData( header->header_version = VK_PIPELINE_CACHE_HEADER_VERSION_ONE; header->vendor_id = 0x8086; header->device_id = device->chipset_id; - anv_device_get_cache_uuid(header->uuid); + memcpy(header->uuid, pdevice->uuid, VK_UUID_SIZE); p += align_u32(header->header_size, 8); uint32_t *count = p; |