From e3c0f6b3cedd7b27087976fddd6bbe6fd33fd84d Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Fri, 12 Aug 2022 11:32:54 +0800 Subject: [PATCH] vulkan-1/tests: Fix test failures on llvmpipe. This happens because the llvmpipe virtual GPU is not in the RandR provider list when there is a hardware GPU driving the screen. So LUID for the llvmpipe is not generated in such cases. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52931 Signed-off-by: Zhiyi Zhang --- dlls/vulkan-1/tests/vulkan.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/vulkan-1/tests/vulkan.c b/dlls/vulkan-1/tests/vulkan.c index 11d20120d1d..b9a36a55653 100644 --- a/dlls/vulkan-1/tests/vulkan.c +++ b/dlls/vulkan-1/tests/vulkan.c @@ -212,11 +212,16 @@ static void test_enumerate_physical_device2(void) trace("Device '%s', device UUID: %s, driver UUID: %s, device LUID: %08lx:%08lx.\n", properties2.properties.deviceName, wine_dbgstr_guid((const GUID *)id.deviceUUID), wine_dbgstr_guid((const GUID *)id.driverUUID), luid->HighPart, luid->LowPart); + todo_wine_if(!id.deviceLUIDValid && strstr(properties2.properties.deviceName, "llvmpipe")) ok(id.deviceLUIDValid == VK_TRUE, "Expected valid device LUID.\n"); - /* If deviceLUIDValid is VK_TRUE, deviceNodeMask must contain exactly one bit according - * to the Vulkan specification */ - ok(id.deviceNodeMask && !(id.deviceNodeMask & (id.deviceNodeMask - 1)), - "Expect deviceNodeMask to have only one bit set, got %#x.\n", id.deviceNodeMask); + if (id.deviceLUIDValid == VK_TRUE) + { + /* If deviceLUIDValid is VK_TRUE, deviceNodeMask must contain exactly one bit + * according to the Vulkan specification */ + ok(id.deviceNodeMask && !(id.deviceNodeMask & (id.deviceNodeMask - 1)), + "Expect deviceNodeMask to have only one bit set, got %#x.\n", + id.deviceNodeMask); + } } }