KhronosGroup / glslang

Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Other
2.95k stars 819 forks source link

OpLines incorrect for HLSL with #lines from multiple files #1575

Closed greg-lunarg closed 5 years ago

greg-lunarg commented 5 years ago

Execute the following on the files in the attached .zip:

glslangValidator.exe -D -V -e MainPs -g -o foo4.i.frag.spv foo4.i.frag

Notice that while the #line directives indicate that the source came from multiple files, the OpLines specify that all source came from foo4.frag.

i2.zip

greg-lunarg commented 5 years ago

@johnkslang I am going to start looking at this.

johnkslang commented 5 years ago

Okay, thanks.

Note that each node tracks its location, including string number or compilation unit, but that no work has been done yet to map that through to OpLine support.