SPIRV-Cross/shaders-msl/desktop-only/tesc/struct-copy.desktop.sso.tesc
Chip Davis 13df78bebf Unflatten inputs when copying to outputs.
This should fix a whole host of issues related to structs in the `Input`
class in a tessellation control shader.

Also, use pointer arithmetic instead of dereferencing the `ops` array.
This is critical in case we wind up stepping beyond the bounds of the
array.
2019-02-13 12:37:24 -06:00

23 lines
460 B
GLSL

#version 450
struct Boo
{
vec3 a;
vec3 b;
};
layout(vertices = 4) out;
layout(location = 0) out Boo vVertex[];
layout(location = 0) in Boo vInput[];
void main()
{
vVertex[gl_InvocationID] = vInput[gl_InvocationID];
gl_TessLevelOuter[0] = 1.0;
gl_TessLevelOuter[1] = 2.0;
gl_TessLevelOuter[2] = 3.0;
gl_TessLevelOuter[3] = 4.0;
gl_TessLevelInner[0] = 1.0;
gl_TessLevelInner[1] = 2.0;
}