Skip to content

glsl/spirv_shaderc: check if shaderc recognizes Vulkan 1.4

With older versions of shaderc that don't recognize Vulkan 1.4, setting the environment would fall through to Vulkan 1.0, creating a mismatch between the SPIR-V version and the Vulkan version.

A version check for shaderc is not possible because everything after v2023.8 uses the same version due to a malformed version line. So instead, we check if the relevant enum defines exist.

See: https://github.com/google/shaderc/issues/1496

This issue occurs when shaderc supports SPIR-V 1.6 but not Vulkan 1.4, which uses the same SPIR-V version as Vulkan 1.3. As a result, clamping only the SPIR-V version is no longer sufficient.

Fixes: 4c6d99ed Fixes: #335 (closed) Fixes: https://github.com/haasn/libplacebo/issues/333

Merge request reports

Loading