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
551 B28 linesraw
1//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj
2
3module a;
4
5__include b;
6
7namespace ns1
8{
9namespace ns2
10{
11    int l() { return k(); } // should be able to find k() in b.
12}
13}
14
15using ns1.ns2;
16
17//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
18RWStructuredBuffer<int> outputBuffer;
19
20[numthreads(4, 1, 1)]
21void computeMain(int3 dispatchThreadID: SV_DispatchThreadID)
22{
23    int tid = dispatchThreadID.x;
24    int inVal = tid;
25    int outVal = k() + l() + ns1.ns2.f();
26    outputBuffer[tid] = outVal;
27    // CHECK: 7
28}