yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f9bcad355
master
1//TEST:SIMPLE(filecheck=CHECK_HLSL): -stage compute -entry computeMain -target hlsl 2//TEST:SIMPLE(filecheck=CHECK_GLSL): -stage compute -entry computeMain -target glsl 3 4RWByteAddressBuffer outputBuffer; 5 6// CHECK_GLSL: atomicAdd 7// CHECK_GLSL: atomicAdd 8// CHECK_HLSL: InterlockedAdd64 9// CHECK_HLSL: InterlockedAdd64 10 11[numthreads(16, 1, 1)] 12void computeMain(int3 dispatchThreadID : SV_DispatchThreadID) 13{ 14 uint64_t indata1; 15 int64_t indata2; 16 outputBuffer.InterlockedAdd64(0, 1, indata1); 17 outputBuffer.InterlockedAdd64(8, 1, indata2); 18}