yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
004fe27a5
master
1//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj 2//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl 3 4//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer 5RWStructuredBuffer<int> outputBuffer; 6 7struct Another<let W : int, let H : int> 8{ 9 matrix<float, W, H> values; 10}; 11 12[numthreads(4, 1, 1)] 13void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) 14{ 15 int index = int(dispatchThreadID.x); 16 17 Another<2, 4> a = {}; 18 19 outputBuffer[index] = index + int(a.values[0].x); 20} 21