shaderc icon indicating copy to clipboard operation
shaderc copied to clipboard

Shader stage does matter for preprocessing

Open benjamin-otte opened this issue 2 years ago • 0 comments

https://github.com/google/shaderc/blob/main/libshaderc_util/src/compiler.cc#L468C10-L468C11 claims:

  // The stage does not matter for preprocessing.
  glslang::TShader shader(EShLangVertex);

However, glslang does use the language for setting defines in https://github.com/KhronosGroup/glslang/blob/main/glslang/MachineIndependent/Versions.cpp#L642

The result of this mismatch is that GL_VERTEX_SHADER is defined for every shader.

benjamin-otte avatar Aug 19 '23 05:08 benjamin-otte