On Jun 15, 2020, at 7:07 AM, Zhiyi Zhang <zzhang(a)codeweavers.com> wrote:
On 6/13/20 3:04 AM, Brendan Shanks wrote:
On Jun 12, 2020, at 12:21 AM, Zhiyi Zhang <zzhang(a)codeweavers.com> wrote:
+static void set_luid_property( VkPhysicalDeviceProperties2 *properties, const LUID *luid ) +{ + VkPhysicalDeviceIDProperties *id; + VkBaseOutStructure *header; + + for (header = (VkBaseOutStructure *)properties; header; header = header->pNext) + { + if (header->sType != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES) + continue; + + id = (VkPhysicalDeviceIDProperties *)header; + memcpy( &id->deviceLUID, luid, sizeof(*luid) ); + id->deviceLUIDValid = VK_TRUE; + TRACE("Set LUID %08x:%08x for Vulkan physical device properties %p.\n", luid->HighPart, + luid->LowPart, properties); id->deviceNodeMask also must be set, probably to 1.
“If deviceLUIDValid is VK_TRUE, deviceNodeMask must contain exactly one bit. If Vulkan is running on an operating system that supports the Direct3D 12 API and physicalDevice corresponds to an individual device in a linked device adapter, deviceNodeMask identifies the Direct3D 12 node corresponding to physicalDevice. Otherwise, deviceNodeMask must be 1."
I think deviceNodeMask is already set.
At least the NVIDIA binary driver does seem to set it to 1, but the spec doesn’t guarantee that: "If deviceLUIDValid is VK_FALSE, the values of deviceLUID and deviceNodeMask are undefined.” Brendan