From 377757b85da91f41bc63e69da54e38bb50c7acde Mon Sep 17 00:00:00 2001
From: Tobias Frisch <tfrisch@uni-koblenz.de>
Date: Fri, 9 Jul 2021 21:44:31 +0200
Subject: [PATCH] [#59] Added comment to explain used version and moved weird
 subproject into config directory

Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de>
---
 config/lib/VulkanMemoryAllocator.cmake | 2 +-
 {vma => config/lib/vma}/CMakeLists.txt | 0
 {vma => config/lib/vma}/vma.cpp        | 0
 src/vkcv/Context.cpp                   | 7 +++++++
 4 files changed, 8 insertions(+), 1 deletion(-)
 rename {vma => config/lib/vma}/CMakeLists.txt (100%)
 rename {vma => config/lib/vma}/vma.cpp (100%)

diff --git a/config/lib/VulkanMemoryAllocator.cmake b/config/lib/VulkanMemoryAllocator.cmake
index fc116ce2..5f670ff0 100644
--- a/config/lib/VulkanMemoryAllocator.cmake
+++ b/config/lib/VulkanMemoryAllocator.cmake
@@ -11,7 +11,7 @@ if (EXISTS "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp")
 	set(VMA_DEBUG_GLOBAL_MUTEX OFF CACHE INTERNAL "")
 	set(VMA_DEBUG_DONT_EXCEED_MAX_MEMORY_ALLOCATION_COUNT OFF CACHE INTERNAL "")
 	
-	add_subdirectory(vma)
+	add_subdirectory(${vkcv_config_lib}/vma)
 	
 	list(APPEND vkcv_libraries VulkanMemoryAllocator)
 	list(APPEND vkcv_includes ${vkcv_lib_path}/VulkanMemoryAllocator-Hpp)
diff --git a/vma/CMakeLists.txt b/config/lib/vma/CMakeLists.txt
similarity index 100%
rename from vma/CMakeLists.txt
rename to config/lib/vma/CMakeLists.txt
diff --git a/vma/vma.cpp b/config/lib/vma/vma.cpp
similarity index 100%
rename from vma/vma.cpp
rename to config/lib/vma/vma.cpp
diff --git a/src/vkcv/Context.cpp b/src/vkcv/Context.cpp
index 84cdd587..5db50869 100644
--- a/src/vkcv/Context.cpp
+++ b/src/vkcv/Context.cpp
@@ -320,6 +320,13 @@ namespace vkcv
 				nullptr,
 				nullptr,
 				instance,
+				
+				/* Uses default version when set to 0 (currently VK_VERSION_1_0):
+				 *
+				 * The reason for this is that the allocator restricts the allowed version
+				 * to be at maximum VK_VERSION_1_1 which is already less than
+				 * VK_HEADER_VERSION_COMPLETE at most platforms.
+				 * */
 				0
 		);
 		
-- 
GitLab