File tree Expand file tree Collapse file tree
tests/compiletests/ui/builtin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // build-pass
2+ // compile-flags: -C llvm-args=--disassemble
3+ // normalize-stderr-test "OpLine .*\n" -> ""
4+ // normalize-stderr-test "OpSource .*\n" -> ""
5+ // normalize-stderr-test "%\d+ = OpString .*\n" -> ""
6+ // normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> ""
7+ // normalize-stderr-test "OpMemoryModel Logical Vulkan" -> "OpMemoryModel Logical Simple"
8+ // normalize-stderr-test "; .*\n" -> ""
9+
10+ use spirv_std:: {
11+ builtin:: compute,
12+ glam:: * ,
13+ spirv,
14+ } ;
15+
16+ #[ spirv( compute( threads( 1 ) ) ) ]
17+ pub fn compute (
18+ // TODO: Compile error: duplicate builtin
19+ #[ spirv( local_invocation_index) ] local_idx : u32 ,
20+ ) {
21+ let _local_invocation_index: u32 = compute:: local_invocation_index ( ) ;
22+ let _local_invocation_index: u32 = compute:: local_invocation_index ( ) ;
23+ let _local_invocation_index: u32 = f ( ) ;
24+ }
25+
26+ #[ inline( never) ]
27+ fn f ( ) -> u32 {
28+ compute:: local_invocation_index ( )
29+ }
You can’t perform that action at this time.
0 commit comments