SPIRV-Cross/shaders-msl/comp/access-private-workgroup-in-function.comp

32 lines
254 B
Plaintext
Raw Normal View History

#version 450
layout(local_size_x = 1) in;
int f;
shared int u;
void set_f()
{
f = 40;
}
void set_shared_u()
{
u = 50;
}
void main()
{
set_f();
set_shared_u();
if (gl_LocalInvocationIndex == 0u)
{
f = 10;
}
else
{
f = 30;
u = 20;
}
}