summaryrefslogtreecommitdiffstats
path: root/tests/language-feature/namespaces/namespace-using/b.slang
blob: 3e5816662df6942eb27bded49fef943dc5905be6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj

module b;

import a;

//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
RWStructuredBuffer<int> outputBuffer;

[numthreads(4, 1, 1)]
void computeMain(int3 dispatchThreadID: SV_DispatchThreadID)
{
    int tid = dispatchThreadID.x;
    int inVal = tid;
    int outVal = f() + ns.f();
    outputBuffer[tid] = outVal;
    // CHECK: 2
}