From fcc570c9dc27889a5fe10c9df783f9760e126d17 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 20 Nov 2023 11:00:39 -0800 Subject: Allow whole program compile when using direct spirv backend. (#3342) Co-authored-by: Yong He --- tests/spirv/multi-entrypoint.slang | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/spirv/multi-entrypoint.slang (limited to 'tests') 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 -- cgit v1.2.3