Mesa (main): lavapipe: set non-zero device/driver uuid
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Mar 9 15:52:04 UTC 2022
Module: Mesa
Branch: main
Commit: bf7777a5d4f42515a1bd9f681e28f74bfa2cc1de
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bf7777a5d4f42515a1bd9f681e28f74bfa2cc1de
Author: Michel Zou <xantares09 at hotmail.com>
Date: Thu Mar 3 07:12:05 2022 +0100
lavapipe: set non-zero device/driver uuid
Closes #5875
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15230>
---
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;
More information about the mesa-commit
mailing list