KhronosGroup / KhronosGroup/glslang
--glsl-version flag for glslangValidator.exe does not work
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
Repro:
1. create shader file 'test.vert'
```
#version 300 es
layout (location = 0) uniform vec4 test;
void main()
{
}
```
2. test file using glslangValidator.exe
`glslangValidator.exe -S vert --glsl-version 310es test.vert`
3. result:
`ERROR: 0:1: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
ERROR: 1 compilation errors. No code generated.
`
4. expected behavior:
`code compiles`
After changing `#version 300 es` in source code to `#version 310 es` error is gone.
Glslang Version: 11:15.1.0
Contributor guide
Research direction
Reproduce the issue with test.vert and glslangValidator.exe using --glsl-version 310es, then inspect how that flag selects the GLSL version. Done means the supplied shader compiles without changing its #version directive and the existing error is resolved.
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
- Mostly clear
- Newbie friendliness
- 45/100