File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Test that generic functions' `OpName` correctly include generic arguments.
2
+
3
+ // build-pass
4
+ // compile-flags: -C llvm-args=--disassemble-globals
5
+ // normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> ""
6
+ // normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> ""
7
+ // normalize-stderr-test "OpMemoryModel Logical Vulkan" -> "OpMemoryModel Logical Simple"
8
+
9
+ #![ feature( const_generics) ]
10
+ #![ allow( incomplete_features) ]
11
+
12
+ use spirv_std:: image:: Dimensionality ;
13
+
14
+ fn generic < T , const DIM : Dimensionality > ( ) { }
15
+
16
+ #[ spirv( fragment) ]
17
+ pub fn main ( ) {
18
+ generic :: < f32 , { Dimensionality :: TwoD } > ( ) ;
19
+ }
Original file line number Diff line number Diff line change
1
+ OpCapability Float64
2
+ OpCapability Int16
3
+ OpCapability Int64
4
+ OpCapability Int8
5
+ OpCapability Shader
6
+ OpMemoryModel Logical Simple
7
+ OpEntryPoint Fragment %1 "main"
8
+ OpExecutionMode %1 OriginUpperLeft
9
+ %2 = OpString "$OPSTRING_FILENAME/generic-fn-op-name.rs"
10
+ OpName %3 "generic_fn_op_name::generic"
11
+ OpName %4 "generic_fn_op_name::main"
12
+ %5 = OpTypeVoid
13
+ %6 = OpTypeFunction %5
You can’t perform that action at this time.
0 commit comments