diff options
| author | Julius Ikkala <julius.ikkala@gmail.com> | 2025-06-03 12:03:11 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-03 09:03:11 +0000 |
| commit | b06e94b87a115c5979c728ce13ddf34b80285a9f (patch) | |
| tree | 6ce8bc3fb1cd1f02fbe2ce3314475275884873bf /tests/bugs | |
| parent | 289f3dd22629bd65dcf1e9be12a52e88deca925c (diff) | |
Fix specialization constants getting incorrectly folded (#7299)
Diffstat (limited to 'tests/bugs')
| -rw-r--r-- | tests/bugs/gh-7293.slang | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/bugs/gh-7293.slang b/tests/bugs/gh-7293.slang new file mode 100644 index 000000000..d5ca48248 --- /dev/null +++ b/tests/bugs/gh-7293.slang @@ -0,0 +1,15 @@ +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): + +[SpecializationConstant] const int MAX_ITERS = 0; + +RWStructuredBuffer<int> outputBuffer; + +[numthreads(1, 1, 1)] +void computeMain(int3 dispatchThreadID: SV_DispatchThreadID) +{ + for (int i = 0; i < MAX_ITERS; i++) { + outputBuffer[i] = i; + } +} + +// CHECK-NOT: 30505 |
