From c58d56cc3e9e25ad92468d6597c932bd9fc93a2e Mon Sep 17 00:00:00 2001
From: Tobias Frisch <tfrisch@uni-koblenz.de>
Date: Mon, 17 Oct 2022 20:59:00 +0200
Subject: [PATCH] Update all submodules

Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de>
---
 .gitmodules                              |  3 +++
 config/lib/VulkanMemoryAllocator.cmake   | 12 ++++++++++++
 config/lib/vma/CMakeLists.txt            | 10 +++++++---
 lib/SPIRV-Cross                          |  2 +-
 lib/Vulkan-Hpp                           |  2 +-
 lib/VulkanMemoryAllocator                |  1 +
 lib/VulkanMemoryAllocator-Hpp            |  2 +-
 lib/glfw                                 |  2 +-
 modules/asset_loader/lib/json            |  2 +-
 modules/asset_loader/lib/stb             |  2 +-
 modules/geometry/lib/glm                 |  2 +-
 modules/gui/lib/imgui                    |  2 +-
 modules/shader_compiler/lib/glslang      |  2 +-
 modules/upscaling/lib/NVIDIAImageScaling |  2 +-
 projects/first_mesh/src/main.cpp         |  3 +--
 15 files changed, 34 insertions(+), 15 deletions(-)
 create mode 160000 lib/VulkanMemoryAllocator

diff --git a/.gitmodules b/.gitmodules
index 3fe8d130..d3b0a140 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -43,3 +43,6 @@
 [submodule "modules/upscaling/lib/FidelityFX-FSR2"]
 	path = modules/upscaling/lib/FidelityFX-FSR2
 	url = https://github.com/TheJackiMonster/FidelityFX-FSR2.git
+[submodule "lib/VulkanMemoryAllocator"]
+	path = lib/VulkanMemoryAllocator
+	url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
diff --git a/config/lib/VulkanMemoryAllocator.cmake b/config/lib/VulkanMemoryAllocator.cmake
index 9270dbd0..fa69b0fd 100644
--- a/config/lib/VulkanMemoryAllocator.cmake
+++ b/config/lib/VulkanMemoryAllocator.cmake
@@ -15,6 +15,18 @@ if (BUILD_VMA_VULKAN_VERSION)
 	math(EXPR VMA_VULKAN_VERSION "1000000 * ${VMA_VULKAN_MAJOR_VERSION} + 1000 * ${VMA_VULKAN_MINOR_VERSION} + ${VMA_VULKAN_PATCH_VERSION}" OUTPUT_FORMAT DECIMAL)
 endif()
 
+use_git_submodule("${vkcv_lib_path}/VulkanMemoryAllocator" vma_status)
+
+if (${vma_status})
+	if (EXISTS "${vkcv_lib_path}/VulkanMemoryAllocator/include")
+		set(VMA_H_PATH "${vkcv_lib_path}/VulkanMemoryAllocator/include" CACHE INTERNAL "")
+	else()
+		set(VMA_H_PATH "${vkcv_lib_path}/VulkanMemoryAllocator" CACHE INTERNAL "")
+	endif()
+
+	list(APPEND vkcv_includes ${VMA_H_PATH})
+endif()
+
 use_git_submodule("${vkcv_lib_path}/VulkanMemoryAllocator-Hpp" vma_hpp_status)
 
 if (${vma_hpp_status})
diff --git a/config/lib/vma/CMakeLists.txt b/config/lib/vma/CMakeLists.txt
index 2377e371..42126320 100644
--- a/config/lib/vma/CMakeLists.txt
+++ b/config/lib/vma/CMakeLists.txt
@@ -2,9 +2,14 @@ cmake_minimum_required(VERSION 3.9)
 
 project(VulkanMemoryAllocator)
 
+# settings c++ standard for the vma
+set(CMAKE_CXX_STANDARD 20)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
 find_package(Vulkan REQUIRED)
 
 option(VMA_VULKAN_VERSION "Enforced Vulkan version" OFF)
+option(VMA_H_PATH "Location of C headers" "")
 option(VMA_HPP_PATH "Location of C++ headers" "")
 
 option(VMA_VULKAN_H_PATH "Location of Vulkan C headers" "")
@@ -41,12 +46,11 @@ set_target_properties(
 		VulkanMemoryAllocator PROPERTIES
 		
 		CXX_EXTENSIONS OFF
-		# Use C++14
-		CXX_STANDARD 14
+		CXX_STANDARD ${CMAKE_CXX_STANDARD}
 		CXX_STANDARD_REQUIRED ON
 )
 
-target_include_directories(VulkanMemoryAllocator SYSTEM BEFORE PRIVATE ${VMA_VULKAN_H_PATH} ${VMA_VULKAN_HPP_PATH})
+target_include_directories(VulkanMemoryAllocator SYSTEM BEFORE PRIVATE ${VMA_VULKAN_H_PATH} ${VMA_VULKAN_HPP_PATH} ${VMA_H_PATH})
 target_include_directories(VulkanMemoryAllocator PUBLIC ${VMA_HPP_PATH})
 
 # Only link to Vulkan if static linking is used
