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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user