From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winevulkan/make_vulkan | 63 ------------------------------------ include/wine/vulkan_driver.h | 20 ++++++++---- 2 files changed, 14 insertions(+), 69 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 6b4debf20ff..809591b3c97 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -3142,66 +3142,6 @@ class VkGenerator(object):
f.write("#endif /* __WINE_VULKAN_H */\n")
- def generate_vulkan_driver_h(self, f): - self._generate_copyright(f) - f.write("#ifndef __WINE_VULKAN_DRIVER_H\n") - f.write("#define __WINE_VULKAN_DRIVER_H\n\n") - - f.write("/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */\n") - f.write("#define WINE_VULKAN_DRIVER_VERSION {0}\n\n".format(DRIVER_VERSION)) - - f.write("struct vulkan_funcs\n{\n") - f.write(" /* Vulkan global functions. These are the only calls at this point a graphics driver\n") - f.write(" * needs to provide. Other function calls will be provided indirectly by dispatch\n") - f.write(" * tables part of dispatchable Vulkan objects such as VkInstance or vkDevice.\n") - f.write(" */\n") - - for vk_func in self.registry.funcs.values(): - if not vk_func.is_driver_func(): - continue - - pfn = vk_func.pfn() - # Avoid PFN_vkVoidFunction in driver interface as Vulkan likes to put calling convention - # stuff in there. For simplicity substitute with "void *". - pfn = pfn.replace("PFN_vkVoidFunction", "void *") - f.write(" {0};\n".format(pfn)) - - f.write("\n") - f.write(" /* winevulkan specific functions */\n") - f.write(" VkSurfaceKHR (*p_wine_get_host_surface)(VkSurfaceKHR);\n") - f.write("};\n\n") - - f.write("static inline void *get_vulkan_driver_device_proc_addr(\n") - f.write(" const struct vulkan_funcs *vulkan_funcs, const char *name)\n{\n") - f.write(" if (!name || name[0] != 'v' || name[1] != 'k') return NULL;\n\n") - f.write(" name += 2;\n\n") - for vk_func in self.registry.funcs.values(): - if vk_func.is_driver_func() and vk_func.is_device_func(): - f.write(' if (!strcmp(name, "{0}"))\n'.format(vk_func.name[2:])) - f.write(' return vulkan_funcs->p_{0};\n'.format(vk_func.name)) - f.write("\n") - f.write(" return NULL;\n}\n\n") - - f.write("static inline void *get_vulkan_driver_instance_proc_addr(\n") - f.write(" const struct vulkan_funcs *vulkan_funcs, VkInstance instance, const char *name)\n{\n") - f.write(" if (!name || name[0] != 'v' || name[1] != 'k') return NULL;\n\n") - f.write(" name += 2;\n\n") - for vk_func in self.registry.funcs.values(): - if vk_func.is_driver_func() and vk_func.is_global_func() and vk_func.name != "vkGetInstanceProcAddr": - f.write(' if (!strcmp(name, "{0}"))\n'.format(vk_func.name[2:])) - f.write(' return vulkan_funcs->p_{0};\n'.format(vk_func.name)) - f.write("\n") - f.write(" if (!instance) return NULL;\n\n") - for vk_func in self.registry.funcs.values(): - if vk_func.is_driver_func() and (vk_func.is_instance_func() or vk_func.is_phys_dev_func()): - f.write(' if (!strcmp(name, "{0}"))\n'.format(vk_func.name[2:])) - f.write(' return vulkan_funcs->p_{0};\n'.format(vk_func.name)) - f.write("\n") - f.write(" name -= 2;\n\n") - f.write(" return get_vulkan_driver_device_proc_addr(vulkan_funcs, name);\n}\n\n") - - f.write("#endif /* __WINE_VULKAN_DRIVER_H */\n") - def generate_vulkan_spec(self, f): self._generate_copyright(f, spec_file=True) f.write("@ stdcall -private vk_icdGetInstanceProcAddr(ptr str)\n") @@ -3894,9 +3834,6 @@ def main(): with open(WINE_VULKAN_H, "w") as f: generator.generate_vulkan_h(f)
- with open(WINE_VULKAN_DRIVER_H, "w") as f: - generator.generate_vulkan_driver_h(f) - with open(WINE_VULKAN_THUNKS_H, "w") as f: generator.generate_thunks_h(f, "wine_")
diff --git a/include/wine/vulkan_driver.h b/include/wine/vulkan_driver.h index 949dbc769b5..2cf6d99cfd8 100644 --- a/include/wine/vulkan_driver.h +++ b/include/wine/vulkan_driver.h @@ -1,12 +1,20 @@ -/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! +/* + * Copyright 2017-2018 Roderick Colenbrander + * Copyright 2022 Jacek Caban for CodeWeavers * - * This file is generated from Vulkan vk.xml file covered - * by the following copyright and permission notice: + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * Copyright 2015-2024 The Khronos Group Inc. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef __WINE_VULKAN_DRIVER_H