yum-mirror/slang

Making it easier to work with shaders

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

Yong HeFix crash during emitCast of attributed type, allow MaxIters to take linktime const. (#5791)051ae8ace

master
283 B15 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv
2// CHECK: OpEntryPoint
3
4extern static const int num = 10;
5RWStructuredBuffer<float> outputBuffer;
6
7[numthreads(1,1,1)]
8void computeMain()
9{
10    [MaxIters(num)]
11    for (int i = 0; i < num; i++)
12    {
13        outputBuffer[i] = i;
14    }
15}