SPIRV-Cross/shaders-msl/tese/load-control-point-array.tese
Hans-Kristian Arntzen 27d6d45671 MSL: Rewrite tessellation_access_chain.
To support loading array of array properly in tessellation, we need a
rewrite of how tessellation access chains are handled.

The major change is to remove the implicit unflatten step inside
access_chain which does not take into account the case where you load
directly from a control point array variable.

We defer unflatten step until OpLoad time instead.
This fixes cases where we load array of {array,matrix,struct}.

Removes the hacky path for MSL access chain index workaround.
2019-10-26 16:10:12 +02:00

14 lines
288 B
GLSL

#version 450
layout(cw, quads) in;
layout(location = 0) in vec4 vInputs[gl_MaxPatchVertices];
layout(location = 1) patch in vec4 vBoo[4];
layout(location = 5) patch in int vIndex;
void main()
{
vec4 tmp[gl_MaxPatchVertices] = vInputs;
gl_Position = tmp[0] + tmp[1] + vBoo[vIndex];
}