Tested with Vulkan CTS and WINEVULKAN_QUIRK_IGNORE_EXPLICIT_LAYERS.
Signed-off-by: Liam Middlebrook lmiddlebrook@nvidia.com Signed-off-by: Daniel Koch dkoch@nvidia.com --- v2: fixup comment style
dlls/winevulkan/vulkan.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index a8beef126bd..19093d47390 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -662,6 +662,7 @@ VkResult WINAPI wine_vkCreateInstance(const VkInstanceCreateInfo *create_info, const VkApplicationInfo *app_info; struct VkInstance_T *object; VkResult res; + HKEY key;
TRACE("create_info %p, allocator %p, instance %p\n", create_info, allocator, instance);
@@ -679,6 +680,22 @@ VkResult WINAPI wine_vkCreateInstance(const VkInstanceCreateInfo *create_info, } object->base.loader_magic = VULKAN_ICD_MAGIC_VALUE;
+ /* Load optional WineVulkan quirks bits from registry, see vulkan_private.h + * for a list of quirks. + */ + if (RegOpenKeyA(HKEY_CURRENT_USER, "Software\Wine\Vulkan", &key) == 0) + { + DWORD type, value, size; + size = sizeof(value); + if (RegQueryValueExA(key, "Quirks", NULL, &type, (LPBYTE)&value, &size) == 0 + && type == REG_DWORD) + { + object->quirks = value; + TRACE("Loaded Quirks value %x\n", value); + } + RegCloseKey(key); + } + res = wine_vk_instance_convert_create_info(create_info, &create_info_host, object); if (res != VK_SUCCESS) {