summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-12-03 22:35:55 -0800
committerGitHub <noreply@github.com>2024-12-03 22:35:55 -0800
commit5450a4907c93f493fa7a5849d5e98e1b07db1ee4 (patch)
tree7d9d1cef610da337ee0b25b15dc5b0ba0999cffc /tests
parent0c7801b627ae09e6998bf1ce3f9bb5af1f17567c (diff)
Add emit logic for `requirePrelude` inst. (#5735)
Diffstat (limited to 'tests')
-rw-r--r--tests/interop/require-prelude.slang11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/interop/require-prelude.slang b/tests/interop/require-prelude.slang
new file mode 100644
index 000000000..30a359e8a
--- /dev/null
+++ b/tests/interop/require-prelude.slang
@@ -0,0 +1,11 @@
+//TEST:SIMPLE(filecheck=CHECK): -target glsl -entry computeMain -stage compute
+//TEST:SIMPLE(filecheck=CHECK): -target wgsl -entry computeMain -stage compute
+//TEST:SIMPLE(filecheck=CHECK): -target metal
+
+// CHECK: #[compute]
+
+[numthreads(1,1,1)]
+void computeMain()
+{
+ __requirePrelude(R"(#[compute])");
+} \ No newline at end of file