summaryrefslogtreecommitdiffstats
path: root/tests/language-feature/modules/include/main.slang
blob: e036adc3cf93d63be16617c9547ca9fb9c63ab79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj -output-using-type
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -vk -shaderobj -output-using-type

module main;

__include c;
__include c; // Duplicate include, OK.
__include b;


//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;
    outputBuffer[tid] = f_c();
    // CHECK: 4 
}