KhronosGroup / glslang

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

Is HLSL preprocessed output supported? #1520

Closed kpyzhov closed 5 years ago

kpyzhov commented 6 years ago

Hello, I'm trying to get the preprocessed HLSL text. Here is how I do it: glslangValidator.exe -E -S vert -D <hlsl_shader> The preprocessed output text is generated, however I'm seeing the following error message dumped to stderr:

ERROR: HLSL currently only supported when requesting SPIR-V for Vulkan.
ERROR: HLSL currently only supported when requesting SPIR-V for Vulkan.

Does that mean that generated preprocessed text may be incorrect? Thanks!

johnkslang commented 5 years ago

It won't affect the preprocessing. But, getting preprocessed output might not fully work; it's never been a goal and hence a fully-tested feature. (Someone just added the part that was easy to do.)

johnkslang commented 5 years ago

The incorrect error messaging is fixed by https://github.com/KhronosGroup/glslang/commit/086febc448e083254eb34335fad5e029e7977af4, which had a typo regarding the issue it addressed.