Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

externals: Use cmake subdirectory

GPUCode7a8631cd455b
diff --git a/.gitmodules b/.gitmodules
index cc0e97a859..5a8169b445 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -55,6 +55,6 @@
[submodule "tzdb_to_nx"]
path = externals/nx_tzdb/tzdb_to_nx
url = https://github.com/lat9nq/tzdb_to_nx.git
-[submodule "externals/vma/vma"]
- path = externals/vma/vma
+[submodule "VulkanMemoryAllocator"]
+ path = externals/vma/VulkanMemoryAllocator
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index ca4ebe4b9d..0184289eba 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -145,7 +145,7 @@ add_subdirectory(nx_tzdb)
# VMA
add_library(vma vma/vma.cpp)
-target_include_directories(vma PUBLIC ./vma/vma/include)
+target_include_directories(vma PUBLIC ./vma/VulkanMemoryAllocator/include)
target_link_libraries(vma PRIVATE Vulkan::Headers)
if (NOT TARGET LLVM::Demangle)
diff --git a/externals/vma/vma b/externals/vma/VulkanMemoryAllocator
similarity index 100%
rename from externals/vma/vma
rename to externals/vma/VulkanMemoryAllocator
diff --git a/externals/vma/vma.cpp b/externals/vma/vma.cpp
index ff1acc3200..1fe2cf52b3 100644
--- a/externals/vma/vma.cpp
+++ b/externals/vma/vma.cpp
@@ -4,4 +4,5 @@
#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
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index 94dd1aa14c..31226084f1 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -22,8 +22,6 @@
#include <adrenotools/bcenabler.h>
#endif
-#define VMA_STATIC_VULKAN_FUNCTIONS 0
-#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
#include <vk_mem_alloc.h>
namespace Vulkan {
diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp
index 70db413433..a2ef0efa40 100644
--- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp
+++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp
@@ -15,8 +15,6 @@
#include "video_core/vulkan_common/vulkan_memory_allocator.h"
#include "video_core/vulkan_common/vulkan_wrapper.h"
-#define VMA_STATIC_VULKAN_FUNCTIONS 0
-#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
#include <vk_mem_alloc.h>
namespace Vulkan {
diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp
index c01a9478ef..28fcb21a01 100644
--- a/src/video_core/vulkan_common/vulkan_wrapper.cpp
+++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp
@@ -12,8 +12,6 @@
#include "video_core/vulkan_common/vulkan_wrapper.h"
-#define VMA_STATIC_VULKAN_FUNCTIONS 0
-#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
#include <vk_mem_alloc.h>
namespace Vulkan::vk {