GL_GOOGLE_cpp_style_line_directive not reported even though functionality is implemented (driver bug?)

Consider this shader:

#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.

Is this extension in the official GL extension registry? If not it seems like the correct behaviour to mark it as unsupported.

The functionality might also be there due to GL_ARB_shading_language_include?

Just guessing here since I am unfamiliar with this Google extension.

1 Like

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.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.