anv/physical_device: Rename uuid to pipeline_cache_uuid
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 27 Feb 2017 17:36:20 +0000 (09:36 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 28 Apr 2017 03:08:46 +0000 (20:08 -0700)
We're about to have more UUIDs for different things so this one really
needs to be properly labeled.

Reviewed-by: Chad Versace <chadversary@chromium.org>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_pipeline_cache.c
src/intel/vulkan/anv_private.h

index 767f7469d19e76def61349a2463981a20eeb7c71..4d0d613d61fb5ac76fc66e1f48507479cecbc72d 100644 (file)
@@ -121,7 +121,7 @@ anv_physical_device_init_uuids(struct anv_physical_device *device)
    _mesa_sha1_update(&sha1_ctx, &device->chipset_id,
                      sizeof(device->chipset_id));
    _mesa_sha1_final(&sha1_ctx, sha1);
-   memcpy(device->uuid, sha1, VK_UUID_SIZE);
+   memcpy(device->pipeline_cache_uuid, sha1, VK_UUID_SIZE);
 
    return VK_SUCCESS;
 }
@@ -721,7 +721,8 @@ void anv_GetPhysicalDeviceProperties(
    };
 
    strcpy(pProperties->deviceName, pdevice->name);
-   memcpy(pProperties->pipelineCacheUUID, pdevice->uuid, VK_UUID_SIZE);
+   memcpy(pProperties->pipelineCacheUUID,
+          pdevice->pipeline_cache_uuid, VK_UUID_SIZE);
 }
 
 void anv_GetPhysicalDeviceProperties2KHR(
index cdd8215b9b574df5bee6b977fbe51682258f4c95..3cfe3ec187ea63f79e025c7bab609c00e8e055fa 100644 (file)
@@ -351,7 +351,7 @@ anv_pipeline_cache_load(struct anv_pipeline_cache *cache,
       return;
    if (header.device_id != device->chipset_id)
       return;
-   if (memcmp(header.uuid, pdevice->uuid, VK_UUID_SIZE) != 0)
+   if (memcmp(header.uuid, pdevice->pipeline_cache_uuid, VK_UUID_SIZE) != 0)
       return;
 
    const void *end = data + size;
@@ -498,7 +498,7 @@ VkResult anv_GetPipelineCacheData(
    header->header_version = VK_PIPELINE_CACHE_HEADER_VERSION_ONE;
    header->vendor_id = 0x8086;
    header->device_id = device->chipset_id;
-   memcpy(header->uuid, pdevice->uuid, VK_UUID_SIZE);
+   memcpy(header->uuid, pdevice->pipeline_cache_uuid, VK_UUID_SIZE);
    p += align_u32(header->header_size, 8);
 
    uint32_t *count = p;
index 061bd1a5dfd9d19c98778ebc615cdb88fce24eef..506bab98c48e7406727683e4b01f044a983fc45e 100644 (file)
@@ -630,7 +630,7 @@ struct anv_physical_device {
     uint32_t                                    eu_total;
     uint32_t                                    subslice_total;
 
-    uint8_t                                     uuid[VK_UUID_SIZE];
+    uint8_t                                     pipeline_cache_uuid[VK_UUID_SIZE];
 
     struct wsi_device                       wsi_device;
     int                                         local_fd;