yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
526430a0e
master
1//TEST:SIMPLE(filecheck=CHECK): -target spirv 2 3// CHECK: %[[PTR:[0-9a-zA-Z_]+]] = OpAccessChain %_ptr_PhysicalStorageBuffer_uint %16 %int_0 4// CHECK: %{{.*}} = OpAtomicIAdd %uint %[[PTR]] %uint_1 %uint_0 %uint_1 5 6 7struct Push2 8{ 9 uint4 * value; 10}; 11 12[[vk::push_constant]] Push2 push2; 13 14[shader("compute")] 15[numthreads(1, 1, 1)] 16void main() 17{ 18 InterlockedAdd(push2.value[0].x, 1); 19}