Ben Clayton | 3cbb136 | 2022-01-06 18:11:01 +0000 | [diff] [blame] | 1 | ; SPIR-V |
| 2 | ; Version: 1.3 |
| 3 | ; Generator: Google Tint Compiler; 0 |
| 4 | ; Bound: 22 |
| 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpMemoryModel Logical GLSL450 |
| 8 | OpEntryPoint GLCompute %unused_entry_point "unused_entry_point" |
| 9 | OpExecutionMode %unused_entry_point LocalSize 1 1 1 |
| 10 | OpName %unused_entry_point "unused_entry_point" |
| 11 | OpName %f "f" |
| 12 | OpName %i "i" |
| 13 | OpName %v "v" |
| 14 | %void = OpTypeVoid |
| 15 | %1 = OpTypeFunction %void |
| 16 | %float = OpTypeFloat 32 |
| 17 | %int = OpTypeInt 32 1 |
| 18 | %5 = OpTypeFunction %float %int |
| 19 | %v3float = OpTypeVector %float 3 |
| 20 | %float_1 = OpConstant %float 1 |
| 21 | %float_2 = OpConstant %float 2 |
| 22 | %float_3 = OpConstant %float 3 |
| 23 | %15 = OpConstantComposite %v3float %float_1 %float_2 %float_3 |
| 24 | %_ptr_Function_v3float = OpTypePointer Function %v3float |
| 25 | %18 = OpConstantNull %v3float |
| 26 | %_ptr_Function_float = OpTypePointer Function %float |
| 27 | %unused_entry_point = OpFunction %void None %1 |
| 28 | %4 = OpLabel |
| 29 | OpReturn |
| 30 | OpFunctionEnd |
| 31 | %f = OpFunction %float None %5 |
| 32 | %i = OpFunctionParameter %int |
| 33 | %10 = OpLabel |
| 34 | %v = OpVariable %_ptr_Function_v3float Function %18 |
| 35 | OpStore %v %15 |
| 36 | %20 = OpAccessChain %_ptr_Function_float %v %i |
| 37 | %21 = OpLoad %float %20 |
| 38 | OpReturnValue %21 |
| 39 | OpFunctionEnd |