summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-11-20 11:00:39 -0800
committerGitHub <noreply@github.com>2023-11-20 11:00:39 -0800
commitfcc570c9dc27889a5fe10c9df783f9760e126d17 (patch)
tree6899e95ec60de27ab8cd793f7fe68a30ceaa2fdd /tests
parentc5a6348326742aa647ae79f95cf543472d827b03 (diff)
Allow whole program compile when using direct spirv backend. (#3342)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/spirv/multi-entrypoint.slang20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/spirv/multi-entrypoint.slang b/tests/spirv/multi-entrypoint.slang
new file mode 100644
index 000000000..fecde32f9
--- /dev/null
+++ b/tests/spirv/multi-entrypoint.slang
@@ -0,0 +1,20 @@
+//TEST:SIMPLE(filecheck=CHECK1): -entry main1 -entry main2 -target spirv -fvk-use-entrypoint-name -emit-spirv-directly
+//TEST:SIMPLE(filecheck=CHECK2): -target spirv -fvk-use-entrypoint-name -emit-spirv-directly
+
+
+[shader("raygeneration")]
+void main1() {}
+
+[shader("raygeneration")]
+void main2() {}
+
+[shader("raygeneration")]
+void main3() {}
+
+// CHECK1: OpEntryPoint
+// CHECK1: OpEntryPoint
+// CHECK1-NOT: OpEntryPoint
+
+// CHECK2: OpEntryPoint
+// CHECK2: OpEntryPoint
+// CHECK2: OpEntryPoint