summaryrefslogtreecommitdiffstats
path: root/src/video_core/vulkan_common
diff options
context:
space:
mode:
authorAlexandre Bouvier <contact@amb.tf>2023-08-02 00:04:39 +0200
committerAlexandre Bouvier <contact@amb.tf>2023-08-02 00:05:14 +0200
commit9d6f8e88b27268add7cbf7c33c9e1cbbb20c1738 (patch)
treedb365084abfa708cf8bf6d46944e6b82c93678c0 /src/video_core/vulkan_common
parentUpdate translations (2023-08-01) (#11198) (diff)
downloadyuzu-9d6f8e88b27268add7cbf7c33c9e1cbbb20c1738.tar
yuzu-9d6f8e88b27268add7cbf7c33c9e1cbbb20c1738.tar.gz
yuzu-9d6f8e88b27268add7cbf7c33c9e1cbbb20c1738.tar.bz2
yuzu-9d6f8e88b27268add7cbf7c33c9e1cbbb20c1738.tar.lz
yuzu-9d6f8e88b27268add7cbf7c33c9e1cbbb20c1738.tar.xz
yuzu-9d6f8e88b27268add7cbf7c33c9e1cbbb20c1738.tar.zst
yuzu-9d6f8e88b27268add7cbf7c33c9e1cbbb20c1738.zip
Diffstat (limited to 'src/video_core/vulkan_common')
-rw-r--r--src/video_core/vulkan_common/vulkan.h13
-rw-r--r--src/video_core/vulkan_common/vulkan_instance.cpp13
-rw-r--r--src/video_core/vulkan_common/vulkan_surface.cpp13
-rw-r--r--src/video_core/vulkan_common/vulkan_wrapper.h8
4 files changed, 13 insertions, 34 deletions
diff --git a/src/video_core/vulkan_common/vulkan.h b/src/video_core/vulkan_common/vulkan.h
index 3fa963647..62aa13291 100644
--- a/src/video_core/vulkan_common/vulkan.h
+++ b/src/video_core/vulkan_common/vulkan.h
@@ -8,6 +8,19 @@
#define VK_USE_PLATFORM_WIN32_KHR
#elif defined(__APPLE__)
#define VK_USE_PLATFORM_METAL_EXT
+#elif defined(__ANDROID__)
+#define VK_USE_PLATFORM_ANDROID_KHR
+#else
+#define VK_USE_PLATFORM_XLIB_KHR
+#define VK_USE_PLATFORM_WAYLAND_KHR
#endif
#include <vulkan/vulkan.h>
+
+// Sanitize macros
+#undef CreateEvent
+#undef CreateSemaphore
+#undef Always
+#undef False
+#undef None
+#undef True
diff --git a/src/video_core/vulkan_common/vulkan_instance.cpp b/src/video_core/vulkan_common/vulkan_instance.cpp
index 6a294c1da..72aedb8d8 100644
--- a/src/video_core/vulkan_common/vulkan_instance.cpp
+++ b/src/video_core/vulkan_common/vulkan_instance.cpp
@@ -14,19 +14,6 @@
#include "video_core/vulkan_common/vulkan_instance.h"
#include "video_core/vulkan_common/vulkan_wrapper.h"
-// Include these late to avoid polluting previous headers
-#if defined(_WIN32)
-#include <windows.h>
-// ensure include order
-#include <vulkan/vulkan_win32.h>
-#elif defined(__ANDROID__)
-#include <vulkan/vulkan_android.h>
-#elif !defined(__APPLE__)
-#include <X11/Xlib.h>
-#include <vulkan/vulkan_wayland.h>
-#include <vulkan/vulkan_xlib.h>
-#endif
-
namespace Vulkan {
namespace {
diff --git a/src/video_core/vulkan_common/vulkan_surface.cpp b/src/video_core/vulkan_common/vulkan_surface.cpp
index cfea4cd7b..e45f8e43f 100644
--- a/src/video_core/vulkan_common/vulkan_surface.cpp
+++ b/src/video_core/vulkan_common/vulkan_surface.cpp
@@ -6,19 +6,6 @@
#include "video_core/vulkan_common/vulkan_surface.h"
#include "video_core/vulkan_common/vulkan_wrapper.h"
-// Include these late to avoid polluting previous headers
-#ifdef _WIN32
-#include <windows.h>
-// ensure include order
-#include <vulkan/vulkan_win32.h>
-#elif defined(__ANDROID__)
-#include <vulkan/vulkan_android.h>
-#elif !defined(__APPLE__)
-#include <X11/Xlib.h>
-#include <vulkan/vulkan_wayland.h>
-#include <vulkan/vulkan_xlib.h>
-#endif
-
namespace Vulkan {
vk::SurfaceKHR CreateSurface(
diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h
index 3089c3d41..c226a2a29 100644
--- a/src/video_core/vulkan_common/vulkan_wrapper.h
+++ b/src/video_core/vulkan_common/vulkan_wrapper.h
@@ -15,14 +15,6 @@
#include "common/common_types.h"
#include "video_core/vulkan_common/vulkan.h"
-// Sanitize macros
-#ifdef CreateEvent
-#undef CreateEvent
-#endif
-#ifdef CreateSemaphore
-#undef CreateSemaphore
-#endif
-
#ifdef _MSC_VER
#pragma warning(disable : 26812) // Disable prefer enum class over enum
#endif