diff --git a/lib/SPIRV-Cross b/lib/SPIRV-Cross
index 6a678914..f09ba277 160000
--- a/lib/SPIRV-Cross
+++ b/lib/SPIRV-Cross
@@ -1 +1 @@
-Subproject commit 6a67891418a3f08be63f92726e049dc788e46f5b
+Subproject commit f09ba2777714871bddb70d049878af34b94fa54d
diff --git a/lib/Vulkan-Hpp b/lib/Vulkan-Hpp
index ae1b0c36..ef609a2f 160000
--- a/lib/Vulkan-Hpp
+++ b/lib/Vulkan-Hpp
@@ -1 +1 @@
-Subproject commit ae1b0c36df0943795cd621a37e7f7bfd00ac958a
+Subproject commit ef609a2f77dd1756e672712f264e76b64acdba61
diff --git a/lib/VulkanMemoryAllocator b/lib/VulkanMemoryAllocator
new file mode 160000
index 00000000..c3516924
--- /dev/null
+++ b/lib/VulkanMemoryAllocator
@@ -0,0 +1 @@
+Subproject commit c351692490513cdb0e5a2c925aaf7ea4a9b672f4
diff --git a/lib/VulkanMemoryAllocator-Hpp b/lib/VulkanMemoryAllocator-Hpp
index 2e6f3f6c..e00a0b1a 160000
--- a/lib/VulkanMemoryAllocator-Hpp
+++ b/lib/VulkanMemoryAllocator-Hpp
@@ -1 +1 @@
-Subproject commit 2e6f3f6c13933c84b55d01c4c0cbc2e7385ac8c1
+Subproject commit e00a0b1ab8bba230e8c701423540ff3828aea2d5
diff --git a/lib/glfw b/lib/glfw
index 4cb36872..dd8a678a 160000
--- a/lib/glfw
+++ b/lib/glfw
@@ -1 +1 @@
-Subproject commit 4cb36872a5fe448c205d0b46f0e8c8b57530cfe0
+Subproject commit dd8a678a66f1967372e5a5e3deac41ebf65ee127
diff --git a/modules/asset_loader/lib/json b/modules/asset_loader/lib/json
index 4f8fba14..bc889afb 160000
--- a/modules/asset_loader/lib/json
+++ b/modules/asset_loader/lib/json
@@ -1 +1 @@
-Subproject commit 4f8fba14066156b73f1189a2b8bd568bde5284c5
+Subproject commit bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d
diff --git a/modules/asset_loader/lib/stb b/modules/asset_loader/lib/stb
index af1a5bc3..8b5f1f37 160000
--- a/modules/asset_loader/lib/stb
+++ b/modules/asset_loader/lib/stb
@@ -1 +1 @@
-Subproject commit af1a5bc352164740c1cc1354942b1c6b72eacb8a
+Subproject commit 8b5f1f37b5b75829fc72d38e7b5d4bcbf8a26d55
diff --git a/modules/geometry/lib/glm b/modules/geometry/lib/glm
index 6ad79aae..cc98465e 160000
--- a/modules/geometry/lib/glm
+++ b/modules/geometry/lib/glm
@@ -1 +1 @@
-Subproject commit 6ad79aae3eb5bf809c30bf1168171e9e55857e45
+Subproject commit cc98465e3508535ba8c7f6208df934c156a018dc
diff --git a/modules/gui/lib/imgui b/modules/gui/lib/imgui
index eda7792b..08752b37 160000
--- a/modules/gui/lib/imgui
+++ b/modules/gui/lib/imgui
@@ -1 +1 @@
-Subproject commit eda7792b151d138e15df951578253b821ceed5a3
+Subproject commit 08752b372e5ebeb39adec59387590dac9d9e68f7
diff --git a/modules/shader_compiler/lib/glslang b/modules/shader_compiler/lib/glslang
index 48fd6c82..5755de46 160000
--- a/modules/shader_compiler/lib/glslang
+++ b/modules/shader_compiler/lib/glslang
@@ -1 +1 @@
-Subproject commit 48fd6c82b3fefb38e59dd799d8b12fddddf8e63c
+Subproject commit 5755de46b07e4374c05fb1081f65f7ae1f8cca81
diff --git a/modules/upscaling/lib/NVIDIAImageScaling b/modules/upscaling/lib/NVIDIAImageScaling
index 7a468267..35e13ba3 160000
--- a/modules/upscaling/lib/NVIDIAImageScaling
+++ b/modules/upscaling/lib/NVIDIAImageScaling
@@ -1 +1 @@
-Subproject commit 7a468267104585ce5cd683aebd8e4cb74f826807
+Subproject commit 35e13ba316c98eeecf16f37eae70ce88019911f6
diff --git a/projects/first_mesh/src/main.cpp b/projects/first_mesh/src/main.cpp
index 886d6e82..da07fdca 100644
--- a/projects/first_mesh/src/main.cpp
+++ b/projects/first_mesh/src/main.cpp
@@ -50,10 +50,9 @@ int main(int argc, const char** argv) {
 	// since we only use one descriptor set (namely, desc set 0), directly address it
 	// recreate copies of the bindings and the handles (to check whether they are properly reused instead of actually recreated)
 	const vkcv::DescriptorBindings& set0Bindings = firstMeshProgram.getReflectedDescriptors().at(0);
-    auto set0BindingsExplicitCopy = set0Bindings;
 
 	vkcv::DescriptorSetLayoutHandle setLayoutHandle = core.createDescriptorSetLayout(set0Bindings);
-	vkcv::DescriptorSetLayoutHandle setLayoutHandleCopy = core.createDescriptorSetLayout(set0BindingsExplicitCopy);
+	vkcv::DescriptorSetLayoutHandle setLayoutHandleCopy = core.createDescriptorSetLayout(set0Bindings);
 
 	vkcv::DescriptorSetHandle descriptorSet = core.createDescriptorSet(setLayoutHandle);
 	
-- 
GitLab