SPIRV-Cross/reference/shaders/comp/barriers.comp

84 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-01-09 11:19:31 +00:00
#version 310 es
layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in;
void barrier_shared()
{
memoryBarrierShared();
}
void full_barrier()
{
memoryBarrier();
}
void image_barrier()
{
memoryBarrierImage();
}
void buffer_barrier()
{
memoryBarrierBuffer();
}
void group_barrier()
{
groupMemoryBarrier();
}
void barrier_shared_exec()
{
memoryBarrierShared();
barrier();
}
void full_barrier_exec()
{
memoryBarrier();
memoryBarrierShared();
barrier();
}
void image_barrier_exec()
{
memoryBarrierImage();
memoryBarrierShared();
barrier();
}
void buffer_barrier_exec()
{
memoryBarrierBuffer();
memoryBarrierShared();
barrier();
}
void group_barrier_exec()
{
groupMemoryBarrier();
memoryBarrierShared();
barrier();
}
2018-01-09 11:19:31 +00:00
void exec_barrier()
{
memoryBarrierShared();
barrier();
}
void main()
{
barrier_shared();
full_barrier();
image_barrier();
buffer_barrier();
group_barrier();
barrier_shared_exec();
full_barrier_exec();
image_barrier_exec();
buffer_barrier_exec();
group_barrier_exec();
2018-01-09 11:19:31 +00:00
exec_barrier();
}