summaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-06-12 09:40:27 -0700
committerGitHub <noreply@github.com>2024-06-12 09:40:27 -0700
commitc194af81a5b1f7d2869d9617dc06cd50609362bf (patch)
tree01018eed11a9cccb1176f70a085b948b825d07bc /tests/bugs
parent7a4757d2e97f92aae3ddb5dc353a54f72e23351e (diff)
Fix crash on invalid entrypoint varying parameter. (#4349)
* Fix crash on invalid entrypoint varying parameter. * Fix test.
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/invalid-entrypoint-param.slang17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/bugs/invalid-entrypoint-param.slang b/tests/bugs/invalid-entrypoint-param.slang
new file mode 100644
index 000000000..bafb0fb88
--- /dev/null
+++ b/tests/bugs/invalid-entrypoint-param.slang
@@ -0,0 +1,17 @@
+//TEST:SIMPLE(filecheck=CHECK): -target spirv
+
+// `TT` is not valid for defining a varying entrypoint parameter,
+// and we should diagnose an error.
+
+// CHECK: error 39028
+
+struct TT
+{
+ Texture2D tex;
+}
+
+[numthreads(1, 1, 1)]
+void f(TT t)
+{
+ return;
+} \ No newline at end of file