From 5fc1e3c63db8e82e4a5e5fa9dd39fc462336802c Mon Sep 17 00:00:00 2001 From: Pursche Date: Mon, 10 Aug 2026 03:06:52 +0200 Subject: [PATCH 1/4] Fix Linux/clang build and runtime issues Compile fixes for clang/libstdc++ (MSVC-isms that never surfaced on Windows): - File.cpp: add missing include for std::this_thread::yield - SlangBridge.cpp: drop invalid constexpr from function calling strcmp - GameMessageRouter.h: resolve opcode parameter/local name collision in UnregisterPacketHandler (template was never instantiated on MSVC) - Platform.h: use standard _Pragma for clang; __pragma is MSVC-only and clang only accepts it in MS-compat mode - SpirvReflect.h: restore upstream SPIRV-Reflect include ; the spirv-headers/ prefix only exists in the Windows Vulkan SDK layout Correctness fixes: - Types.h: DECLARE_GENERIC_BITWISE_OPERATORS compound operators reinterpreted small enums through (i32&), a strict-aliasing violation and out-of-bounds RMW; clang's TBAA legally dropped the stores (u8 BufferPassUsage flags stayed NONE and tripped render-graph asserts). Rewritten with value semantics, identical behavior on MSVC. - Zenith.cpp: ToInteger/ToUnsigned returned 0 for plain Lua numbers; fall back to lua_tonumber when the value is not integer-tagged (standard lua_tointegerx semantics) Build system fixes: - ProjectUtil.lua: enable linkgroups on Linux (GNU ld resolves static libs left-to-right; the dependency sort does not fully topo-order), add $ORIGIN rpath so executables find bundled shared libs, and fix the executable extension map (Linux executables have no extension) - libsodium.lua: link system libsodium as -lsodium on Linux - slang.lua: copy the full libslang* runtime family (libslang.so's SONAME points at libslang-compiler.so) into both the Engine and root project bin dirs --- Dependencies/libsodium/libsodium.lua | 2 +- Dependencies/slang/slang.lua | 44 +++++++++++++------ Premake/ProjectUtil.lua | 9 +++- Source/Base/Base/Platform.h | 4 +- Source/Base/Base/Types.h | 6 +-- Source/Filesystem/Filesystem/Core/File.cpp | 1 + .../Gameplay/Network/GameMessageRouter.h | 2 +- .../Renderers/Vulkan/Backend/SpirvReflect.h | 2 +- Source/Scripting/Scripting/Zenith.cpp | 8 +++- .../ShaderCooker/ShaderCooker/SlangBridge.cpp | 2 +- 10 files changed, 53 insertions(+), 27 deletions(-) diff --git a/Dependencies/libsodium/libsodium.lua b/Dependencies/libsodium/libsodium.lua index 55da7431..9178c00b 100644 --- a/Dependencies/libsodium/libsodium.lua +++ b/Dependencies/libsodium/libsodium.lua @@ -9,7 +9,7 @@ Solution.Util.CreateDep(dep.Name, dep.Dependencies, function() Solution.Util.SetLibDirs(libPath) Solution.Util.SetLinks(lib) else - Solution.Util.SetLinks("libsodium") + Solution.Util.SetLinks("sodium") end Solution.Util.SetIncludes(dep.Path) diff --git a/Dependencies/slang/slang.lua b/Dependencies/slang/slang.lua index f3f34928..81555e3c 100644 --- a/Dependencies/slang/slang.lua +++ b/Dependencies/slang/slang.lua @@ -4,31 +4,47 @@ if not vkSdk then end -- Determine platform-specific library paths -local libName, libSrcPath +-- On Linux the slang runtime is split across several libraries (libslang.so is a +-- symlink to libslang-compiler.so., which the executable's SONAME reference +-- points at), so the full libslang* family must be copied, not just libslang.so. +local libSrcPaths if os.target() == "windows" then - libName = "slang.dll" - libSrcPath = vkSdk .. "/bin/" .. libName + libSrcPaths = { vkSdk .. "/bin/slang.dll" } else - libName = "libslang.so" - libSrcPath = vkSdk .. "/lib/" .. libName + libSrcPaths = os.matchfiles(vkSdk .. "/lib/libslang*.so*") + if #libSrcPaths == 0 then + Solution.Util.PrintError("No libslang*.so* found in '" .. vkSdk .. "/lib'. Please ensure the Vulkan SDK ships slang") + end end --- Copy shared library (release version always) during premake generation +-- Copy shared libraries (release version always) during premake generation +-- Copy into both the Engine bin dir and its parent (the root project's bin dir), +-- since executables built by the root project load these from their own directory. local binDir = Solution.Projects.Current.BinDir +local binDirs = { binDir } +local parentBinDir = path.getdirectory(binDir) +if parentBinDir and parentBinDir ~= binDir then + table.insert(binDirs, parentBinDir) +end local configs = { "Debug", "RelDebug", "Release" } +for _, cfgDir in ipairs(binDirs) do for _, cfg in ipairs(configs) do - local destDir = binDir .. "/" .. cfg + local destDir = cfgDir .. "/" .. cfg os.mkdir(destDir) - - local destPath = destDir .. "/" .. libName - local success, err = os.copyfile(libSrcPath, destPath) - if success then - Solution.Util.Print("Copied " .. libName .. " to " .. destDir) - else - Solution.Util.PrintError("Failed to copy " .. libName .. ": " .. (err or "unknown error")) + + for _, libSrcPath in ipairs(libSrcPaths) do + local libName = path.getname(libSrcPath) + local destPath = destDir .. "/" .. libName + local success, err = os.copyfile(libSrcPath, destPath) + if success then + Solution.Util.Print("Copied " .. libName .. " to " .. destDir) + else + Solution.Util.PrintError("Failed to copy " .. libName .. ": " .. (err or "unknown error")) + end end end +end -- Create dependency local dep = Solution.Util.CreateDepTable("Slang-Slang", {}) diff --git a/Premake/ProjectUtil.lua b/Premake/ProjectUtil.lua index 0030dd0c..8892649d 100644 --- a/Premake/ProjectUtil.lua +++ b/Premake/ProjectUtil.lua @@ -44,8 +44,8 @@ end systemToExecutableExtensionMap = { - windows = "exe", - linux = "sh" + windows = ".exe", + linux = "" } systemToDynamicLibExtensionMap = @@ -237,6 +237,11 @@ Solution.Util.CreateProject = function(name, projectType, binDir, dependencies, characterset ("ASCII") editandcontinue "Off" + filter "system:linux" + linkgroups "On" + linkoptions { "-Wl,-rpath,'$$ORIGIN'" } + filter {} + filter "configurations:Debug" runtime "Debug" symbols "On" diff --git a/Source/Base/Base/Platform.h b/Source/Base/Base/Platform.h index b734db86..e1f3e3e6 100644 --- a/Source/Base/Base/Platform.h +++ b/Source/Base/Base/Platform.h @@ -50,8 +50,8 @@ inline void ReleaseModeBreakpoint() #endif #if defined(__clang__) -#define PRAGMA_NO_PADDING_START __pragma(pack(push, 1)) -#define PRAGMA_NO_PADDING_END __pragma(pack(pop)) +#define PRAGMA_NO_PADDING_START _Pragma("pack(push, 1)") +#define PRAGMA_NO_PADDING_END _Pragma("pack(pop)") #elif defined(_MSC_VER) #define PRAGMA_NO_PADDING_START __pragma(pack(push, 1)) diff --git a/Source/Base/Base/Types.h b/Source/Base/Base/Types.h index b30b6b0c..0621889a 100644 --- a/Source/Base/Base/Types.h +++ b/Source/Base/Base/Types.h @@ -48,9 +48,9 @@ struct EnumTraits; inline const T operator| (T a, T b) { return (T)((i32)a | (i32)b); } \ inline const T operator& (T a, T b) { return (T)((i32)a & (i32)b); } \ inline const T operator^ (T a, T b) { return (T)((i32)a ^ (i32)b); } \ -inline const T& operator|= (T& a, T b) { return (T&)((i32&)a |= (i32)b); } \ -inline const T& operator&= (T& a, T b) { return (T&)((i32&)a &= (i32)b); } \ -inline const T& operator^= (T& a, T b) { return (T&)((i32&)a ^= (i32)b); } +inline const T& operator|= (T& a, T b) { a = (T)((i32)a | (i32)b); return a; } \ +inline const T& operator&= (T& a, T b) { a = (T)((i32)a & (i32)b); return a; } \ +inline const T& operator^= (T& a, T b) { a = (T)((i32)a ^ (i32)b); return a; } // Define extra implicit conversions for ImGui vector classes #define IM_VEC2_CLASS_EXTRA \ diff --git a/Source/Filesystem/Filesystem/Core/File.cpp b/Source/Filesystem/Filesystem/Core/File.cpp index 0872bd0a..84b3a902 100644 --- a/Source/Filesystem/Filesystem/Core/File.cpp +++ b/Source/Filesystem/Filesystem/Core/File.cpp @@ -8,6 +8,7 @@ #include #include +#include namespace fs = std::filesystem; diff --git a/Source/Gameplay/Gameplay/Network/GameMessageRouter.h b/Source/Gameplay/Gameplay/Network/GameMessageRouter.h index 2591a3b4..ed15e651 100644 --- a/Source/Gameplay/Gameplay/Network/GameMessageRouter.h +++ b/Source/Gameplay/Gameplay/Network/GameMessageRouter.h @@ -60,7 +60,7 @@ namespace Network } template - void UnregisterPacketHandler(OpcodeType opcode) + void UnregisterPacketHandler(OpcodeType /*opcode*/) { auto opcode = static_cast(PacketStruct::PACKET_ID); diff --git a/Source/Renderer/Renderer/Renderers/Vulkan/Backend/SpirvReflect.h b/Source/Renderer/Renderer/Renderers/Vulkan/Backend/SpirvReflect.h index c6e13ee9..437fb1f8 100644 --- a/Source/Renderer/Renderer/Renderers/Vulkan/Backend/SpirvReflect.h +++ b/Source/Renderer/Renderer/Renderers/Vulkan/Backend/SpirvReflect.h @@ -33,7 +33,7 @@ VERSION HISTORY #define SPIRV_REFLECT_USE_SYSTEM_SPIRV_H #if defined(SPIRV_REFLECT_USE_SYSTEM_SPIRV_H) -#include +#include #else #include "./include/spirv/unified1/spirv.h" #endif diff --git a/Source/Scripting/Scripting/Zenith.cpp b/Source/Scripting/Scripting/Zenith.cpp index 7d7a2168..819a130e 100644 --- a/Source/Scripting/Scripting/Zenith.cpp +++ b/Source/Scripting/Scripting/Zenith.cpp @@ -251,11 +251,15 @@ namespace Scripting } i64 Zenith::ToInteger(i32 index) { - return lua_tointeger64(state, index, nullptr); + i32 isInteger = 0; + i64 result = lua_tointeger64(state, index, &isInteger); + if (!isInteger && lua_type(state, index) == LUA_TNUMBER) + result = static_cast(lua_tonumber(state, index)); + return result; } u64 Zenith::ToUnsigned(i32 index) { - return std::bit_cast(lua_tointeger64(state, index, nullptr)); + return std::bit_cast(ToInteger(index)); } f64 Zenith::ToNumber(i32 index) { diff --git a/Source/ShaderCooker/ShaderCooker/SlangBridge.cpp b/Source/ShaderCooker/ShaderCooker/SlangBridge.cpp index 68d9d399..ff6a8915 100644 --- a/Source/ShaderCooker/ShaderCooker/SlangBridge.cpp +++ b/Source/ShaderCooker/ShaderCooker/SlangBridge.cpp @@ -71,7 +71,7 @@ namespace ShaderCooker (char*)"ms", // Mesh Shader (char*)"as" // Amplification Shader (used with Mesh Shaders) }; - constexpr i32 ProfileToProfileIndex(const std::string& profile) + inline i32 ProfileToProfileIndex(const std::string& profile) { i32 currentProfileIndex = 0; for (char* validProfile : validProfilesArray) From d7b929007983299f673341d14f5b7da8ea6bd4be Mon Sep 17 00:00:00 2001 From: Pursche Date: Mon, 10 Aug 2026 03:26:12 +0200 Subject: [PATCH 2/4] Revert Zenith::ToInteger double fallback; integers are a distinct type Integers in this Luau fork are a first-class 64-bit language type, not a host-side conversion convenience. The strict tag-only read in lua_tointeger64 is intentional: implicitly converting plain doubles would blur the type boundary and silently lose precision past 2^53. The failing automation test read double-typed globals through the integer API; the test is being fixed to use integer literals instead. This reverts the Zenith.cpp hunk of d6753b1. --- Source/Scripting/Scripting/Zenith.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Source/Scripting/Scripting/Zenith.cpp b/Source/Scripting/Scripting/Zenith.cpp index 819a130e..7d7a2168 100644 --- a/Source/Scripting/Scripting/Zenith.cpp +++ b/Source/Scripting/Scripting/Zenith.cpp @@ -251,15 +251,11 @@ namespace Scripting } i64 Zenith::ToInteger(i32 index) { - i32 isInteger = 0; - i64 result = lua_tointeger64(state, index, &isInteger); - if (!isInteger && lua_type(state, index) == LUA_TNUMBER) - result = static_cast(lua_tonumber(state, index)); - return result; + return lua_tointeger64(state, index, nullptr); } u64 Zenith::ToUnsigned(i32 index) { - return std::bit_cast(ToInteger(index)); + return std::bit_cast(lua_tointeger64(state, index, nullptr)); } f64 Zenith::ToNumber(i32 index) { From 8d99b5ae2abee6634a404ee486ab2874be1ae4fc Mon Sep 17 00:00:00 2001 From: Foereaper Date: Mon, 10 Aug 2026 10:33:29 +0200 Subject: [PATCH 3/4] Improve Vulkan and Slang SDK discovery --- Dependencies/slang/slang.lua | 164 ++++++++++++++++++++++++--------- Dependencies/vulkan/vulkan.lua | 96 ++++++++++++++----- 2 files changed, 196 insertions(+), 64 deletions(-) diff --git a/Dependencies/slang/slang.lua b/Dependencies/slang/slang.lua index 81555e3c..d4d6ae07 100644 --- a/Dependencies/slang/slang.lua +++ b/Dependencies/slang/slang.lua @@ -1,56 +1,134 @@ -local vkSdk = os.getenv("VULKAN_SDK") -if not vkSdk then - Solution.Util.PrintError("VULKAN_SDK not found. Please ensure Vulkan SDK is installed.") -end +local function getSlangInfo() + if os.target() == "linux" then + local includeDirs = {} + local libDirs = {} + local runtimeLibraries = {} + + if os.host() == "linux" then + local slangSDK = os.getenv("SLANG_SDK") or os.getenv("VULKAN_SDK") + local includeDir + local libDir + + if slangSDK then + includeDir = slangSDK .. "/include" + libDir = slangSDK .. "/lib" + + if not os.isfile(includeDir .. "/slang/slang.h") then + Solution.Util.PrintError( + "The configured SDK does not contain Slang headers: '" .. includeDir .. "'." + ) + end + + if not os.isfile(libDir .. "/libslang.so") then + Solution.Util.PrintError( + "The configured SDK does not contain the Slang library: '" .. libDir .. "'." + ) + end + else + includeDir = os.findheader("slang/slang.h") + libDir = os.findlib("slang") + end + + if not includeDir then + Solution.Util.PrintError( + "Failed to find the Slang headers in the system include paths. " .. + "Source the Vulkan SDK's setup-env.sh, set SLANG_SDK, or install Slang system-wide." + ) + end + + if not libDir then + Solution.Util.PrintError( + "Failed to find the Slang shared library in the system library paths. " .. + "Source the Vulkan SDK's setup-env.sh, set SLANG_SDK, or install Slang system-wide." + ) + end --- Determine platform-specific library paths --- On Linux the slang runtime is split across several libraries (libslang.so is a --- symlink to libslang-compiler.so., which the executable's SONAME reference --- points at), so the full libslang* family must be copied, not just libslang.so. -local libSrcPaths -if os.target() == "windows" then - libSrcPaths = { vkSdk .. "/bin/slang.dll" } -else - libSrcPaths = os.matchfiles(vkSdk .. "/lib/libslang*.so*") - if #libSrcPaths == 0 then - Solution.Util.PrintError("No libslang*.so* found in '" .. vkSdk .. "/lib'. Please ensure the Vulkan SDK ships slang") + table.insert(includeDirs, includeDir) + table.insert(libDirs, libDir) + + if slangSDK then + runtimeLibraries = os.matchfiles(libDir .. "/libslang*.so*") + end + end + + -- Requiring slang/slang.h distinguishes Shader Slang from the unrelated + -- S-Lang terminal library commonly installed by Linux distributions. + return { + includeDirs = includeDirs, + libDirs = libDirs, + runtimeLibraries = runtimeLibraries + } + end + + -- Newer Vulkan SDKs bundle Slang. SLANG_SDK also permits a standalone Slang + -- installation without forcing Vulkan and Slang to share an SDK root. + local slangSDK = os.getenv("SLANG_SDK") or os.getenv("VULKAN_SDK") + if not slangSDK then + Solution.Util.PrintError( + "Failed to find Slang. Please set SLANG_SDK to the Slang SDK root, " .. + "or VULKAN_SDK when using a Vulkan SDK that bundles Slang." + ) end -end --- Copy shared libraries (release version always) during premake generation --- Copy into both the Engine bin dir and its parent (the root project's bin dir), --- since executables built by the root project load these from their own directory. -local binDir = Solution.Projects.Current.BinDir -local binDirs = { binDir } -local parentBinDir = path.getdirectory(binDir) -if parentBinDir and parentBinDir ~= binDir then - table.insert(binDirs, parentBinDir) + local runtimeLibraries + if os.target() == "windows" then + runtimeLibraries = { slangSDK .. "/bin/slang.dll" } + else + runtimeLibraries = os.matchfiles(slangSDK .. "/lib/libslang*.so*") + end + + return { + includeDirs = { slangSDK .. "/include" }, + libDirs = { slangSDK .. "/lib" }, + runtimeLibraries = runtimeLibraries + } end -local configs = { "Debug", "RelDebug", "Release" } - -for _, cfgDir in ipairs(binDirs) do -for _, cfg in ipairs(configs) do - local destDir = cfgDir .. "/" .. cfg - os.mkdir(destDir) - - for _, libSrcPath in ipairs(libSrcPaths) do - local libName = path.getname(libSrcPath) - local destPath = destDir .. "/" .. libName - local success, err = os.copyfile(libSrcPath, destPath) - if success then - Solution.Util.Print("Copied " .. libName .. " to " .. destDir) - else - Solution.Util.PrintError("Failed to copy " .. libName .. ": " .. (err or "unknown error")) + +local function copyRuntimeLibraries(runtimeLibraries) + if not runtimeLibraries or #runtimeLibraries == 0 then + return + end + + -- Root projects can place executables one level above the Engine bin directory. + local binDir = Solution.Projects.Current.BinDir + local binDirs = { binDir } + local parentBinDir = path.getdirectory(binDir) + if parentBinDir and parentBinDir ~= binDir then + table.insert(binDirs, parentBinDir) + end + + local configs = { "Debug", "RelDebug", "Release" } + + for _, runtimeLibrary in ipairs(runtimeLibraries) do + local runtimeLibraryName = path.getname(runtimeLibrary) + + for _, cfgDir in ipairs(binDirs) do + for _, cfg in ipairs(configs) do + local destDir = cfgDir .. "/" .. cfg + os.mkdir(destDir) + + local destPath = destDir .. "/" .. runtimeLibraryName + local success, err = os.copyfile(runtimeLibrary, destPath) + if success then + Solution.Util.Print("Copied " .. runtimeLibraryName .. " to " .. destDir) + else + Solution.Util.PrintError( + "Failed to copy " .. runtimeLibraryName .. " from '" .. runtimeLibrary .. "': " .. + (err or "unknown error") + ) + end + end end end end -end --- Create dependency +local slangInfo = getSlangInfo() +copyRuntimeLibraries(slangInfo.runtimeLibraries) + local dep = Solution.Util.CreateDepTable("Slang-Slang", {}) Solution.Util.CreateDep(dep.NameLow, dep.Dependencies, function() - Solution.Util.SetIncludes(vkSdk .. "/include") - Solution.Util.SetLibDirs(vkSdk .. "/lib") + Solution.Util.SetIncludes(slangInfo.includeDirs) + Solution.Util.SetLibDirs(slangInfo.libDirs) Solution.Util.SetLinks("slang") end) diff --git a/Dependencies/vulkan/vulkan.lua b/Dependencies/vulkan/vulkan.lua index e5207104..89df92f4 100644 --- a/Dependencies/vulkan/vulkan.lua +++ b/Dependencies/vulkan/vulkan.lua @@ -1,24 +1,73 @@ local function getVulkanInfo() - local envName = "VULKAN_SDK" local includeDirs = {} + local libDirs = {} local libs = {} - - local vulkanSDK = os.getenv(envName) - if not vulkanSDK then - Solution.Util.PrintError("Failed to find Vulkan SDK with system variable '" .. envName .. "'. Please ensure Vulkan is installed and configured properly") - end - - -- Add Includes path - table.insert(includeDirs, vulkanSDK .. "/include") - - -- Add Library - if os.target() == "windows" then - table.insert(libs, vulkanSDK .. "/lib/vulkan-1.lib") - else + + if os.target() == "linux" then + if os.host() == "linux" then + local vulkanSDK = os.getenv("VULKAN_SDK") + local includeDir + local libDir + + if vulkanSDK then + includeDir = vulkanSDK .. "/include" + libDir = vulkanSDK .. "/lib/VulkanLoader/lib" + + if not os.isfile(includeDir .. "/vulkan/vulkan.h") then + Solution.Util.PrintError( + "VULKAN_SDK does not contain Vulkan headers: '" .. includeDir .. "'." + ) + end + + if not os.isfile(libDir .. "/libvulkan.so") then + Solution.Util.PrintError( + "VULKAN_SDK does not contain the Vulkan loader: '" .. libDir .. "'." + ) + end + else + includeDir = os.findheader("vulkan/vulkan.h") + libDir = os.findlib("vulkan") + end + + if not includeDir then + Solution.Util.PrintError( + "Failed to find the Vulkan headers in the system include paths. " .. + "Source the Vulkan SDK's setup-env.sh, or install the Vulkan development packages." + ) + end + + if not libDir then + Solution.Util.PrintError( + "Failed to find the Vulkan loader in the system library paths. " .. + "Source the Vulkan SDK's setup-env.sh, or install the Vulkan development packages." + ) + end + + table.insert(includeDirs, includeDir) + table.insert(libDirs, libDir) + end + table.insert(libs, "vulkan") + else + local envName = "VULKAN_SDK" + local vulkanSDK = os.getenv(envName) + if not vulkanSDK then + Solution.Util.PrintError( + "Failed to find the Vulkan SDK with system variable '" .. envName .. "'. " .. + "Please ensure Vulkan is installed and configured properly." + ) + end + + table.insert(includeDirs, vulkanSDK .. "/include") + + if os.target() == "windows" then + table.insert(libs, vulkanSDK .. "/lib/vulkan-1.lib") + else + table.insert(libs, "vulkan") + end end - - return includeDirs, libs + + return includeDirs, libDirs, libs end local dep = Solution.Util.CreateDepTable("vulkan", {}) @@ -26,15 +75,20 @@ local dep = Solution.Util.CreateDepTable("vulkan", {}) Solution.Util.CreateDep(dep.Name, dep.Dependencies, function() local cachedData = Solution.Util.GetDepCache(dep.Name, "cache") - local includeDirs, libs + local includeDirs, libDirs, libs if cachedData then - includeDirs, libs = cachedData.includes, cachedData.libs + includeDirs, libDirs, libs = cachedData.includes, cachedData.libDirs, cachedData.libs else - includeDirs, libs = getVulkanInfo() - Solution.Util.SetDepCache(dep.Name, "cache", { includes = includeDirs, libs = libs }) + includeDirs, libDirs, libs = getVulkanInfo() + Solution.Util.SetDepCache(dep.Name, "cache", { + includes = includeDirs, + libDirs = libDirs, + libs = libs + }) end Solution.Util.SetIncludes(includeDirs) + Solution.Util.SetLibDirs(libDirs) Solution.Util.SetLinks(libs) Solution.Util.SetDefines({ "_CRT_SECURE_NO_WARNINGS" }) -end) \ No newline at end of file +end) From 7a9ca801c95a938ad17f1058c036b50ebade2ea8 Mon Sep 17 00:00:00 2001 From: Pursche Date: Tue, 11 Aug 2026 01:19:07 +0200 Subject: [PATCH 4/4] Support alternate SPIR-V header layouts --- .../Renderer/Renderers/Vulkan/Backend/SpirvReflect.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Renderer/Renderer/Renderers/Vulkan/Backend/SpirvReflect.h b/Source/Renderer/Renderer/Renderers/Vulkan/Backend/SpirvReflect.h index 437fb1f8..46e4768e 100644 --- a/Source/Renderer/Renderer/Renderers/Vulkan/Backend/SpirvReflect.h +++ b/Source/Renderer/Renderer/Renderers/Vulkan/Backend/SpirvReflect.h @@ -33,7 +33,13 @@ VERSION HISTORY #define SPIRV_REFLECT_USE_SYSTEM_SPIRV_H #if defined(SPIRV_REFLECT_USE_SYSTEM_SPIRV_H) +#if __has_include() #include +#elif __has_include() +#include +#else +#error "Unable to locate SPIR-V headers" +#endif #else #include "./include/spirv/unified1/spirv.h" #endif @@ -2465,4 +2471,4 @@ namespace spv_reflect { #endif // defined(__cplusplus) && !defined(SPIRV_REFLECT_DISABLE_CPP_WRAPPER) #endif // SPIRV_REFLECT_H -// clang-format on \ No newline at end of file +// clang-format on