Skip to content

Instantly share code, notes, and snippets.

@codedipper
Created December 16, 2023 20:30
Show Gist options
  • Save codedipper/684fb9fffa1b2f68cd8b7cf6ec89ee4f to your computer and use it in GitHub Desktop.
Save codedipper/684fb9fffa1b2f68cd8b7cf6ec89ee4f to your computer and use it in GitHub Desktop.
When compiling Vulkan components for SuperTuxKart 1.4 on newer versions of GCC, you may see missing headers. This patch includes them.
diff --git a/lib/graphics_engine/include/vk_mem_alloc.h b/lib/graphics_engine/include/vk_mem_alloc.h
index bdb4ff576..df1f5d98f 100644
--- a/lib/graphics_engine/include/vk_mem_alloc.h
+++ b/lib/graphics_engine/include/vk_mem_alloc.h
@@ -2645,6 +2645,7 @@ remove them if not needed.
#include <cassert> // for assert
#include <algorithm> // for min, max
#include <mutex>
+ #include <cstdio>
#else
#include VMA_CONFIGURATION_USER_INCLUDES_H
#endif
diff --git a/lib/graphics_engine/src/ge_spm_buffer.cpp b/lib/graphics_engine/src/ge_spm_buffer.cpp
index 0dfa2829f..a682f161a 100644
--- a/lib/graphics_engine/src/ge_spm_buffer.cpp
+++ b/lib/graphics_engine/src/ge_spm_buffer.cpp
@@ -5,6 +5,7 @@
#include "ge_vulkan_features.hpp"
#include <algorithm>
+#include <stdexcept>
namespace GE
{
diff --git a/lib/graphics_engine/src/ge_vulkan_array_texture.cpp b/lib/graphics_engine/src/ge_vulkan_array_texture.cpp
index f3361478c..0f817dc40 100644
--- a/lib/graphics_engine/src/ge_vulkan_array_texture.cpp
+++ b/lib/graphics_engine/src/ge_vulkan_array_texture.cpp
@@ -12,6 +12,7 @@
#include <IImageLoader.h>
#include <cassert>
+#include <stdexcept>
namespace GE
{
diff --git a/lib/graphics_engine/src/ge_vulkan_command_loader.cpp b/lib/graphics_engine/src/ge_vulkan_command_loader.cpp
index 358cf9ab6..3cc0f563b 100644
--- a/lib/graphics_engine/src/ge_vulkan_command_loader.cpp
+++ b/lib/graphics_engine/src/ge_vulkan_command_loader.cpp
@@ -11,6 +11,7 @@
#include <thread>
#include "../source/Irrlicht/os.h"
+#include <stdexcept>
#ifndef thread_local
# if __STDC_VERSION__ >= 201112 && !defined __STDC_NO_THREADS__
diff --git a/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp b/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp
index 25cb24296..32966fb63 100644
--- a/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp
+++ b/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp
@@ -2,6 +2,7 @@
#include "ge_main.hpp"
#include "ge_vulkan_driver.hpp"
+#include <stdexcept>
namespace GE
{
diff --git a/lib/graphics_engine/src/ge_vulkan_draw_call.cpp b/lib/graphics_engine/src/ge_vulkan_draw_call.cpp
index ee8fd08fc..66fc29b61 100644
--- a/lib/graphics_engine/src/ge_vulkan_draw_call.cpp
+++ b/lib/graphics_engine/src/ge_vulkan_draw_call.cpp
@@ -27,6 +27,7 @@
#include <limits>
#include "../source/Irrlicht/os.h"
+#include <stdexcept>
#include "quaternion.h"
namespace GE
diff --git a/lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp b/lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp
index 9413a04bb..ba30aeedf 100644
--- a/lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp
+++ b/lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp
@@ -3,6 +3,7 @@
#include "ge_main.hpp"
#include "ge_vulkan_depth_texture.hpp"
#include "ge_vulkan_driver.hpp"
+#include <stdexcept>
#include <array>
#include <exception>
diff --git a/lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp b/lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp
index 380f348df..f510f9181 100644
--- a/lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp
+++ b/lib/graphics_engine/src/ge_vulkan_mesh_cache.cpp
@@ -10,6 +10,7 @@
#include <algorithm>
#include <cassert>
+#include <stdexcept>
#include <vector>
namespace GE
diff --git a/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp b/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp
index 2543b1608..b34340d76 100644
--- a/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp
+++ b/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp
@@ -12,6 +12,7 @@
#include <array>
#include <cstdint>
#include <unordered_map>
+#include <stdexcept>
namespace GE
{
diff --git a/lib/graphics_engine/src/ge_vulkan_texture.cpp b/lib/graphics_engine/src/ge_vulkan_texture.cpp
index 500eb65fc..2a0f99f00 100644
--- a/lib/graphics_engine/src/ge_vulkan_texture.cpp
+++ b/lib/graphics_engine/src/ge_vulkan_texture.cpp
@@ -20,6 +20,7 @@ extern "C"
#include <cstdio>
#include <IAttributes.h>
#include <IImageLoader.h>
+#include <stdexcept>
#include <limits>
namespace GE
diff --git a/lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp b/lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp
index 4fd8a2e88..f243d368a 100644
--- a/lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp
+++ b/lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp
@@ -3,6 +3,7 @@
#include "ge_main.hpp"
#include "ge_vulkan_driver.hpp"
#include "ge_vulkan_texture.hpp"
+#include <stdexcept>
#include <algorithm>
#include <exception>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment