summaryrefslogtreecommitdiffstats
path: root/tests/reflection/ptr/ptr-struct.slang
blob: ee11ca240b7b9daacdedbc4368378f3b001cea4d (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
27
//TEST(64-bit):REFLECTION:-stage compute -no-codegen -target host-callable -entry computeMain

struct AnotherStruct
{
    float a;
    int b;
    Ptr<int> ptrC;
};

struct SomeStruct
{    
    Ptr<int> ptrInt;
    int* ptrInt2;
    int anInt;
    AnotherStruct another;
    Ptr<AnotherStruct> anotherPtr;
};

RWStructuredBuffer<SomeStruct> inputBuffer;

RWStructuredBuffer<int> outputBuffer;

[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{    
    outputBuffer[dispatchThreadID.x] = int(dispatchThreadID.x);
}