yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
8086adc90
master
1//TEST:SIMPLE(filecheck=METAL): -target metal 2//TEST:SIMPLE(filecheck=METALLIB): -target metallib 3//TEST(compute, metal):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-metal -compute -output-using-type 4//TEST(compute, vulkan):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-vk -compute -output-using-type 5 6// METAL: threadgroup_barrier 7 8// METALLIB: define void @computeMain 9 10//TEST_INPUT: ubuffer(data=[0 0 0], stride=1):out,name outputBuffer 11RWStructuredBuffer<float> outputBuffer; 12 13[numthreads(1,1,1)] 14void computeMain() 15{ 16 // BUF: 1.0 17 outputBuffer[0] = 1; 18 GroupMemoryBarrierWithGroupSync(); 19 // BUF: 2.0 20 outputBuffer[1] = 2; 21 AllMemoryBarrierWithGroupSync(); 22 // BUF: 3.0 23 outputBuffer[2] = 3; 24}