From bf7777a5d4f42515a1bd9f681e28f74bfa2cc1de Mon Sep 17 00:00:00 2001 From: Michel Zou Date: Thu, 3 Mar 2022 07:12:05 +0100 Subject: [PATCH] lavapipe: set non-zero device/driver uuid Closes #5875 Reviewed-By: Mike Blumenkrantz Part-of: --- src/gallium/drivers/llvmpipe/lp_screen.c | 2 ++ src/gallium/frontends/lavapipe/lvp_device.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index b5977c8eae4..aeea451cf6d 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -572,12 +572,14 @@ static void llvmpipe_get_driver_uuid(struct pipe_screen *pscreen, char *uuid) { memset(uuid, 0, PIPE_UUID_SIZE); + snprintf(uuid, PIPE_UUID_SIZE, "llvmpipeUUID"); } static void llvmpipe_get_device_uuid(struct pipe_screen *pscreen, char *uuid) { memset(uuid, 0, PIPE_UUID_SIZE); + snprintf(uuid, PIPE_UUID_SIZE, "mesa" PACKAGE_VERSION); } static const struct nir_shader_compiler_options gallivm_nir_options = { diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 79974bcd5e7..b39afdca14f 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -851,8 +851,8 @@ lvp_get_physical_device_properties_1_1(struct lvp_physical_device *pdevice, { assert(p->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES); - memset(p->deviceUUID, 0, VK_UUID_SIZE); - memset(p->driverUUID, 0, VK_UUID_SIZE); + pdevice->pscreen->get_device_uuid(pdevice->pscreen, (char*)(p->deviceUUID)); + pdevice->pscreen->get_driver_uuid(pdevice->pscreen, (char*)(p->driverUUID)); memset(p->deviceLUID, 0, VK_LUID_SIZE); /* The LUID is for Windows. */ p->deviceLUIDValid = false;