KhronosGroup / KhronosGroup/glslang
The extension directives must occur before any non-preprocessor tokens.
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
Hi,
the ogl specs says : **the extension directives must occur before any non-preprocessor tokens.** . So follow the spec,
the glslang should report the error for following shader:
```
#version 300 es
#extension all : warn
precision mediump float;
in highp vec4 dEQP_Position;
void main()
{
#extension all : disable // compile error
gl_Position = vec4(1.0);
}
```
spec:
https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.4.60.pdf
Contributor guide
Research direction
Start by reproducing the shader in the issue with glslang and read the GLSL extension-directive parsing and validation entry points. Confirm that a directive after non-preprocessor tokens is diagnosed as an error, then add or update a regression test showing the expected diagnostic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100