KhronosGroup / KhronosGroup/glslang
HLSL: Using SV_ClipDistance in Geometry Shader - Crash
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
I have a code like this:
```
[maxvertexcount(4)]
void main(point VSO si[1], inout TriangleStream stream)
{
VSO so;
so = si[0];
for (int i = 0; i < 4; ++i)
{
... // modify position and texture coordinates for this point sprite
so.clipDistance = some_value; // float clipDistance : SV_ClipDistance;
stream.Append(so);
}
}
```
And it crashes somewhere in HlslParseContext::handleAssign -> map -> HlslParseContext::assignClipCullDistance (reading location 0x0)
Contributor guide
Research direction
Reproduce the crash with the HLSL geometry-shader example using SV_ClipDistance, then inspect HlslParseContext::handleAssign, map, and assignClipCullDistance. Trace the null access reported at that path and verify that the example is handled without crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100