diff options
| author | 2023-07-31 15:28:35 -0400 | |
|---|---|---|
| committer | 2023-07-31 15:28:35 -0400 | |
| commit | 2a9eab5e1b2079f30879c84ef974fb9d627ed844 (patch) | |
| tree | afdc6b7addc6013e68f3ef5867b075233e67f7dd | |
| parent | Merge pull request #11181 from Kelebek1/audrenparaminternal (diff) | |
| parent | vma: enable options everywhere (diff) | |
| download | yuzu-2a9eab5e1b2079f30879c84ef974fb9d627ed844.tar.gz yuzu-2a9eab5e1b2079f30879c84ef974fb9d627ed844.tar.xz yuzu-2a9eab5e1b2079f30879c84ef974fb9d627ed844.zip | |
Merge pull request #11188 from abouvier/vma-fix
vma: enable options everywhere
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vma.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vma.h | 11 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan.h | 13 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_memory_allocator.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_wrapper.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_wrapper.h | 11 |
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 | |||
| 275 | vulkan_common/nsight_aftermath_tracker.cpp | 275 | vulkan_common/nsight_aftermath_tracker.cpp |
| 276 | vulkan_common/nsight_aftermath_tracker.h | 276 | vulkan_common/nsight_aftermath_tracker.h |
| 277 | vulkan_common/vma.cpp | 277 | vulkan_common/vma.cpp |
| 278 | vulkan_common/vma.h | ||
| 279 | vulkan_common/vulkan.h | ||
| 278 | ) | 280 | ) |
| 279 | 281 | ||
| 280 | create_target_directory_groups(video_core) | 282 | 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 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #define VMA_IMPLEMENTATION | 4 | #define VMA_IMPLEMENTATION |
| 5 | #define VMA_STATIC_VULKAN_FUNCTIONS 0 | ||
| 6 | #define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 | ||
| 7 | 5 | ||
| 8 | #include <vk_mem_alloc.h> \ No newline at end of file | 6 | #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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "video_core/vulkan_common/vulkan.h" | ||
| 7 | |||
| 8 | #define VMA_STATIC_VULKAN_FUNCTIONS 0 | ||
| 9 | #define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 | ||
| 10 | |||
| 11 | #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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #define VK_NO_PROTOTYPES | ||
| 7 | #ifdef _WIN32 | ||
| 8 | #define VK_USE_PLATFORM_WIN32_KHR | ||
| 9 | #elif defined(__APPLE__) | ||
| 10 | #define VK_USE_PLATFORM_METAL_EXT | ||
| 11 | #endif | ||
| 12 | |||
| 13 | #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 @@ | |||
| 15 | #include "common/polyfill_ranges.h" | 15 | #include "common/polyfill_ranges.h" |
| 16 | #include "common/settings.h" | 16 | #include "common/settings.h" |
| 17 | #include "video_core/vulkan_common/nsight_aftermath_tracker.h" | 17 | #include "video_core/vulkan_common/nsight_aftermath_tracker.h" |
| 18 | #include "video_core/vulkan_common/vma.h" | ||
| 18 | #include "video_core/vulkan_common/vulkan_device.h" | 19 | #include "video_core/vulkan_common/vulkan_device.h" |
| 19 | #include "video_core/vulkan_common/vulkan_wrapper.h" | 20 | #include "video_core/vulkan_common/vulkan_wrapper.h" |
| 20 | 21 | ||
| @@ -22,8 +23,6 @@ | |||
| 22 | #include <adrenotools/bcenabler.h> | 23 | #include <adrenotools/bcenabler.h> |
| 23 | #endif | 24 | #endif |
| 24 | 25 | ||
| 25 | #include <vk_mem_alloc.h> | ||
| 26 | |||
| 27 | namespace Vulkan { | 26 | namespace Vulkan { |
| 28 | using namespace Common::Literals; | 27 | using namespace Common::Literals; |
| 29 | namespace { | 28 | 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 @@ | |||
| 11 | #include "common/common_types.h" | 11 | #include "common/common_types.h" |
| 12 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "common/polyfill_ranges.h" | 13 | #include "common/polyfill_ranges.h" |
| 14 | #include "video_core/vulkan_common/vma.h" | ||
| 14 | #include "video_core/vulkan_common/vulkan_device.h" | 15 | #include "video_core/vulkan_common/vulkan_device.h" |
| 15 | #include "video_core/vulkan_common/vulkan_memory_allocator.h" | 16 | #include "video_core/vulkan_common/vulkan_memory_allocator.h" |
| 16 | #include "video_core/vulkan_common/vulkan_wrapper.h" | 17 | #include "video_core/vulkan_common/vulkan_wrapper.h" |
| 17 | 18 | ||
| 18 | #include <vk_mem_alloc.h> | ||
| 19 | |||
| 20 | namespace Vulkan { | 19 | namespace Vulkan { |
| 21 | namespace { | 20 | namespace { |
| 22 | struct Range { | 21 | 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 @@ | |||
| 9 | 9 | ||
| 10 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 11 | #include "common/logging/log.h" | 11 | #include "common/logging/log.h" |
| 12 | 12 | #include "video_core/vulkan_common/vma.h" | |
| 13 | #include "video_core/vulkan_common/vulkan_wrapper.h" | 13 | #include "video_core/vulkan_common/vulkan_wrapper.h" |
| 14 | 14 | ||
| 15 | #include <vk_mem_alloc.h> | ||
| 16 | |||
| 17 | namespace Vulkan::vk { | 15 | namespace Vulkan::vk { |
| 18 | 16 | ||
| 19 | namespace { | 17 | 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 @@ | |||
| 12 | #include <utility> | 12 | #include <utility> |
| 13 | #include <vector> | 13 | #include <vector> |
| 14 | 14 | ||
| 15 | #define VK_NO_PROTOTYPES | 15 | #include "common/common_types.h" |
| 16 | #ifdef _WIN32 | 16 | #include "video_core/vulkan_common/vulkan.h" |
| 17 | #define VK_USE_PLATFORM_WIN32_KHR | ||
| 18 | #elif defined(__APPLE__) | ||
| 19 | #define VK_USE_PLATFORM_METAL_EXT | ||
| 20 | #endif | ||
| 21 | #include <vulkan/vulkan.h> | ||
| 22 | 17 | ||
| 23 | // Sanitize macros | 18 | // Sanitize macros |
| 24 | #ifdef CreateEvent | 19 | #ifdef CreateEvent |
| @@ -28,8 +23,6 @@ | |||
| 28 | #undef CreateSemaphore | 23 | #undef CreateSemaphore |
| 29 | #endif | 24 | #endif |
| 30 | 25 | ||
| 31 | #include "common/common_types.h" | ||
| 32 | |||
| 33 | #ifdef _MSC_VER | 26 | #ifdef _MSC_VER |
| 34 | #pragma warning(disable : 26812) // Disable prefer enum class over enum | 27 | #pragma warning(disable : 26812) // Disable prefer enum class over enum |
| 35 | #endif | 28 | #endif |