From 22750f9ab6b731703770376cfb1904607e81f9dd Mon Sep 17 00:00:00 2001
From: Tobias Frisch <tfrisch@uni-koblenz.de>
Date: Tue, 11 Jun 2024 17:09:18 +0200
Subject: [PATCH] Update submodules and fix build issues

Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de>
---
 .gitmodules                                   |  4 ++--
 include/vkcv/Event.hpp                        |  1 +
 lib/SPIRV-Cross                               |  2 +-
 lib/Vulkan-Headers                            |  2 +-
 lib/Vulkan-Hpp                                |  2 +-
 lib/VulkanMemoryAllocator                     |  2 +-
 lib/VulkanMemoryAllocator-Hpp                 |  2 +-
 lib/glfw                                      |  2 +-
 modules/asset_loader/lib/json                 |  2 +-
 modules/asset_loader/lib/stb                  |  2 +-
 .../asset_loader/lib/wuffs-mirror-release-c   |  2 +-
 modules/geometry/lib/glm                      |  2 +-
 modules/gui/lib/imgui                         |  2 +-
 modules/gui/src/vkcv/gui/GUI.cpp              | 20 +++++++------------
 modules/shader_compiler/lib/SPIRV-Headers     |  2 +-
 modules/shader_compiler/lib/glslang           |  2 +-
 modules/shader_compiler/lib/json-c            |  2 +-
 .../src/vkcv/shader/GlslangCompiler.cpp       |  1 +
 modules/tone_mapping/lib/glsl-tone-map        |  2 +-
 19 files changed, 26 insertions(+), 30 deletions(-)

diff --git a/.gitmodules b/.gitmodules
index 94621b63..c3b3e5b4 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -48,8 +48,8 @@
 	branch = main
 [submodule "lib/VulkanMemoryAllocator-Hpp"]
 	path = lib/VulkanMemoryAllocator-Hpp
-	url = https://github.com/TheJackiMonster/VulkanMemoryAllocator-Hpp.git
-	branch = fix
+	url = https://github.com/YaaZ/VulkanMemoryAllocator-Hpp.git
+	branch = master
 [submodule "modules/algorithm/lib/FidelityFX-SPD"]
 	path = modules/algorithm/lib/FidelityFX-SPD
 	url = https://github.com/GPUOpen-Effects/FidelityFX-SPD.git
diff --git a/include/vkcv/Event.hpp b/include/vkcv/Event.hpp
index 328b0e51..cb508d0c 100644
--- a/include/vkcv/Event.hpp
+++ b/include/vkcv/Event.hpp
@@ -5,6 +5,7 @@
  * @brief Template event struct to synchronize callbacks.
  */
 
+#include <algorithm>
 #include <functional>
 
 #ifndef __MINGW32__
