yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

jsmall-nvidiaPointer layout support (#2930)1b01ff909

master
549 B27 linesraw
1//TEST(64-bit):REFLECTION:-stage compute -no-codegen -target host-callable -entry computeMain
2
3struct AnotherStruct
4{
5    float a;
6    int b;
7    Ptr<int> ptrC;
8};
9
10struct SomeStruct
11{    
12    Ptr<int> ptrInt;
13    int* ptrInt2;
14    int anInt;
15    AnotherStruct another;
16    Ptr<AnotherStruct> anotherPtr;
17};
18
19RWStructuredBuffer<SomeStruct> inputBuffer;
20
21RWStructuredBuffer<int> outputBuffer;
22
23[numthreads(4, 1, 1)]
24void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
25{    
26    outputBuffer[dispatchThreadID.x] = int(dispatchThreadID.x);
27}