glslang/Test/hlsl.hull.4.tesc
LoopDawg a5d8616478 HLSL: allow mixed user & builtin members in hull shader output structure
Hull shaders have an implicitly arrayed output.  This is handled by creating an arrayed form of the
provided output type, and writing to the element of it indexed by InvocationID.

The implicit indirection into that array was causing some troubles when copying to a split
structure.  handleAssign was able to handle simple symbol lvalues, but not an lvalue composed
of an indirection into an array.
2017-09-14 16:50:37 -06:00

18 lines
429 B
GLSL

// Test mixed output structure: user and builtin members. Hull shaders involve extra
// logic in this case, over and above e.g. pixel or vertex stages, which is related to
// the implicit array dimension.
struct HS_Output
{
float tessFactor[3] : SV_TessFactor;
float coord : TEXCOORD0;
};
[domain("tri")]
[outputcontrolpoints(3)]
HS_Output main ( )
{
HS_Output output = (HS_Output)0;
return output;
}