| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 1 | |
| ; Bound: 54 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint GLCompute %main "main" %main_local_invocation_index_Input | |
| OpExecutionMode %main LocalSize 1 1 1 | |
| OpMemberName %Inner 0 "b" | |
| OpMemberName %Inner 1 "v" | |
| OpMemberName %Inner 2 "m" | |
| OpName %Inner "Inner" | |
| OpMemberName %Outer 0 "a" | |
| OpName %Outer "Outer" | |
| OpName %v "v" | |
| OpName %main_local_invocation_index_Input "main_local_invocation_index_Input" | |
| OpName %foo "foo" | |
| OpName %main_inner "main_inner" | |
| OpName %tint_local_index "tint_local_index" | |
| OpName %idx "idx" | |
| OpName %main "main" | |
| OpDecorate %main_local_invocation_index_Input BuiltIn LocalInvocationIndex | |
| %bool = OpTypeBool | |
| %int = OpTypeInt 32 1 | |
| %v4int = OpTypeVector %int 4 | |
| %float = OpTypeFloat 32 | |
| %v3float = OpTypeVector %float 3 | |
| %mat3v3float = OpTypeMatrix %v3float 3 | |
| %Inner = OpTypeStruct %bool %v4int %mat3v3float | |
| %uint = OpTypeInt 32 0 | |
| %uint_4 = OpConstant %uint 4 | |
| %_arr_Inner_uint_4 = OpTypeArray %Inner %uint_4 | |
| %Outer = OpTypeStruct %_arr_Inner_uint_4 | |
| %_ptr_Workgroup_Outer = OpTypePointer Workgroup %Outer | |
| %v = OpVariable %_ptr_Workgroup_Outer Workgroup | |
| %_ptr_Input_uint = OpTypePointer Input %uint | |
| %main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input | |
| %17 = OpTypeFunction %Outer | |
| %void = OpTypeVoid | |
| %uint_2 = OpConstant %uint 2 | |
| %uint_264 = OpConstant %uint 264 | |
| %27 = OpTypeFunction %void %uint | |
| %_ptr_Function_uint = OpTypePointer Function %uint | |
| %_ptr_Workgroup_Inner = OpTypePointer Workgroup %Inner | |
| %uint_0 = OpConstant %uint 0 | |
| %45 = OpConstantNull %Inner | |
| %uint_1 = OpConstant %uint 1 | |
| %50 = OpTypeFunction %void | |
| %foo = OpFunction %Outer None %17 | |
| %18 = OpLabel | |
| OpControlBarrier %uint_2 %uint_2 %uint_264 | |
| %23 = OpLoad %Outer %v None | |
| OpControlBarrier %uint_2 %uint_2 %uint_264 | |
| OpReturnValue %23 | |
| OpFunctionEnd | |
| %main_inner = OpFunction %void None %27 | |
| %tint_local_index = OpFunctionParameter %uint | |
| %28 = OpLabel | |
| %idx = OpVariable %_ptr_Function_uint Function | |
| OpBranch %29 | |
| %29 = OpLabel | |
| OpStore %idx %tint_local_index | |
| OpBranch %32 | |
| %32 = OpLabel | |
| OpLoopMerge %33 %31 None | |
| OpBranch %30 | |
| %30 = OpLabel | |
| %38 = OpLoad %uint %idx None | |
| %39 = OpUGreaterThanEqual %bool %38 %uint_4 | |
| OpSelectionMerge %40 None | |
| OpBranchConditional %39 %41 %40 | |
| %41 = OpLabel | |
| OpBranch %33 | |
| %40 = OpLabel | |
| %42 = OpAccessChain %_ptr_Workgroup_Inner %v %uint_0 %38 | |
| OpStore %42 %45 None | |
| OpBranch %31 | |
| %31 = OpLabel | |
| %46 = OpLoad %uint %idx None | |
| %47 = OpIAdd %uint %46 %uint_1 | |
| OpStore %idx %47 None | |
| OpBranch %32 | |
| %33 = OpLabel | |
| OpControlBarrier %uint_2 %uint_2 %uint_264 | |
| %35 = OpFunctionCall %Outer %foo | |
| OpReturn | |
| OpFunctionEnd | |
| %main = OpFunction %void None %50 | |
| %51 = OpLabel | |
| %52 = OpLoad %uint %main_local_invocation_index_Input None | |
| %53 = OpFunctionCall %void %main_inner %52 | |
| OpReturn | |
| OpFunctionEnd |