File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,12 +20,19 @@ DispatchLoaderDynamic & ggml_vk_default_dispatcher();
2020#define VULKAN_HPP_DEFAULT_DISPATCHER ggml_vk_default_dispatcher()
2121
2222#include <vulkan/vulkan.hpp>
23- // SPIRV-Headers: LunarG Windows SDK uses Include/spirv-headers/spirv.hpp (not spirv/unified1/). MinGW/MSYS2 and
24- // Linux packages use Khronos layout spirv/unified1/spirv.hpp. See docs/build.md#vulkan.
25- #if defined(_WIN32) && !defined(__MINGW32__)
26- #include <spirv-headers/spirv.hpp>
23+
24+ // SPIR-V Headers: different SDK installations expose different include paths.
25+ // LunarG Vulkan SDK on Windows typically provides <spirv-headers/spirv.hpp>.
26+ // Linux packages, MSYS2 and MinGW often use the Khronos layout <spirv/unified1/spirv.hpp>.
27+ #if __has_include(<spirv/unified1/spirv.hpp>)
28+ # include <spirv/unified1/spirv.hpp>
29+ #elif __has_include(<spirv-headers/spirv.hpp>)
30+ # include <spirv-headers/spirv.hpp>
31+ #elif __has_include(<spirv.hpp>)
32+ # include <spirv.hpp>
2733#else
28- #include <spirv/unified1/spirv.hpp>
34+ // Fallback to let the compiler throw a standard "file not found" error
35+ # include <spirv/unified1/spirv.hpp>
2936#endif
3037
3138#include <algorithm>
You can’t perform that action at this time.
0 commit comments