#version 460 core
// Requiring/Enabling the extensions throws error/warning saying unsupported
#extension GL_GOOGLE_cpp_style_line_directive : enable
// But this works regardless
#line 1 "Included filename"
void main() {}
Shader info log says that GL_GOOGLE_cpp_style_line_directive is not supported, but I can still use its functionality (denote source file for line directive).
It could be a driver bug or there is some other extension implicitly enabled that I am not aware of as this is not core glsl functionality. Either way, I think GL_GOOGLE_cpp_style_line_directive should not be considered unsupported by the glsl #extension mechanism.
Thanks, I didn’t know ARB_shading_language_include allowed this behaviour as well.
You are right GL_GOOGLE_cpp_style_line_directive is not in the GL extension registry, so I wouldn’t expect it to show under glGetStringi(GL_EXTENSIONS, index), but when asking for support in the shader itself thats a different story.
The reason I expected it to be there and opened this ticket is because thats how you enable ‘#line SourceFile’ on AMD.