[Mesa-dev] [PATCH 3/7] anv/physical_device: Rename uuid to pipeline_cache_uuid

Jason Ekstrand jason at jlekstrand.net
Mon Feb 27 18:25:01 UTC 2017


We're about to have more UUIDs for different things so this one really
needs to be properly labeled.
---
 src/intel/vulkan/anv_device.c         | 5 +++--
 src/intel/vulkan/anv_pipeline_cache.c | 4 ++--
 src/intel/vulkan/anv_private.h        | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 26be55f..3609670 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -77,7 +77,7 @@ anv_physical_device_init_uuids(struct anv_physical_device *device)
    _mesa_sha1_update(sha1_ctx, build_id_data(note), build_id_len);
    _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;
 }
@@ -660,7 +660,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(
diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c
index a8ea80f..e40a6b4 100644
--- a/src/intel/vulkan/anv_pipeline_cache.c
+++ b/src/intel/vulkan/anv_pipeline_cache.c
@@ -350,7 +350,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;
@@ -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;
-   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;
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 2527c2c..a4fd707 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -530,7 +530,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;
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list