yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

skallweitNVenable more metal tests (#4326)712ce653d

master
420 B18 linesraw
1//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj
2
3module b;
4
5import a;
6
7//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
8RWStructuredBuffer<int> outputBuffer;
9
10[numthreads(4, 1, 1)]
11void computeMain(int3 dispatchThreadID: SV_DispatchThreadID)
12{
13    int tid = dispatchThreadID.x;
14    int inVal = tid;
15    int outVal = f() + ns.f();
16    outputBuffer[tid] = outVal;
17    // CHECK: 2
18}