yum-mirror/slang

Making it easier to work with shaders

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

Ellie HermaszewskaAllow Link time constant array length sizing, warn on unsupported functionality (#7067)c94ca1692

master
180 B12 linesraw
1extern static const int N;
2
3struct S { int xs[N]; }
4
5RWStructuredBuffer<S> b;
6
7[numthreads(1, 1, 1)]
8void computeMain()
9{
10    for(int i = 0; i < N; ++i)
11        b[0].xs[i] *= N;
12}