diff --git a/src/virtio/vulkan/vn_physical_device.c b/src/virtio/vulkan/vn_physical_device.c index f70966a2000..2b0b28950cb 100644 --- a/src/virtio/vulkan/vn_physical_device.c +++ b/src/virtio/vulkan/vn_physical_device.c @@ -494,9 +494,16 @@ vn_physical_device_init_uuids(struct vn_physical_device *physical_dev) memcpy(props->driverUUID, sha1, VK_UUID_SIZE); - memset(props->deviceLUID, 0, VK_LUID_SIZE); - props->deviceNodeMask = 0; - props->deviceLUIDValid = false; + const struct vn_renderer *renderer = physical_dev->instance->renderer; + if (renderer->info.id.has_luid) { + props->deviceLUIDValid = true; + props->deviceNodeMask = renderer->info.id.node_mask; + memcpy(props->deviceLUID, renderer->info.id.luid, VK_LUID_SIZE); + } else { + memset(props->deviceLUID, 0, VK_LUID_SIZE); + props->deviceNodeMask = 0; + props->deviceLUIDValid = false; + } } static void diff --git a/src/virtio/vulkan/vn_renderer.h b/src/virtio/vulkan/vn_renderer.h index ee200081a02..3bd1f421324 100644 --- a/src/virtio/vulkan/vn_renderer.h +++ b/src/virtio/vulkan/vn_renderer.h @@ -53,6 +53,12 @@ struct vn_renderer_info { VkPhysicalDevicePCIBusInfoPropertiesEXT props; } pci; + struct { + bool has_luid; + uint32_t node_mask; + uint8_t luid[VK_LUID_SIZE]; + } id; + bool has_dma_buf_import; bool has_external_sync; bool has_implicit_fencing;