SPIRV-Cross/reference/opt/shaders/asm/tese/unroll-input-array-load.asm.tese
Hans-Kristian Arntzen 0b20180537 GLSL: Deal with array loads from input in tessellation.
We have an edge case where the array is declared with a concrete size,
but in GLSL we must emit an unsized array, which breaks array copies.
Deal explicitly with this.
2019-03-21 11:50:53 +01:00

18 lines
339 B
GLSL

#version 450
layout(quads) in;
struct ControlPoint
{
vec4 baz;
};
layout(location = 0) patch in vec4 input_foo;
layout(location = 1) patch in vec4 input_bar;
layout(location = 2) in ControlPoint CPData[];
void main()
{
gl_Position = (((input_foo + input_bar) + vec2(gl_TessCoord.xy).xyxy) + CPData[0u].baz) + CPData[3u].baz;
}