Signed-off-by: Georg Lehmann dadschoorse@gmail.com --- dlls/winevulkan/make_vulkan | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 9ef863837d1..f758a58c935 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -64,7 +64,7 @@ from enum import Enum LOGGER = logging.Logger("vulkan") LOGGER.addHandler(logging.StreamHandler())
-VK_XML_VERSION = "1.2.178" +VK_XML_VERSION = "1.2.182" WINE_VK_VERSION = (1, 2)
# Filenames to create. @@ -108,6 +108,7 @@ UNSUPPORTED_EXTENSIONS = [ # Extensions for other platforms "VK_EXT_external_memory_dma_buf", "VK_EXT_image_drm_format_modifier", + "VK_EXT_physical_device_drm", "VK_KHR_external_fence_fd", "VK_KHR_external_memory_fd", "VK_KHR_external_semaphore_fd", @@ -115,6 +116,9 @@ UNSUPPORTED_EXTENSIONS = [ # Extensions which require callback handling "VK_EXT_device_memory_report",
+ # Extensions which are broken + "VK_HUAWEI_subpass_shading", # https://github.com/KhronosGroup/Vulkan-Docs/issues/1564 + # Deprecated extensions "VK_NV_external_memory_capabilities", "VK_NV_external_memory_win32",
Signed-off-by: Georg Lehmann dadschoorse@gmail.com --- dlls/winevulkan/make_vulkan | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index f758a58c935..662f1c8144e 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -1414,12 +1414,13 @@ class VkMember(object): class VkParam(object): """ Helper class which describes a parameter to a function call. """
- def __init__(self, type_info, const=None, pointer=None, name=None, array_len=None, dyn_array_len=None): + def __init__(self, type_info, const=None, pointer=None, name=None, array_len=None, dyn_array_len=None, object_type=None): self.const = const self.name = name self.array_len = array_len self.dyn_array_len = dyn_array_len self.pointer = pointer + self.object_type = object_type self.type_info = type_info self.type = type_info["name"] # For convenience self.handle = type_info["data"] if type_info["category"] == "handle" else None @@ -1457,12 +1458,15 @@ class VkParam(object): type_elem = param.find("type") pointer = type_elem.tail.strip() if type_elem.tail.strip() != "" else None
+ # Some uint64_t are actually handles with a separate type param + object_type = param.get("objecttype", None) + # Since we have parsed all types before hand, this should not happen. type_info = types.get(type_elem.text, None) if type_info is None: LOGGER.err("type info not found for: {0}".format(type_elem.text))
- return VkParam(type_info, const=const, pointer=pointer, name=name, array_len=array_len, dyn_array_len=dyn_array_len) + return VkParam(type_info, const=const, pointer=pointer, name=name, array_len=array_len, dyn_array_len=dyn_array_len, object_type=object_type)
def _set_conversions(self): """ Internal helper function to configure any needed conversion functions. """ @@ -1790,6 +1794,9 @@ class VkParam(object): else: return "&{0}_host".format(self.name) else: + if self.object_type != None and self.type == "uint64_t": + return "wine_vk_unwrap_handle({0}, {1})".format(self.object_type, self.name) + # We need to pass the native handle to the native Vulkan calls and # the wine driver's handle to calls which are wrapped by the driver. driver_handle = self.handle.driver_handle(self.name) if self.is_handle() else None
Signed-off-by: Georg Lehmann dadschoorse@gmail.com --- dlls/winevulkan/make_vulkan | 1 - dlls/winevulkan/vulkan.c | 10 ---------- 2 files changed, 11 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 662f1c8144e..0acc6ca3b8e 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -237,7 +237,6 @@ FUNCTION_OVERRIDES = {
# VK_EXT_private_data "vkGetPrivateDataEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, - "vkSetPrivateDataEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE},
# VK_EXT_calibrated_timestamps "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE}, diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index bdd9f2151c0..4553a1030c8 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -1400,16 +1400,6 @@ void WINAPI wine_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDev properties->externalSemaphoreFeatures = 0; }
-VkResult WINAPI wine_vkSetPrivateDataEXT(VkDevice device, VkObjectType object_type, uint64_t object_handle, - VkPrivateDataSlotEXT private_data_slot, uint64_t data) -{ - TRACE("%p, %#x, 0x%s, 0x%s, 0x%s\n", device, object_type, wine_dbgstr_longlong(object_handle), - wine_dbgstr_longlong(private_data_slot), wine_dbgstr_longlong(data)); - - object_handle = wine_vk_unwrap_handle(object_type, object_handle); - return device->funcs.p_vkSetPrivateDataEXT(device->device, object_type, object_handle, private_data_slot, data); -} - void WINAPI wine_vkGetPrivateDataEXT(VkDevice device, VkObjectType object_type, uint64_t object_handle, VkPrivateDataSlotEXT private_data_slot, uint64_t *data) {
Signed-off-by: Georg Lehmann dadschoorse@gmail.com --- dlls/winevulkan/make_vulkan | 3 --- dlls/winevulkan/vulkan.c | 10 ---------- 2 files changed, 13 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 0acc6ca3b8e..23e831c08eb 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -235,9 +235,6 @@ FUNCTION_OVERRIDES = { "vkGetDeviceGroupSurfacePresentModesKHR" : {"dispatch" : True, "driver" : True, "thunk" : ThunkType.PUBLIC}, "vkGetPhysicalDevicePresentRectanglesKHR" : {"dispatch" : True, "driver" : True, "thunk" : ThunkType.PUBLIC},
- # VK_EXT_private_data - "vkGetPrivateDataEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, - # VK_EXT_calibrated_timestamps "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE}, "vkGetCalibratedTimestampsEXT" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE}, diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 4553a1030c8..abe0eceb57c 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -1400,16 +1400,6 @@ void WINAPI wine_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDev properties->externalSemaphoreFeatures = 0; }
-void WINAPI wine_vkGetPrivateDataEXT(VkDevice device, VkObjectType object_type, uint64_t object_handle, - VkPrivateDataSlotEXT private_data_slot, uint64_t *data) -{ - TRACE("%p, %#x, 0x%s, 0x%s, %p\n", device, object_type, wine_dbgstr_longlong(object_handle), - wine_dbgstr_longlong(private_data_slot), data); - - object_handle = wine_vk_unwrap_handle(object_type, object_handle); - device->funcs.p_vkGetPrivateDataEXT(device->device, object_type, object_handle, private_data_slot, data); -} - VkResult WINAPI wine_vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *createInfo, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface) {
Signed-off-by: Georg Lehmann dadschoorse@gmail.com --- dlls/winevulkan/make_vulkan | 1 - dlls/winevulkan/vulkan.c | 12 ------------ 2 files changed, 13 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 23e831c08eb..627ceccfe02 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -249,7 +249,6 @@ FUNCTION_OVERRIDES = { # VK_EXT_debug_report "vkCreateDebugReportCallbackEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, "vkDestroyDebugReportCallbackEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, - "vkDebugReportMessageEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE},
# VK_EXT_debug_marker "vkDebugMarkerSetObjectNameEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE}, diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index abe0eceb57c..3c8c5d089ef 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -1655,18 +1655,6 @@ void WINAPI wine_vkDestroyDebugReportCallbackEXT( free(object); }
-void WINAPI wine_vkDebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT object_type, - uint64_t object, size_t location, int32_t code, const char *layer_prefix, const char *message) -{ - TRACE("%p, %#x, %#x, 0x%s, 0x%s, %d, %p, %p\n", instance, flags, object_type, wine_dbgstr_longlong(object), - wine_dbgstr_longlong(location), code, layer_prefix, message); - - object = wine_vk_unwrap_handle(object_type, object); - - instance->funcs.p_vkDebugReportMessageEXT( - instance->instance, flags, object_type, object, location, code, layer_prefix, message); -} - VkResult WINAPI wine_vkDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT *tag_info) { VkDebugMarkerObjectTagInfoEXT wine_tag_info;
Signed-off-by: Georg Lehmann dadschoorse@gmail.com --- dlls/winevulkan/make_vulkan | 31 +++++++++++----- dlls/winevulkan/vulkan.c | 73 ------------------------------------- 2 files changed, 21 insertions(+), 83 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 627ceccfe02..b7d57b8218d 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -242,17 +242,10 @@ FUNCTION_OVERRIDES = { # VK_EXT_debug_utils "vkCreateDebugUtilsMessengerEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, "vkDestroyDebugUtilsMessengerEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, - "vkSubmitDebugUtilsMessageEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE}, - "vkSetDebugUtilsObjectTagEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE}, - "vkSetDebugUtilsObjectNameEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE},
# VK_EXT_debug_report "vkCreateDebugReportCallbackEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, "vkDestroyDebugReportCallbackEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, - - # VK_EXT_debug_marker - "vkDebugMarkerSetObjectNameEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE}, - "vkDebugMarkerSetObjectTagEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE}, }
STRUCT_CHAIN_CONVERSIONS = { @@ -1085,7 +1078,7 @@ class VkHandle(object):
class VkMember(object): def __init__(self, const=False, struct_fwd_decl=False,_type=None, pointer=None, name=None, array_len=None, - dyn_array_len=None, optional=False, values=None): + dyn_array_len=None, optional=False, values=None, object_type=None): self.const = const self.struct_fwd_decl = struct_fwd_decl self.name = name @@ -1096,6 +1089,7 @@ class VkMember(object): self.dyn_array_len = dyn_array_len self.optional = optional self.values = values + self.object_type = object_type
def __eq__(self, other): """ Compare member based on name against a string. @@ -1165,8 +1159,10 @@ class VkMember(object): # Remove brackets around length array_len = name_elem.tail.strip("[]")
+ object_type = member.get("objecttype", None) + return VkMember(const=const, struct_fwd_decl=struct_fwd_decl, _type=member_type, pointer=pointer, name=name_elem.text, - array_len=array_len, dyn_array_len=dyn_array_len, optional=optional, values=values) + array_len=array_len, dyn_array_len=dyn_array_len, optional=optional, values=values, object_type=object_type)
def copy(self, input, output, direction, conv): """ Helper method for use by conversion logic to generate a C-code statement to copy this member. @@ -1194,6 +1190,11 @@ class VkMember(object): else: handle = self.type_info["data"] return "{0}{1} = {2};\n".format(output, self.name, handle.driver_handle("{0}{1}".format(input, self.name))) + elif self.is_generic_handle(): + if direction == Direction.OUTPUT: + LOGGER.err("OUTPUT parameter {0}.{1} cannot be unwrapped".format(self.type, self.name)) + else: + return "{0}{1} = wine_vk_unwrap_handle({2}{3}, {2}{1});\n".format(output, self.name, input, self.object_type) else: if direction == Direction.OUTPUT: return "convert_{0}_host_to_win(&{2}{1}, &{3}{1});\n".format(self.type, self.name, input, output) @@ -1288,7 +1289,7 @@ class VkMember(object):
struct.needs_struct_extensions_conversion() direction = Direction.OUTPUT if struct.returnedonly else Direction.INPUT - elif self.is_handle(): + elif self.is_handle() or self.is_generic_handle(): direction = Direction.INPUT
operand = self.type_info["data"] @@ -1336,6 +1337,13 @@ class VkMember(object): def is_union(self): return self.type_info["category"] == "union"
+ def is_generic_handle(self): + """ Returns True if the member is a unit64_t containing + a handle with a separate object type + """ + + return self.object_type != None and self.type == "uint64_t" + def needs_alignment(self): """ Check if this member needs alignment for 64-bit data. Various structures need alignment on 64-bit variables due @@ -1378,6 +1386,9 @@ class VkMember(object): handle = self.type_info["data"] return handle.is_wrapped()
+ if self.is_generic_handle(): + return True + return False
def needs_free(self): diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 3c8c5d089ef..fb0ffbdfe6c 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -1549,55 +1549,6 @@ void WINAPI wine_vkDestroyDebugUtilsMessengerEXT( free(object); }
-void WINAPI wine_vkSubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT severity, - VkDebugUtilsMessageTypeFlagsEXT types, const VkDebugUtilsMessengerCallbackDataEXT *callback_data) -{ - VkDebugUtilsMessengerCallbackDataEXT native_callback_data; - VkDebugUtilsObjectNameInfoEXT *object_names; - unsigned int i; - - TRACE("%p, %#x, %#x, %p\n", instance, severity, types, callback_data); - - native_callback_data = *callback_data; - object_names = calloc(callback_data->objectCount, sizeof(*object_names)); - memcpy(object_names, callback_data->pObjects, callback_data->objectCount * sizeof(*object_names)); - native_callback_data.pObjects = object_names; - - for (i = 0; i < callback_data->objectCount; i++) - { - object_names[i].objectHandle = - wine_vk_unwrap_handle(callback_data->pObjects[i].objectType, callback_data->pObjects[i].objectHandle); - } - - thunk_vkSubmitDebugUtilsMessageEXT(instance, severity, types, &native_callback_data); - - free(object_names); -} - -VkResult WINAPI wine_vkSetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT *tag_info) -{ - VkDebugUtilsObjectTagInfoEXT wine_tag_info; - - TRACE("%p, %p\n", device, tag_info); - - wine_tag_info = *tag_info; - wine_tag_info.objectHandle = wine_vk_unwrap_handle(tag_info->objectType, tag_info->objectHandle); - - return thunk_vkSetDebugUtilsObjectTagEXT(device, &wine_tag_info); -} - -VkResult WINAPI wine_vkSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT *name_info) -{ - VkDebugUtilsObjectNameInfoEXT wine_name_info; - - TRACE("%p, %p\n", device, name_info); - - wine_name_info = *name_info; - wine_name_info.objectHandle = wine_vk_unwrap_handle(name_info->objectType, name_info->objectHandle); - - return thunk_vkSetDebugUtilsObjectNameEXT(device, &wine_name_info); -} - VkResult WINAPI wine_vkCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *create_info, const VkAllocationCallbacks *allocator, VkDebugReportCallbackEXT *callback) { @@ -1654,27 +1605,3 @@ void WINAPI wine_vkDestroyDebugReportCallbackEXT(
free(object); } - -VkResult WINAPI wine_vkDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT *tag_info) -{ - VkDebugMarkerObjectTagInfoEXT wine_tag_info; - - TRACE("%p, %p\n", device, tag_info); - - wine_tag_info = *tag_info; - wine_tag_info.object = wine_vk_unwrap_handle(tag_info->objectType, tag_info->object); - - return thunk_vkDebugMarkerSetObjectTagEXT(device, &wine_tag_info); -} - -VkResult WINAPI wine_vkDebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT *name_info) -{ - VkDebugMarkerObjectNameInfoEXT wine_name_info; - - TRACE("%p, %p\n", device, name_info); - - wine_name_info = *name_info; - wine_name_info.object = wine_vk_unwrap_handle(name_info->objectType, name_info->object); - - return thunk_vkDebugMarkerSetObjectNameEXT(device, &wine_name_info); -}