summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-07-31 21:28:35 +0200
committerGitHub <noreply@github.com>2023-07-31 21:28:35 +0200
commit2a9eab5e1b2079f30879c84ef974fb9d627ed844 (patch)
treeafdc6b7addc6013e68f3ef5867b075233e67f7dd /src
parentMerge pull request #11181 from Kelebek1/audrenparaminternal (diff)
parentvma: enable options everywhere (diff)
downloadyuzu-2a9eab5e1b2079f30879c84ef974fb9d627ed844.tar
yuzu-2a9eab5e1b2079f30879c84ef974fb9d627ed844.tar.gz
yuzu-2a9eab5e1b2079f30879c84ef974fb9d627ed844.tar.bz2
yuzu-2a9eab5e1b2079f30879c84ef974fb9d627ed844.tar.lz
yuzu-2a9eab5e1b2079f30879c84ef974fb9d627ed844.tar.xz
yuzu-2a9eab5e1b2079f30879c84ef974fb9d627ed844.tar.zst
yuzu-2a9eab5e1b2079f30879c84ef974fb9d627ed844.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/CMakeLists.txt2
-rw-r--r--src/video_core/vulkan_common/vma.cpp4
-rw-r--r--src/video_core/vulkan_common/vma.h11
-rw-r--r--src/video_core/vulkan_common/vulkan.h13
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp3
-rw-r--r--src/video_core/vulkan_common/vulkan_memory_allocator.cpp3
-rw-r--r--src/video_core/vulkan_common/vulkan_wrapper.cpp4
-rw-r--r--src/video_core/vulkan_common/vulkan_wrapper.h11
8 files changed, 32 insertions, 19 deletions
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt
index 7f79111e0..9b13ccbab 100644
--- a/src/video_core/CMakeLists.txt
+++ b/src/video_core/CMakeLists.txt
@@ -275,6 +275,8 @@ add_library(video_core STATIC
vulkan_common/nsight_aftermath_tracker.cpp
vulkan_common/nsight_aftermath_tracker.h
vulkan_common/vma.cpp
+ vulkan_common/vma.h
+ vulkan_common/vulkan.h
)
create_target_directory_groups(video_core)
diff --git a/src/video_core/vulkan_common/vma.cpp b/src/video_core/vulkan_common/vma.cpp
index 1fe2cf52b..addf10762 100644
--- a/src/video_core/vulkan_common/vma.cpp
+++ b/src/video_core/vulkan_common/vma.cpp
@@ -2,7 +2,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#define VMA_IMPLEMENTATION
-#define VMA_STATIC_VULKAN_FUNCTIONS 0
-#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
-#include <vk_mem_alloc.h> \ No newline at end of file
+#include "video_core/vulkan_common/vma.h"
diff --git a/src/video_core/vulkan_common/vma.h b/src/video_core/vulkan_common/vma.h
new file mode 100644
index 000000000..6e25aa1bd
--- /dev/null
+++ b/src/video_core/vulkan_common/vma.h
@@ -0,0 +1,11 @@
+// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "video_core/vulkan_common/vulkan.h"
+
+#define VMA_STATIC_VULKAN_FUNCTIONS 0
+#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
+
+#include <vk_mem_alloc.h>
diff --git a/src/video_core/vulkan_common/vulkan.h b/src/video_core/vulkan_common/vulkan.h
new file mode 100644
index 000000000..3fa963647
--- /dev/null
+++ b/src/video_core/vulkan_common/vulkan.h
@@ -0,0 +1,13 @@
+// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define VK_NO_PROTOTYPES
+#ifdef _WIN32
+#define VK_USE_PLATFORM_WIN32_KHR
+#elif defined(__APPLE__)
+#define VK_USE_PLATFORM_METAL_EXT
+#endif
+
+#include <vulkan/vulkan.h>
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index 78918f996..09b95cc3f 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -15,6 +15,7 @@
#include "common/polyfill_ranges.h"
#include "common/settings.h"
#include "video_core/vulkan_common/nsight_aftermath_tracker.h"
+#include "video_core/vulkan_common/vma.h"
#include "video_core/vulkan_common/vulkan_device.h"
#include "video_core/vulkan_common/vulkan_wrapper.h"
@@ -22,8 +23,6 @@
#include <adrenotools/bcenabler.h>
#endif
-#include <vk_mem_alloc.h>
-
namespace Vulkan {
using namespace Common::Literals;
namespace {
diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp
index 42f3ee0b4..3ef381a38 100644
--- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp
+++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp
@@ -11,12 +11,11 @@
#include "common/common_types.h"
#include "common/logging/log.h"
#include "common/polyfill_ranges.h"
+#include "video_core/vulkan_common/vma.h"
#include "video_core/vulkan_common/vulkan_device.h"
#include "video_core/vulkan_common/vulkan_memory_allocator.h"
#include "video_core/vulkan_common/vulkan_wrapper.h"
-#include <vk_mem_alloc.h>
-
namespace Vulkan {
namespace {
struct Range {
diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp
index 2fa29793a..78e5a248f 100644
--- a/src/video_core/vulkan_common/vulkan_wrapper.cpp
+++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp
@@ -9,11 +9,9 @@
#include "common/common_types.h"
#include "common/logging/log.h"
-
+#include "video_core/vulkan_common/vma.h"
#include "video_core/vulkan_common/vulkan_wrapper.h"
-#include <vk_mem_alloc.h>
-
namespace Vulkan::vk {
namespace {
diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h
index 32bd75ad8..3089c3d41 100644
--- a/src/video_core/vulkan_common/vulkan_wrapper.h
+++ b/src/video_core/vulkan_common/vulkan_wrapper.h
@@ -12,13 +12,8 @@
#include <utility>
#include <vector>
-#define VK_NO_PROTOTYPES
-#ifdef _WIN32
-#define VK_USE_PLATFORM_WIN32_KHR
-#elif defined(__APPLE__)
-#define VK_USE_PLATFORM_METAL_EXT
-#endif
-#include <vulkan/vulkan.h>
+#include "common/common_types.h"
+#include "video_core/vulkan_common/vulkan.h"
// Sanitize macros
#ifdef CreateEvent
@@ -28,8 +23,6 @@
#undef CreateSemaphore
#endif
-#include "common/common_types.h"
-
#ifdef _MSC_VER
#pragma warning(disable : 26812) // Disable prefer enum class over enum
#endif