yum-mirror/slang

Making it easier to work with shaders

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

Julius IkkalaFix specialization constants getting incorrectly folded (#7299)b06e94b87

master
319 B15 linesraw
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):
2
3[SpecializationConstant] const int MAX_ITERS = 0;
4
5RWStructuredBuffer<int> outputBuffer;
6
7[numthreads(1, 1, 1)]
8void computeMain(int3 dispatchThreadID: SV_DispatchThreadID)
9{
10    for (int i = 0; i < MAX_ITERS; i++) {
11        outputBuffer[i] = i;
12    }
13}
14
15// CHECK-NOT: 30505