KhronosGroup / KhronosGroup/SPIRV-Cross
[GLSL] Invalid tess control shader is generated if fixup_clipspace is true.
- Dominant language
- GLSL
- Stars
- 2.5k
- Forks
- 713
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 16
Description
When `fixup_clipspace` is enabled, spirv-cross will patch the shader with:
```
gl_Position.z = 2.0 * gl_Position.z - gl_Position.w;
```
But in TessControl shader, there is no 'gl_Position' defined. I'm also wondering whether clip-space-fixing is really desired in TessControl shader, because in most cases the outputs of this stage are not perspective-divided.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the `fixup_clipspace` handling for TessControl shader generation and inspect the emitted `gl_Position` use. Clarify whether clip-space fixing is intended at this stage, then ensure the generated shader is valid and its behavior matches that decision.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100