yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
adaea0e99
master
1//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj 2 3//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer 4RWStructuredBuffer<int> outputBuffer; 5 6struct GetValue<let N : int> 7{ 8 static const int Value = N; 9}; 10 11[numthreads(4, 1, 1)] 12void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) 13{ 14 int index = int(dispatchThreadID.x); 15 16 outputBuffer[index] = GetValue<10>::Value; 17} 18