summaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authorJulius Ikkala <julius.ikkala@gmail.com>2025-06-03 12:03:11 +0300
committerGitHub <noreply@github.com>2025-06-03 09:03:11 +0000
commitb06e94b87a115c5979c728ce13ddf34b80285a9f (patch)
tree6ce8bc3fb1cd1f02fbe2ce3314475275884873bf /tests/bugs
parent289f3dd22629bd65dcf1e9be12a52e88deca925c (diff)
Fix specialization constants getting incorrectly folded (#7299)
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/gh-7293.slang15
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