And other misc fixes.
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winevulkan/vulkan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 41798034c4d..b748f8cba98 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -512,9 +512,7 @@ static VkResult wine_vk_instance_convert_create_info(struct conversion_context * debug_utils_messenger->pUserData = &object->utils_messengers[i]; }
- debug_report_callback = find_next_struct(header->pNext, - VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT); - if (debug_report_callback) + if ((debug_report_callback = find_next_struct(dst->pNext, VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT))) { object->default_callback.instance = object; object->default_callback.debug_callback = VK_NULL_HANDLE;
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winevulkan/vulkan.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index df109e5c84a..41798034c4d 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -735,6 +735,7 @@ VkResult wine_vkCreateDevice(VkPhysicalDevice phys_dev_handle, const VkDeviceCre void *client_ptr) { struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(phys_dev_handle); + struct wine_instance *instance = phys_dev->instance; VkDevice device_handle = client_ptr; VkDeviceCreateInfo create_info_host; struct VkQueue_T *queue_handles; @@ -751,7 +752,7 @@ VkResult wine_vkCreateDevice(VkPhysicalDevice phys_dev_handle, const VkDeviceCre { VkPhysicalDeviceProperties properties;
- phys_dev->instance->funcs.p_vkGetPhysicalDeviceProperties(phys_dev->phys_dev, &properties); + instance->funcs.p_vkGetPhysicalDeviceProperties(phys_dev->phys_dev, &properties);
TRACE("Device name: %s.\n", debugstr_a(properties.deviceName)); TRACE("Vendor ID: %#x, Device ID: %#x.\n", properties.vendorID, properties.deviceID); @@ -766,10 +767,10 @@ VkResult wine_vkCreateDevice(VkPhysicalDevice phys_dev_handle, const VkDeviceCre init_conversion_context(&ctx); res = wine_vk_device_convert_create_info(phys_dev, &ctx, create_info, &create_info_host); if (res == VK_SUCCESS) - res = phys_dev->instance->funcs.p_vkCreateDevice(phys_dev->phys_dev, - &create_info_host, NULL /* allocator */, &object->device); + res = instance->funcs.p_vkCreateDevice(phys_dev->phys_dev, &create_info_host, + NULL /* allocator */, &object->device); free_conversion_context(&ctx); - WINE_VK_ADD_DISPATCHABLE_MAPPING(phys_dev->instance, device_handle, object->device, object); + WINE_VK_ADD_DISPATCHABLE_MAPPING(instance, device_handle, object->device, object); if (res != VK_SUCCESS) { WARN("Failed to create device, res=%d.\n", res); @@ -815,7 +816,7 @@ VkResult wine_vkCreateDevice(VkPhysicalDevice phys_dev_handle, const VkDeviceCre next_queue += queue_count; }
- device_handle->quirks = phys_dev->instance->quirks; + device_handle->quirks = instance->quirks; device_handle->base.unix_handle = (uintptr_t)object; *ret_device = device_handle; TRACE("Created device %p (native device %p).\n", object, object->device);
From: Rémi Bernon rbernon@codeweavers.com
It's not set anywhere. --- dlls/winevulkan/vulkan.c | 7 ++----- dlls/winevulkan/vulkan_loader.h | 1 - 2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index b748f8cba98..76427251753 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -526,11 +526,8 @@ static VkResult wine_vk_instance_convert_create_info(struct conversion_context * /* ICDs don't support any layers, so nothing to copy. Modern versions of the loader * filter this data out as well. */ - if (object->quirks & WINEVULKAN_QUIRK_IGNORE_EXPLICIT_LAYERS) { - dst->enabledLayerCount = 0; - dst->ppEnabledLayerNames = NULL; - WARN("Ignoring explicit layers!\n"); - } else if (dst->enabledLayerCount) { + if (dst->enabledLayerCount) + { FIXME("Loading explicit layers is not supported by winevulkan!\n"); return VK_ERROR_LAYER_NOT_PRESENT; } diff --git a/dlls/winevulkan/vulkan_loader.h b/dlls/winevulkan/vulkan_loader.h index 4e606624819..6f62201f503 100644 --- a/dlls/winevulkan/vulkan_loader.h +++ b/dlls/winevulkan/vulkan_loader.h @@ -40,7 +40,6 @@
#define WINEVULKAN_QUIRK_GET_DEVICE_PROC_ADDR 0x00000001 #define WINEVULKAN_QUIRK_ADJUST_MAX_IMAGE_COUNT 0x00000002 -#define WINEVULKAN_QUIRK_IGNORE_EXPLICIT_LAYERS 0x00000004
/* Base 'class' for our Vulkan dispatchable objects such as VkDevice and VkInstance. * This structure MUST be the first element of a dispatchable object as the ICD
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winevulkan/make_vulkan | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 9163f543c15..314b642bc83 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -23,7 +23,6 @@ import argparse import logging import os import re -import sys import urllib.request import xml.etree.ElementTree as ET from collections import OrderedDict @@ -2124,7 +2123,6 @@ class VkStruct(Sequence): if self.name in ["VkOpticalFlowSessionCreateInfoNV", "VkDescriptorBufferBindingInfoEXT"]: is_const = True - needs_output_copy = False
for e in self.struct_extensions: if not e.required: @@ -2574,7 +2572,7 @@ class ArrayConversionFunction(object): body += " else\n" body += " out[i] = NULL;\n" else: - body += " out[i] = UlongToPtr(in[i]);\n".format(win_type) + body += " out[i] = UlongToPtr(in[i]);\n" elif self.array.is_handle(): if self.array.pointer_array: LOGGER.error("Unhandled handle pointer arrays") @@ -3701,7 +3699,7 @@ class VkRegistry(object): # Since we already parsed the enum before, just link it in. try: type_info["data"] = self.enums[name] - except KeyError as e: + except KeyError: # Not all enums seem to be defined yet, typically that's for # ones ending in 'FlagBits' where future extensions may add # definitions.
This merge request was approved by Jacek Caban.