https://github.com/shader-slang/slang
Raw File
Tip revision: edb9de817218f8753ab2219fe9e7cd6b1afdd304 authored by kaizhangNV on 27 June 2024, 23:52:23 UTC
Enable upload asset for old glibc build (#4501)
Tip revision: edb9de8
serialized-module-entry-point.slang
//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);
}
back to top