KhronosGroup / KhronosGroup/glslang
glslangValidator '-e' doesn't work correctly
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
I've got this shader code:
```glsl
#version 450
void mainVS()
{
gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
}
```
and when I run
`glslangValidator -V -S vert -e mainVS -o vertex_shader.spv shader.glsl`
I get this error: `ERROR: Linking vertex stage: Missing entry point: Each stage requires one entry point`
when I change `void mainVS()` to `void main()` and run `glslangValidator...` again, it works fine.
Contributor guide
Research direction
Start by reproducing the reported command with the provided shader and compare it with the version using main(). Trace how glslangValidator handles the -e entry-point option for the vertex stage. Done means a named entry point such as mainVS is accepted and the shader produces vertex_shader.spv without the missing-entry-point error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers, computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100