Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure glslang include directories are specified before Vulkan SDK ones
Otherwise some compilation units may use the definitions of inline glslang functions from the Vulkan SDK's copy of glslang instead of the glslang we're using, and if the necessary linker warnings aren't enabled and set as errors (they're not), this can cause ABI issues. I noticed this after encountering stack corruption in glslang::GlslangToSpv as the Vulkan SDK version 1.3.296 provides glslang 15.0.0, where glslang::SpvOptions is ten bytes, whereas I was using glslang 14.3.0, where it's only nine bytes, so initialising defaultOptions would spill one byte past the object's end. Fixing the include order ensures all TUs use the right function implementation and the linker won't randomly pick the wrong one.
- Loading branch information