1
0
mirror of https://github.com/RPCS3/glslang.git synced 2024-12-19 09:16:32 +00:00
glslang/Test/hlsl.clipdistance-1.frag
LoopDawg e2cda3c2d7 HLSL: handle clip and cull distance input builtin type conversion
HLSL allows a range of types for clip and cull distances.  There are
three dimensions, including arrayness, vectorness, and semantic ID.
SPIR-V requires clip and cull distance be a single array of floats in
all cases.

This code provides input side conversion between the SPIR-V form and
the HLSL form.  (Output conversion was added in PR  and ).

This PR extends HlslParseContext::assignClipCullDistance to cope with
the input side conversion.  Not as much changed as appears: there was
also a lot of renaming to reflect the fact that the code now handles
either direction.

Currently, non-{frag,vert} stages are not handled, and are explicitly
rejected.

Fixes .
2017-08-24 08:35:40 -06:00

7 lines
179 B
GLSL

float4 main(in float4 pos : SV_Position,
in float clip : SV_ClipDistance,
in float cull : SV_CullDistance) : SV_Target0
{
return pos + clip + cull;
}