yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f02b08490
master
1//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -profile sm_6_0 -output-using-type 2//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx11 -profile sm_5_0 -output-using-type 3 4//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -output-using-type 5//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer 6 7RWStructuredBuffer<int> outputBuffer; 8 9[numthreads(1, 1, 1)] 10void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID) 11{ 12 uint3 vLookup = 3; 13 vLookup.yx += int2(1, 2); // calling += (inout int2, int2). 14 outputBuffer[dispatchThreadID.x] = vLookup.x; // expect 5 15}