diff --git a/lib/SPIRV-Cross b/lib/SPIRV-Cross
index 5e963d62..2d990d35 160000
--- a/lib/SPIRV-Cross
+++ b/lib/SPIRV-Cross
@@ -1 +1 @@
-Subproject commit 5e963d62fa3f2f0ff891c9f9ca150097127c3aad
+Subproject commit 2d990d355a296ae1e368585810f884ebadcc4773
diff --git a/lib/Vulkan-Headers b/lib/Vulkan-Headers
index 4f51aac1..d192041a 160000
--- a/lib/Vulkan-Headers
+++ b/lib/Vulkan-Headers
@@ -1 +1 @@
-Subproject commit 4f51aac14f65629dfe83702b806f740dbd7bd701
+Subproject commit d192041a2fc9c9fd8ae67d8ae3f32c5511541f04
diff --git a/lib/Vulkan-Hpp b/lib/Vulkan-Hpp
index 128261aa..6fb0c202 160000
--- a/lib/Vulkan-Hpp
+++ b/lib/Vulkan-Hpp
@@ -1 +1 @@
-Subproject commit 128261aa4517aaf3b30809a27311dd7e1cb5dbea
+Subproject commit 6fb0c202be3a13ae8e630fcc734340a6679e8502
diff --git a/lib/VulkanMemoryAllocator b/lib/VulkanMemoryAllocator
index 2f382df2..7942b798 160000
--- a/lib/VulkanMemoryAllocator
+++ b/lib/VulkanMemoryAllocator
@@ -1 +1 @@
-Subproject commit 2f382df218d7e8516dee3b3caccb819a62b571a2
+Subproject commit 7942b798289f752dc23b0a79516fd8545febd718
diff --git a/lib/VulkanMemoryAllocator-Hpp b/lib/VulkanMemoryAllocator-Hpp
index 4aa5600e..8335d9d6 160000
--- a/lib/VulkanMemoryAllocator-Hpp
+++ b/lib/VulkanMemoryAllocator-Hpp
@@ -1 +1 @@
-Subproject commit 4aa5600e01c533edf42620b91a79e199dae6d0a1
+Subproject commit 8335d9d6ff3574c89e6cf363ec1d279179f9b957
diff --git a/lib/glfw b/lib/glfw
index 3eaf1255..b35641f4 160000
--- a/lib/glfw
+++ b/lib/glfw
@@ -1 +1 @@
-Subproject commit 3eaf1255b29fdf5c2895856c7be7d7185ef2b241
+Subproject commit b35641f4a3c62aa86a0b3c983d163bc0fe36026d
diff --git a/modules/asset_loader/lib/json b/modules/asset_loader/lib/json
index bc889afb..9cca280a 160000
--- a/modules/asset_loader/lib/json
+++ b/modules/asset_loader/lib/json
@@ -1 +1 @@
-Subproject commit bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d
+Subproject commit 9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03
diff --git a/modules/asset_loader/lib/stb b/modules/asset_loader/lib/stb
index 5736b15f..013ac3be 160000
--- a/modules/asset_loader/lib/stb
+++ b/modules/asset_loader/lib/stb
@@ -1 +1 @@
-Subproject commit 5736b15f7ea0ffb08dd38af21067c314d6a3aae9
+Subproject commit 013ac3beddff3dbffafd5177e7972067cd2b5083
diff --git a/modules/asset_loader/lib/wuffs-mirror-release-c b/modules/asset_loader/lib/wuffs-mirror-release-c
index e3f919cc..50869df0 160000
--- a/modules/asset_loader/lib/wuffs-mirror-release-c
+++ b/modules/asset_loader/lib/wuffs-mirror-release-c
@@ -1 +1 @@
-Subproject commit e3f919ccfe3ef542cfc983a82146070258fb57f8
+Subproject commit 50869df0ea703b4f41b238bfe26aec6ec9c86889
diff --git a/modules/geometry/lib/glm b/modules/geometry/lib/glm
index 47585fde..33b4a621 160000
--- a/modules/geometry/lib/glm
+++ b/modules/geometry/lib/glm
@@ -1 +1 @@
-Subproject commit 47585fde0c49fa77a2bf2fb1d2ead06999fd4b6e
+Subproject commit 33b4a621a697a305bc3a7610d290677b96beb181
diff --git a/modules/gui/lib/imgui b/modules/gui/lib/imgui
index 6c022f9b..b902fa4c 160000
--- a/modules/gui/lib/imgui
+++ b/modules/gui/lib/imgui
@@ -1 +1 @@
-Subproject commit 6c022f9bf12a39c2dffc8ff0015273ce6737e1a0
+Subproject commit b902fa4c4490ddffb713f8153d1a65e1940e58d1
diff --git a/modules/gui/src/vkcv/gui/GUI.cpp b/modules/gui/src/vkcv/gui/GUI.cpp
index 15a1b049..eaf88651 100644
--- a/modules/gui/src/vkcv/gui/GUI.cpp
+++ b/modules/gui/src/vkcv/gui/GUI.cpp
@@ -90,7 +90,7 @@ namespace vkcv::gui {
 		init_info.MinImageCount = swapchainImageCount;
 		init_info.ImageCount = swapchainImageCount;
 		init_info.CheckVkResultFn = checkVulkanResult;
-		
+
 		const vk::AttachmentDescription attachment (
 				vk::AttachmentDescriptionFlags(),
 				m_core.getSwapchainFormat(swapchainHandle),
@@ -141,19 +141,11 @@ namespace vkcv::gui {
 				&dependency
 		);
 		
-		m_render_pass = m_context.getDevice().createRenderPass(passCreateInfo);
-		
-		ImGui_ImplVulkan_Init(&init_info, static_cast<VkRenderPass>(m_render_pass));
-		
-		auto stream = m_core.createCommandStream(QueueType::Graphics);
-		
-		m_core.recordCommandsToStream(stream, [](const vk::CommandBuffer& commandBuffer) {
-			ImGui_ImplVulkan_CreateFontsTexture(static_cast<VkCommandBuffer>(commandBuffer));
-		}, []() {
-			ImGui_ImplVulkan_DestroyFontUploadObjects();
-		});
+		init_info.RenderPass = m_context.getDevice().createRenderPass(passCreateInfo);
 		
-		m_core.submitCommandStream(stream, false);
+		ImGui_ImplVulkan_Init(&init_info);
+		ImGui_ImplVulkan_CreateFontsTexture();
+
 		m_context.getDevice().waitIdle();
 	}
 	
@@ -161,6 +153,7 @@ namespace vkcv::gui {
 		m_context.getDevice().waitIdle();
 		Window& window = m_core.getWindow(m_windowHandle);
 
+		ImGui_ImplVulkan_DestroyFontsTexture();
 		ImGui_ImplVulkan_Shutdown();
 		
 		m_context.getDevice().destroyRenderPass(m_render_pass);
@@ -188,6 +181,7 @@ namespace vkcv::gui {
 		
 		ImGui_ImplVulkan_NewFrame();
 		ImGui_ImplGlfw_NewFrame();
+		
 		ImGui::NewFrame();
 	}
 	
diff --git a/modules/shader_compiler/lib/SPIRV-Headers b/modules/shader_compiler/lib/SPIRV-Headers
index bdd1b2ab..eb49bb7b 160000
--- a/modules/shader_compiler/lib/SPIRV-Headers
+++ b/modules/shader_compiler/lib/SPIRV-Headers
@@ -1 +1 @@
-Subproject commit bdd1b2ab1f03e616047bbcf8971157dccd50c792
+Subproject commit eb49bb7b1136298b77945c52b4bbbc433f7885de
diff --git a/modules/shader_compiler/lib/glslang b/modules/shader_compiler/lib/glslang
index 4c57db15..68821c4d 160000
--- a/modules/shader_compiler/lib/glslang
+++ b/modules/shader_compiler/lib/glslang
@@ -1 +1 @@
-Subproject commit 4c57db1595462c51d5080893f65c42fc1f318146
+Subproject commit 68821c4da8189262228bbd51e56ed75971b2d2c9
diff --git a/modules/shader_compiler/lib/json-c b/modules/shader_compiler/lib/json-c
index dabed805..6e481aa0 160000
--- a/modules/shader_compiler/lib/json-c
+++ b/modules/shader_compiler/lib/json-c
@@ -1 +1 @@
-Subproject commit dabed80523fa5101e30f0ee57ba06b02beae73eb
+Subproject commit 6e481aa06166c2b31e391005c6e50f0adef5e4d4
diff --git a/modules/shader_compiler/src/vkcv/shader/GlslangCompiler.cpp b/modules/shader_compiler/src/vkcv/shader/GlslangCompiler.cpp
index 1f20daae..2a2847ad 100644
--- a/modules/shader_compiler/src/vkcv/shader/GlslangCompiler.cpp
+++ b/modules/shader_compiler/src/vkcv/shader/GlslangCompiler.cpp
@@ -5,6 +5,7 @@
 #include <vkcv/Logger.hpp>
 
 #include <glslang/SPIRV/GlslangToSpv.h>
+#include <glslang/glslang/Public/ShaderLang.h>
 
 namespace vkcv::shader {
 	
diff --git a/modules/tone_mapping/lib/glsl-tone-map b/modules/tone_mapping/lib/glsl-tone-map
index e3d822ad..0d57803a 160000
--- a/modules/tone_mapping/lib/glsl-tone-map
+++ b/modules/tone_mapping/lib/glsl-tone-map
@@ -1 +1 @@
-Subproject commit e3d822adee738de936da5d9541dff266f899ed46
+Subproject commit 0d57803ab9cc8a6a507d8060b9b5b3b6f3a5d75f
-- 
GitLab