From 76219fd1e22f3bfffae94de949247cc1b6594231 Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Sun, 18 Oct 2026 05:53:10 -0400 Subject: [PATCH] lower Vulkan requirement and fix shaderc includes (#7902) Lower Vulkan version requirement to 1.4.304, which should be the lowest version supported without requiring code changes. This should also offer out of the box support on current Linux distros, such as Debian 13 (trixie) and Ubuntu 25.10 (questing) & 26.04 (resolute). Also make sure that the shaderc headers are available and added to the include path on Linux when using system libraries. --- lib/vulkan.cmake | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/vulkan.cmake b/lib/vulkan.cmake index 6d451cafa8..395ec08452 100644 --- a/lib/vulkan.cmake +++ b/lib/vulkan.cmake @@ -161,7 +161,19 @@ endif() # Note that we only rely on the headers and do NOT link against the Vulkan libs! if(NOT USING_PREBUILT_VULKAN) - find_package(Vulkan 1.4.341 REQUIRED) + # oldest version that shouldn't require code changes to support + find_package(Vulkan 1.4.304 REQUIRED) + + # shaderc ships separately from the Vulkan headers on most Linux distros + find_path(SHADERC_INCLUDE_DIR shaderc/shaderc.h) + + if(NOT SHADERC_INCLUDE_DIR) + message(FATAL_ERROR + "shaderc headers not found. Install them (Debian/Ubuntu: libshaderc-dev) or " + "the Vulkan SDK, or configure with -DVULKAN_USE_PRECOMPILED=ON.") + endif() + + target_include_directories(Vulkan::Headers SYSTEM INTERFACE "${SHADERC_INCLUDE_DIR}") endif() # prebuilt