venus: Expose deviceLUID in props if available

v2: wrap props within id props and use snake case naming

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969>
This commit is contained in:
anonymix007
2025-11-30 18:28:06 +03:00
committed by Marge Bot
parent 1aa273ae57
commit 342605f9b1
2 changed files with 16 additions and 3 deletions

View File

@@ -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

View File

@@ -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;