summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYonggang Luo <luoyonggang@gmail.com>2022-11-03 06:32:23 +0800
committerMarge Bot <emma+marge@anholt.net>2022-11-10 06:59:42 +0000
commit26a6d16db0f9512f719a40529acf46c0277e877e (patch)
treea79818e79e043dc69f28639e9b22361c0687098a /include
parent5425e05f2f3355e43597b2981b9a62ffe948a31c (diff)
downloadmesa-26a6d16db0f9512f719a40529acf46c0277e877e.tar.gz
zink: Only #include <vulkan/vulkan_core.h> instead #include <vulkan/vulkan.h> in kopper_interface.h
It's pulled too much system dependent headers before this commit when #include <vulkan/vulkan.h> directly, Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19491>
Diffstat (limited to 'include')
-rw-r--r--include/kopper_interface.h40
1 files changed, 17 insertions, 23 deletions
diff --git a/include/kopper_interface.h b/include/kopper_interface.h
index 33826e6ff33..3db53e8d52c 100644
--- a/include/kopper_interface.h
+++ b/include/kopper_interface.h
@@ -35,17 +35,7 @@
#define KOPPER_INTERFACE_H
#include <GL/internal/dri_interface.h>
-#include <vulkan/vulkan.h>
-#ifdef VK_USE_PLATFORM_XCB_KHR
-#include <xcb/xcb.h>
-#include <vulkan/vulkan_xcb.h>
-#endif
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
-#include <vulkan/vulkan_wayland.h>
-#endif
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-#include <vulkan/vulkan_win32.h>
-#endif
+#include <vulkan/vulkan_core.h>
typedef struct __DRIkopperExtensionRec __DRIkopperExtension;
typedef struct __DRIkopperLoaderExtensionRec __DRIkopperLoaderExtension;
@@ -80,19 +70,23 @@ struct __DRIkopperExtensionRec {
* Kopper loader extension.
*/
+/**
+ * struct for storage the union of all platform depdendent
+ * Vk*SurfaceCreateInfo* type, all platform Vk*SurfaceCreateInfo* contains
+ * uint32_t flags and at most two extra pointer besides bos header.
+ * For example:
+ * VkWin32SurfaceCreateInfoKHR contains flags, hinstance and hwnd besides bos header
+ */
+
+struct kopper_vk_surface_create_storage {
+ /* First two fields are copied from VkBaseOutStructure for easily access shared properties */
+ VkStructureType sType;
+ struct VkBaseOutStructure *pNext;
+ intptr_t padding[3];
+};
+
struct kopper_loader_info {
- union {
- VkBaseOutStructure bos;
-#ifdef VK_USE_PLATFORM_XCB_KHR
- VkXcbSurfaceCreateInfoKHR xcb;
-#endif
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
- VkWaylandSurfaceCreateInfoKHR wl;
-#endif
-#ifdef VK_USE_PLATFORM_WIN32_KHR
- VkWin32SurfaceCreateInfoKHR win32;
-#endif
- };
+ struct kopper_vk_surface_create_storage bos;
int has_alpha;
int initial_swap_interval;
};