summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_device.c
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-11-24 20:30:38 +0000
committerEmil Velikov <[email protected]>2016-11-28 19:46:05 +0000
commitde138e9cede4b1996fac9256d894c80e7b48a6d7 (patch)
treec8b97b1c50dbbb89363cbee147422b10e44c403c /src/intel/vulkan/anv_device.c
parent3f9397753b9db577ad41ff1e8e72d9ae90401261 (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_device.c')
-rw-r--r--src/intel/vulkan/anv_device.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 51f0dc4185b..d5fbb8c8324 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -53,6 +53,13 @@ compiler_perf_log(void *data, const char *fmt, ...)
va_end(args);
}
+static void
+anv_device_get_cache_uuid(void *uuid)
+{
+ memset(uuid, 0, VK_UUID_SIZE);
+ snprintf(uuid, VK_UUID_SIZE, "anv-%s", ANV_TIMESTAMP);
+}
+
static VkResult
anv_physical_device_init(struct anv_physical_device *device,
struct anv_instance *instance,
@@ -134,6 +141,7 @@ anv_physical_device_init(struct anv_physical_device *device,
goto fail;
}
+ anv_device_get_cache_uuid(device->uuid);
bool swizzled = anv_gem_get_bit6_swizzle(fd, I915_TILING_X);
/* GENs prior to 8 do not support EU/Subslice info */
@@ -454,13 +462,6 @@ void anv_GetPhysicalDeviceFeatures(
pdevice->compiler->scalar_stage[MESA_SHADER_GEOMETRY];
}
-void
-anv_device_get_cache_uuid(void *uuid)
-{
- memset(uuid, 0, VK_UUID_SIZE);
- snprintf(uuid, VK_UUID_SIZE, "anv-%s", ANV_TIMESTAMP);
-}
-
void anv_GetPhysicalDeviceProperties(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties* pProperties)
@@ -601,7 +602,7 @@ void anv_GetPhysicalDeviceProperties(
};
strcpy(pProperties->deviceName, pdevice->name);
- anv_device_get_cache_uuid(pProperties->pipelineCacheUUID);
+ memcpy(pProperties->pipelineCacheUUID, pdevice->uuid, VK_UUID_SIZE);
}
void anv_GetPhysicalDeviceQueueFamilyProperties(