summaryrefslogtreecommitdiffstats
path: root/src/video_core/vulkan_common
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-08-02 20:26:03 +0200
committerGitHub <noreply@github.com>2023-08-02 20:26:03 +0200
commit096644c01cb8cd30589d5f168fdabaac5aad174a (patch)
tree92ed30b541d5864f4b8a50b45a048ddc642042c9 /src/video_core/vulkan_common
parentMerge pull request #10839 from lat9nq/pgc-plus (diff)
parentvulkan: centralize config (diff)
downloadyuzu-096644c01cb8cd30589d5f168fdabaac5aad174a.tar
yuzu-096644c01cb8cd30589d5f168fdabaac5aad174a.tar.gz
yuzu-096644c01cb8cd30589d5f168fdabaac5aad174a.tar.bz2
yuzu-096644c01cb8cd30589d5f168fdabaac5aad174a.tar.lz
yuzu-096644c01cb8cd30589d5f168fdabaac5aad174a.tar.xz
yuzu-096644c01cb8cd30589d5f168fdabaac5aad174a.tar.zst
yuzu-096644c01cb8cd30589d5f168fdabaac5aad174a.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