-
Notifications
You must be signed in to change notification settings - Fork 416
Open
Description
Pretty straight forward to explain. preprocessing with glslc -E does not escape newlines in string literals when re-printing the string literal. This results in string literals breaking the source if they're used.
Minimal reproducible example:
~> cat shader.glsl
#version 450
#extension GL_EXT_debug_printf : enable
int main(){
debugPrintf("with Newline\n");
}
~> glslc -E shader.glsl
#version 450
#extension GL_EXT_debug_printf : enable
int main() {
debugPrintf("with Newline
");
}
~> glslc --version
shaderc v2023.8 v2025.3
spirv-tools v2025.3 v2022.4-833-g33e02568
glslang 11.1.0-1253-gefd24d75
Target: SPIR-V 1.0
Metadata
Metadata
Assignees
Labels
No labels