| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 143 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" %main_local_invocation_index_Input |
| OpExecutionMode %main LocalSize 1 1 1 |
| OpName %src_private "src_private" |
| OpName %src_workgroup "src_workgroup" |
| OpMemberName %src_uniform_block_tint_explicit_layout 0 "inner" |
| OpName %src_uniform_block_tint_explicit_layout "src_uniform_block_tint_explicit_layout" |
| OpMemberName %S_tint_explicit_layout 0 "arr" |
| OpName %S_tint_explicit_layout "S_tint_explicit_layout" |
| OpMemberName %src_storage_block_tint_explicit_layout 0 "inner" |
| OpName %src_storage_block_tint_explicit_layout "src_storage_block_tint_explicit_layout" |
| OpName %dst "dst" |
| OpName %dst_nested "dst_nested" |
| OpName %main_local_invocation_index_Input "main_local_invocation_index_Input" |
| OpName %ret_arr "ret_arr" |
| OpName %ret_struct_arr "ret_struct_arr" |
| OpMemberName %S 0 "arr" |
| OpName %S "S" |
| OpName %foo "foo" |
| OpName %src_param "src_param" |
| OpName %src_function "src_function" |
| OpName %src_let "src_let" |
| OpName %src_nested "src_nested" |
| OpName %main_inner "main_inner" |
| OpName %tint_local_index "tint_local_index" |
| OpName %src_let "a" |
| OpName %start_byte_offset "start_byte_offset" |
| OpName %a "a" |
| OpName %main "main" |
| OpName %tint_convert_explicit_layout "tint_convert_explicit_layout" |
| OpName %tint_source "tint_source" |
| OpDecorate %_arr_v4uint_uint_4 ArrayStride 16 |
| OpMemberDecorate %src_uniform_block_tint_explicit_layout 0 Offset 0 |
| OpDecorate %src_uniform_block_tint_explicit_layout Block |
| OpDecorate %11 DescriptorSet 0 |
| OpDecorate %11 Binding 0 |
| OpDecorate %11 NonWritable |
| OpDecorate %_arr_v4int_uint_4_0 ArrayStride 16 |
| OpMemberDecorate %S_tint_explicit_layout 0 Offset 0 |
| OpMemberDecorate %src_storage_block_tint_explicit_layout 0 Offset 0 |
| OpDecorate %src_storage_block_tint_explicit_layout Block |
| OpDecorate %16 DescriptorSet 0 |
| OpDecorate %16 Binding 1 |
| OpDecorate %16 Coherent |
| OpDecorate %main_local_invocation_index_Input BuiltIn LocalInvocationIndex |
| %int = OpTypeInt 32 1 |
| %v4int = OpTypeVector %int 4 |
| %uint = OpTypeInt 32 0 |
| %uint_4 = OpConstant %uint 4 |
| %_arr_v4int_uint_4 = OpTypeArray %v4int %uint_4 |
| %_ptr_Private__arr_v4int_uint_4 = OpTypePointer Private %_arr_v4int_uint_4 |
| %src_let = OpConstantNull %_arr_v4int_uint_4 |
| %src_private = OpVariable %_ptr_Private__arr_v4int_uint_4 Private %src_let |
| %_ptr_Workgroup__arr_v4int_uint_4 = OpTypePointer Workgroup %_arr_v4int_uint_4 |
| %src_workgroup = OpVariable %_ptr_Workgroup__arr_v4int_uint_4 Workgroup |
| %v4uint = OpTypeVector %uint 4 |
| %_arr_v4uint_uint_4 = OpTypeArray %v4uint %uint_4 |
| %src_uniform_block_tint_explicit_layout = OpTypeStruct %_arr_v4uint_uint_4 |
| %_ptr_Uniform_src_uniform_block_tint_explicit_layout = OpTypePointer Uniform %src_uniform_block_tint_explicit_layout |
| %11 = OpVariable %_ptr_Uniform_src_uniform_block_tint_explicit_layout Uniform |
| %_arr_v4int_uint_4_0 = OpTypeArray %v4int %uint_4 |
| %S_tint_explicit_layout = OpTypeStruct %_arr_v4int_uint_4_0 |
| %src_storage_block_tint_explicit_layout = OpTypeStruct %S_tint_explicit_layout |
| %_ptr_StorageBuffer_src_storage_block_tint_explicit_layout = OpTypePointer StorageBuffer %src_storage_block_tint_explicit_layout |
| %16 = OpVariable %_ptr_StorageBuffer_src_storage_block_tint_explicit_layout StorageBuffer |
| %dst = OpVariable %_ptr_Private__arr_v4int_uint_4 Private %src_let |
| %uint_2 = OpConstant %uint 2 |
| %_arr_int_uint_2 = OpTypeArray %int %uint_2 |
| %uint_3 = OpConstant %uint 3 |
| %_arr__arr_int_uint_2_uint_3 = OpTypeArray %_arr_int_uint_2 %uint_3 |
| %_arr__arr__arr_int_uint_2_uint_3_uint_4 = OpTypeArray %_arr__arr_int_uint_2_uint_3 %uint_4 |
| %_ptr_Private__arr__arr__arr_int_uint_2_uint_3_uint_4 = OpTypePointer Private %_arr__arr__arr_int_uint_2_uint_3_uint_4 |
| %29 = OpConstantNull %_arr__arr__arr_int_uint_2_uint_3_uint_4 |
| %dst_nested = OpVariable %_ptr_Private__arr__arr__arr_int_uint_2_uint_3_uint_4 Private %29 |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input |
| %33 = OpTypeFunction %_arr_v4int_uint_4 |
| %S = OpTypeStruct %_arr_v4int_uint_4 |
| %37 = OpTypeFunction %S |
| %39 = OpConstantNull %S |
| %void = OpTypeVoid |
| %43 = OpTypeFunction %void %_arr_v4int_uint_4 |
| %_ptr_Function__arr_v4int_uint_4 = OpTypePointer Function %_arr_v4int_uint_4 |
| %int_1 = OpConstant %int 1 |
| %48 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 |
| %int_2 = OpConstant %int 2 |
| %50 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2 |
| %int_3 = OpConstant %int 3 |
| %52 = OpConstantComposite %v4int %int_3 %int_3 %int_3 %int_3 |
| %47 = OpConstantComposite %_arr_v4int_uint_4 %48 %50 %52 %52 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_StorageBuffer__arr_v4int_uint_4_0 = OpTypePointer StorageBuffer %_arr_v4int_uint_4_0 |
| %_ptr_Function__arr__arr__arr_int_uint_2_uint_3_uint_4 = OpTypePointer Function %_arr__arr__arr_int_uint_2_uint_3_uint_4 |
| %73 = OpTypeFunction %void %uint |
| %uint_264 = OpConstant %uint 264 |
| %bool = OpTypeBool |
| %_ptr_Workgroup_v4int = OpTypePointer Workgroup %v4int |
| %91 = OpConstantNull %v4int |
| %uint_1 = OpConstant %uint 1 |
| %94 = OpTypeFunction %_arr_v4int_uint_4 %uint |
| %uint_16 = OpConstant %uint 16 |
| %_ptr_Function_v4int = OpTypePointer Function %v4int |
| %_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint |
| %119 = OpTypeFunction %void |
| %124 = OpTypeFunction %_arr_v4int_uint_4 %_arr_v4int_uint_4_0 |
| %_ptr_Function__arr_v4int_uint_4_0 = OpTypePointer Function %_arr_v4int_uint_4_0 |
| %ret_arr = OpFunction %_arr_v4int_uint_4 None %33 |
| %34 = OpLabel |
| OpReturnValue %src_let |
| OpFunctionEnd |
| %ret_struct_arr = OpFunction %S None %37 |
| %38 = OpLabel |
| OpReturnValue %39 |
| OpFunctionEnd |
| %foo = OpFunction %void None %43 |
| %src_param = OpFunctionParameter %_arr_v4int_uint_4 |
| %44 = OpLabel |
| %src_function = OpVariable %_ptr_Function__arr_v4int_uint_4 Function %src_let |
| %src_nested = OpVariable %_ptr_Function__arr__arr__arr_int_uint_2_uint_3_uint_4 Function %29 |
| OpStore %dst %47 None |
| OpStore %dst %src_param None |
| %54 = OpFunctionCall %_arr_v4int_uint_4 %ret_arr |
| OpStore %dst %54 None |
| OpStore %dst %src_let None |
| %55 = OpLoad %_arr_v4int_uint_4 %src_function None |
| OpStore %dst %55 None |
| %56 = OpLoad %_arr_v4int_uint_4 %src_private None |
| OpStore %dst %56 None |
| %57 = OpLoad %_arr_v4int_uint_4 %src_workgroup None |
| OpStore %dst %57 None |
| %58 = OpFunctionCall %S %ret_struct_arr |
| %59 = OpCompositeExtract %_arr_v4int_uint_4 %58 0 |
| OpStore %dst %59 None |
| %60 = OpFunctionCall %_arr_v4int_uint_4 %61 %uint_0 |
| OpStore %dst %60 None |
| %63 = OpAccessChain %_ptr_StorageBuffer__arr_v4int_uint_4_0 %16 %uint_0 %uint_0 |
| %65 = OpLoad %_arr_v4int_uint_4_0 %63 None |
| %66 = OpFunctionCall %_arr_v4int_uint_4 %tint_convert_explicit_layout %65 |
| OpStore %dst %66 None |
| %70 = OpLoad %_arr__arr__arr_int_uint_2_uint_3_uint_4 %src_nested None |
| OpStore %dst_nested %70 None |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %void None %73 |
| %tint_local_index = OpFunctionParameter %uint |
| %74 = OpLabel |
| OpBranch %75 |
| %75 = OpLabel |
| OpBranch %78 |
| %78 = OpLabel |
| %80 = OpPhi %uint %tint_local_index %75 %81 %77 |
| OpLoopMerge %79 %77 None |
| OpBranch %76 |
| %76 = OpLabel |
| %85 = OpUGreaterThanEqual %bool %80 %uint_4 |
| OpSelectionMerge %87 None |
| OpBranchConditional %85 %88 %87 |
| %88 = OpLabel |
| OpBranch %79 |
| %87 = OpLabel |
| %89 = OpAccessChain %_ptr_Workgroup_v4int %src_workgroup %80 |
| OpStore %89 %91 None |
| OpBranch %77 |
| %77 = OpLabel |
| %81 = OpIAdd %uint %80 %uint_1 |
| OpBranch %78 |
| %79 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| %84 = OpFunctionCall %void %foo %src_let |
| OpReturn |
| OpFunctionEnd |
| %61 = OpFunction %_arr_v4int_uint_4 None %94 |
| %start_byte_offset = OpFunctionParameter %uint |
| %95 = OpLabel |
| %a = OpVariable %_ptr_Function__arr_v4int_uint_4 Function |
| OpStore %a %src_let |
| OpBranch %97 |
| %97 = OpLabel |
| OpBranch %100 |
| %100 = OpLabel |
| %102 = OpPhi %uint %uint_0 %97 %103 %99 |
| OpLoopMerge %101 %99 None |
| OpBranch %98 |
| %98 = OpLabel |
| %105 = OpUGreaterThanEqual %bool %102 %uint_4 |
| OpSelectionMerge %106 None |
| OpBranchConditional %105 %107 %106 |
| %107 = OpLabel |
| OpBranch %101 |
| %106 = OpLabel |
| %108 = OpIMul %uint %102 %uint_16 |
| %110 = OpIAdd %uint %start_byte_offset %108 |
| %111 = OpAccessChain %_ptr_Function_v4int %a %102 |
| %113 = OpUDiv %uint %110 %uint_16 |
| %114 = OpAccessChain %_ptr_Uniform_v4uint %11 %uint_0 %113 |
| %116 = OpLoad %v4uint %114 None |
| %117 = OpBitcast %v4int %116 |
| OpStore %111 %117 None |
| OpBranch %99 |
| %99 = OpLabel |
| %103 = OpIAdd %uint %102 %uint_1 |
| OpBranch %100 |
| %101 = OpLabel |
| %104 = OpLoad %_arr_v4int_uint_4 %a None |
| OpReturnValue %104 |
| OpFunctionEnd |
| %main = OpFunction %void None %119 |
| %120 = OpLabel |
| %121 = OpLoad %uint %main_local_invocation_index_Input None |
| %122 = OpFunctionCall %void %main_inner %121 |
| OpReturn |
| OpFunctionEnd |
| %tint_convert_explicit_layout = OpFunction %_arr_v4int_uint_4 None %124 |
| %tint_source = OpFunctionParameter %_arr_v4int_uint_4_0 |
| %125 = OpLabel |
| %126 = OpVariable %_ptr_Function__arr_v4int_uint_4_0 Function |
| %128 = OpVariable %_ptr_Function__arr_v4int_uint_4 Function %src_let |
| OpStore %126 %tint_source |
| OpBranch %129 |
| %129 = OpLabel |
| OpBranch %132 |
| %132 = OpLabel |
| %134 = OpPhi %uint %uint_0 %129 %135 %131 |
| OpLoopMerge %133 %131 None |
| OpBranch %130 |
| %130 = OpLabel |
| %137 = OpUGreaterThanEqual %bool %134 %uint_4 |
| OpSelectionMerge %138 None |
| OpBranchConditional %137 %139 %138 |
| %139 = OpLabel |
| OpBranch %133 |
| %138 = OpLabel |
| %140 = OpAccessChain %_ptr_Function_v4int %126 %134 |
| %141 = OpLoad %v4int %140 None |
| %142 = OpAccessChain %_ptr_Function_v4int %128 %134 |
| OpStore %142 %141 None |
| OpBranch %131 |
| %131 = OpLabel |
| %135 = OpIAdd %uint %134 %uint_1 |
| OpBranch %132 |
| %133 = OpLabel |
| %136 = OpLoad %_arr_v4int_uint_4 %128 None |
| OpReturnValue %136 |
| OpFunctionEnd |