yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
2cb65a89f
master
1//TEST(compute):COMPARE_COMPUTE_EX:-cpu -compute -compile-arg -O3 -compute-dispatch 3,1,1 -shaderobj 2//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -compute-dispatch 3,1,1 -shaderobj 3//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -compute-dispatch 3,1,1 -shaderobj 4//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -compute-dispatch 3,1,1 -shaderobj 5//TEST(compute):COMPARE_COMPUTE_EX:-mtl -compute -compute-dispatch 3,1,1 -shaderobj 6 7//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name outputBuffer 8RWStructuredBuffer<int> outputBuffer; 9 10[numthreads(4, 1, 1)] 11void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID, uint3 groupID : SV_GroupID, uint3 groupThreadID : SV_GroupThreadId) 12{ 13 outputBuffer[dispatchThreadID.x] = int((dispatchThreadID.x << 8) | (groupID.x << 4) | (groupThreadID.x)); 14}