Jacek Caban : winevulkan: Don't use vulkan_private.h in loader_thunks.c.
Module: wine Branch: master Commit: 171fe51b794f51b8d2b3811b7327aa2e730cd07e URL: https://source.winehq.org/git/wine.git/?a=commit;h=171fe51b794f51b8d2b3811b7... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 19 14:14:59 2021 +0200 winevulkan: Don't use vulkan_private.h in loader_thunks.c. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/loader_thunks.c | 2 +- dlls/winevulkan/make_vulkan | 2 +- dlls/winevulkan/vulkan_loader.h | 43 ++++++++++++++++++++++++++++++++++++++++ dlls/winevulkan/vulkan_private.h | 19 +----------------- 4 files changed, 46 insertions(+), 20 deletions(-) diff --git a/dlls/winevulkan/loader_thunks.c b/dlls/winevulkan/loader_thunks.c index d05429f4116..22497545b0b 100644 --- a/dlls/winevulkan/loader_thunks.c +++ b/dlls/winevulkan/loader_thunks.c @@ -9,7 +9,7 @@ * */ -#include "vulkan_private.h" +#include "vulkan_loader.h" WINE_DEFAULT_DEBUG_CHANNEL(vulkan); diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index ef24cbfd262..100d233bc51 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -2501,7 +2501,7 @@ class VkGenerator(object): def generate_loader_thunks_c(self, f, prefix): self._generate_copyright(f) - f.write("#include \"vulkan_private.h\"\n\n") + f.write("#include \"vulkan_loader.h\"\n\n") f.write("WINE_DEFAULT_DEBUG_CHANNEL(vulkan);\n\n") diff --git a/dlls/winevulkan/vulkan_loader.h b/dlls/winevulkan/vulkan_loader.h new file mode 100644 index 00000000000..61b2d60c272 --- /dev/null +++ b/dlls/winevulkan/vulkan_loader.h @@ -0,0 +1,43 @@ +/* Wine Vulkan ICD private data structures + * + * Copyright 2017 Roderick Colenbrander + * + * 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. + * + * 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_LOADER_H +#define __WINE_VULKAN_LOADER_H + +#include "wine/debug.h" + +#define VK_NO_PROTOTYPES +#include "wine/vulkan.h" +#include "wine/vulkan_driver.h" + +#include "loader_thunks.h" + +struct vulkan_func +{ + const char *name; + void *func; +}; + +void *wine_vk_get_device_proc_addr(const char *name) DECLSPEC_HIDDEN; +void *wine_vk_get_phys_dev_proc_addr(const char *name) DECLSPEC_HIDDEN; +void *wine_vk_get_instance_proc_addr(const char *name) DECLSPEC_HIDDEN; + +extern const struct unix_funcs *unix_funcs; + +#endif /* __WINE_VULKAN_LOADER_H */ diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index f06e739c423..4e9c0721dcd 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -27,14 +27,10 @@ #include <pthread.h> -#include "wine/debug.h" #include "wine/list.h" -#define VK_NO_PROTOTYPES -#include "wine/vulkan.h" -#include "wine/vulkan_driver.h" +#include "vulkan_loader.h" #include "vulkan_thunks.h" -#include "loader_thunks.h" /* Magic value defined by Vulkan ICD / Loader spec */ #define VULKAN_ICD_MAGIC_VALUE 0x01CDC0DE @@ -43,12 +39,6 @@ #define WINEVULKAN_QUIRK_ADJUST_MAX_IMAGE_COUNT 0x00000002 #define WINEVULKAN_QUIRK_IGNORE_EXPLICIT_LAYERS 0x00000004 -struct vulkan_func -{ - const char *name; - void *func; -}; - /* 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 * loader depends on it. For now only contains loader_magic, but over time more common @@ -235,10 +225,6 @@ static inline VkSurfaceKHR wine_surface_to_handle(struct wine_surface *surface) return (VkSurfaceKHR)(uintptr_t)surface; } -void *wine_vk_get_device_proc_addr(const char *name) DECLSPEC_HIDDEN; -void *wine_vk_get_phys_dev_proc_addr(const char *name) DECLSPEC_HIDDEN; -void *wine_vk_get_instance_proc_addr(const char *name) DECLSPEC_HIDDEN; - BOOL wine_vk_device_extension_supported(const char *name) DECLSPEC_HIDDEN; BOOL wine_vk_instance_extension_supported(const char *name) DECLSPEC_HIDDEN; @@ -246,8 +232,5 @@ BOOL wine_vk_is_type_wrapped(VkObjectType type) DECLSPEC_HIDDEN; uint64_t wine_vk_unwrap_handle(VkObjectType type, uint64_t handle) DECLSPEC_HIDDEN; extern const struct unix_funcs loader_funcs; -extern const struct unix_funcs *unix_funcs; - -const struct unix_funcs *unix_vk_init(const struct vulkan_funcs *driver) DECLSPEC_HIDDEN; #endif /* __WINE_VULKAN_PRIVATE_H */
participants (1)
-
Alexandre Julliard