SPIRV-Cross/shaders-msl/masking/write-outputs-block.mask-location-1.multi-patch.msl2.tesc
Hans-Kristian Arntzen 23da445bd4 MSL: Emit multiple threadgroup slices for multi-patch.
Multiple patches can run in the same workgroup when using multi-patch
mode, so we need to allocate enough storage to avoid false sharing.
2021-04-19 12:10:49 +02:00

29 lines
394 B
GLSL

#version 450
layout(vertices = 4) out;
patch out P
{
layout(location = 0) float a;
layout(location = 2) float b;
};
out C
{
layout(location = 1) float a;
layout(location = 3) float b;
} c[];
void write_in_function()
{
a = 1.0;
b = 2.0;
c[gl_InvocationID].a = 3.0;
c[gl_InvocationID].b = 4.0;
gl_out[gl_InvocationID].gl_Position = vec4(1.0);
}
void main()
{
write_in_function();
}