James Price | 16eeff3 | 2022-03-31 22:30:10 +0000 | [diff] [blame] | 1 | ; SPIR-V |
| 2 | ; Version: 1.3 |
| 3 | ; Generator: Google Tint Compiler; 0 |
| 4 | ; Bound: 41 |
| 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 %counter "counter" |
| 11 | OpName %unused_entry_point "unused_entry_point" |
| 12 | OpName %foo "foo" |
| 13 | OpName %bar "bar" |
| 14 | OpName %main "main" |
| 15 | OpName %S "S" |
| 16 | OpMemberName %S 0 "a" |
| 17 | OpName %x "x" |
| 18 | OpMemberDecorate %S 0 Offset 0 |
| 19 | OpDecorate %_arr_v4int_uint_4 ArrayStride 16 |
| 20 | %int = OpTypeInt 32 1 |
| 21 | %_ptr_Private_int = OpTypePointer Private %int |
| 22 | %4 = OpConstantNull %int |
| 23 | %counter = OpVariable %_ptr_Private_int Private %4 |
| 24 | %void = OpTypeVoid |
| 25 | %5 = OpTypeFunction %void |
| 26 | %9 = OpTypeFunction %int |
| 27 | %int_1 = OpConstant %int 1 |
| 28 | %int_2 = OpConstant %int 2 |
| 29 | %v4int = OpTypeVector %int 4 |
| 30 | %uint = OpTypeInt 32 0 |
| 31 | %uint_4 = OpConstant %uint 4 |
| 32 | %_arr_v4int_uint_4 = OpTypeArray %v4int %uint_4 |
| 33 | %S = OpTypeStruct %_arr_v4int_uint_4 |
| 34 | %29 = OpConstantNull %S |
| 35 | %_ptr_Function_S = OpTypePointer Function %S |
| 36 | %uint_0 = OpConstant %uint 0 |
| 37 | %_ptr_Function_int = OpTypePointer Function %int |
| 38 | %int_5 = OpConstant %int 5 |
| 39 | %unused_entry_point = OpFunction %void None %5 |
| 40 | %8 = OpLabel |
| 41 | OpReturn |
| 42 | OpFunctionEnd |
| 43 | %foo = OpFunction %int None %9 |
| 44 | %11 = OpLabel |
| 45 | %12 = OpLoad %int %counter |
| 46 | %14 = OpIAdd %int %12 %int_1 |
| 47 | OpStore %counter %14 |
| 48 | %15 = OpLoad %int %counter |
| 49 | OpReturnValue %15 |
| 50 | OpFunctionEnd |
| 51 | %bar = OpFunction %int None %9 |
| 52 | %17 = OpLabel |
| 53 | %18 = OpLoad %int %counter |
| 54 | %20 = OpIAdd %int %18 %int_2 |
| 55 | OpStore %counter %20 |
| 56 | %21 = OpLoad %int %counter |
| 57 | OpReturnValue %21 |
| 58 | OpFunctionEnd |
| 59 | %main = OpFunction %void None %5 |
| 60 | %23 = OpLabel |
| 61 | %x = OpVariable %_ptr_Function_S Function %29 |
| 62 | OpStore %x %29 |
| 63 | %32 = OpFunctionCall %int %foo |
| 64 | %33 = OpFunctionCall %int %bar |
| 65 | %36 = OpAccessChain %_ptr_Function_int %x %uint_0 %32 %33 |
| 66 | %37 = OpAccessChain %_ptr_Function_int %x %uint_0 %32 %33 |
| 67 | %38 = OpLoad %int %37 |
| 68 | %40 = OpIAdd %int %38 %int_5 |
| 69 | OpStore %36 %40 |
| 70 | OpReturn |
| 71 | OpFunctionEnd |