KhronosGroup / glslang

Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Other
3.03k stars 834 forks source link

HLSL: Using SV_ClipDistance in Geometry Shader - Crash #2392

Open dmaluev opened 4 years ago

dmaluev commented 4 years ago

I have a code like this:

[maxvertexcount(4)]
void main(point VSO si[1], inout TriangleStream<VSO> 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)

arcady-lunarg commented 1 year ago

Could you attach a complete example HLSL file that demonstrates the issue?