SPIRV-Cross/reference/shaders-msl/frag/subgroup-builtins.msl22.frag
2019-09-24 14:35:25 -04:00

19 lines
393 B
GLSL

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct main0_out
{
uint2 FragColor [[color(0)]];
};
fragment main0_out main0(uint gl_SubgroupSize [[threads_per_simdgroup]], uint gl_SubgroupInvocationID [[thread_index_in_simdgroup]])
{
main0_out out = {};
out.FragColor.x = gl_SubgroupSize;
out.FragColor.y = gl_SubgroupInvocationID;
return out;
}