summaryrefslogtreecommitdiffstats
path: root/tests/serialization/serialized-module-entry-point.slang
blob: 412a67ce6a6c6b9e0c337d2bc46db59e7f0ab272 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//TEST_IGNORE_FILE:

// serialized-module-entry-point.slang

struct Thing
{
    int a; 
    int b;
};

int foo(Thing thing);

RWStructuredBuffer<int> outputBuffer;

[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
    Thing thing;

    int index = (int)dispatchThreadID.x;
        
    thing.a = index;
    thing.b = -index;

    outputBuffer[index] = foo(thing);
}