| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 1 | |
| ; Bound: 149 | |
| ; 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 %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 %dst "dst" | |
| OpName %src_let "src_let" | |
| OpName %dst_nested "dst_nested" | |
| OpName %src_nested "src_nested" | |
| OpName %main_inner "main_inner" | |
| OpName %tint_local_index "tint_local_index" | |
| OpName %src_let "val" | |
| OpName %idx "idx" | |
| OpName %start_byte_offset "start_byte_offset" | |
| OpName %a "a" | |
| OpName %idx_0 "idx" | |
| OpName %main "main" | |
| OpName %tint_convert_explicit_layout "tint_convert_explicit_layout" | |
| OpName %tint_source "tint_source" | |
| OpName %idx_1 "idx" | |
| 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 | |
| %_ptr_Input_uint = OpTypePointer Input %uint | |
| %main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input | |
| %24 = OpTypeFunction %_arr_v4int_uint_4 | |
| %S = OpTypeStruct %_arr_v4int_uint_4 | |
| %28 = OpTypeFunction %S | |
| %30 = OpConstantNull %S | |
| %void = OpTypeVoid | |
| %34 = OpTypeFunction %void %_arr_v4int_uint_4 | |
| %_ptr_Function__arr_v4int_uint_4 = OpTypePointer Function %_arr_v4int_uint_4 | |
| %int_1 = OpConstant %int 1 | |
| %40 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 | |
| %int_2 = OpConstant %int 2 | |
| %42 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2 | |
| %int_3 = OpConstant %int 3 | |
| %44 = OpConstantComposite %v4int %int_3 %int_3 %int_3 %int_3 | |
| %39 = OpConstantComposite %_arr_v4int_uint_4 %40 %42 %44 %44 | |
| %uint_0 = OpConstant %uint 0 | |
| %_ptr_StorageBuffer__arr_v4int_uint_4_0 = OpTypePointer StorageBuffer %_arr_v4int_uint_4_0 | |
| %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_Function__arr__arr__arr_int_uint_2_uint_3_uint_4 = OpTypePointer Function %_arr__arr__arr_int_uint_2_uint_3_uint_4 | |
| %67 = OpConstantNull %_arr__arr__arr_int_uint_2_uint_3_uint_4 | |
| %72 = OpTypeFunction %void %uint | |
| %uint_264 = OpConstant %uint 264 | |
| %_ptr_Function_uint = OpTypePointer Function %uint | |
| %bool = OpTypeBool | |
| %_ptr_Workgroup_v4int = OpTypePointer Workgroup %v4int | |
| %91 = OpConstantNull %v4int | |
| %uint_1 = OpConstant %uint 1 | |
| %96 = OpTypeFunction %_arr_v4int_uint_4 %uint | |
| %uint_16 = OpConstant %uint 16 | |
| %_ptr_Function_v4int = OpTypePointer Function %v4int | |
| %_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint | |
| %123 = OpTypeFunction %void | |
| %128 = 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 %24 | |
| %25 = OpLabel | |
| OpReturnValue %src_let | |
| OpFunctionEnd | |
| %ret_struct_arr = OpFunction %S None %28 | |
| %29 = OpLabel | |
| OpReturnValue %30 | |
| OpFunctionEnd | |
| %foo = OpFunction %void None %34 | |
| %src_param = OpFunctionParameter %_arr_v4int_uint_4 | |
| %35 = OpLabel | |
| %src_function = OpVariable %_ptr_Function__arr_v4int_uint_4 Function %src_let | |
| %dst = OpVariable %_ptr_Function__arr_v4int_uint_4 Function %src_let | |
| %dst_nested = OpVariable %_ptr_Function__arr__arr__arr_int_uint_2_uint_3_uint_4 Function %67 | |
| %src_nested = OpVariable %_ptr_Function__arr__arr__arr_int_uint_2_uint_3_uint_4 Function %67 | |
| OpStore %dst %39 None | |
| OpStore %dst %src_param None | |
| %46 = OpFunctionCall %_arr_v4int_uint_4 %ret_arr | |
| OpStore %dst %46 None | |
| OpStore %dst %src_let None | |
| %47 = OpLoad %_arr_v4int_uint_4 %src_function None | |
| OpStore %dst %47 None | |
| %48 = OpLoad %_arr_v4int_uint_4 %src_private None | |
| OpStore %dst %48 None | |
| %49 = OpLoad %_arr_v4int_uint_4 %src_workgroup None | |
| OpStore %dst %49 None | |
| %50 = OpFunctionCall %S %ret_struct_arr | |
| %51 = OpCompositeExtract %_arr_v4int_uint_4 %50 0 | |
| OpStore %dst %51 None | |
| %52 = OpFunctionCall %_arr_v4int_uint_4 %53 %uint_0 | |
| OpStore %dst %52 None | |
| %55 = OpAccessChain %_ptr_StorageBuffer__arr_v4int_uint_4_0 %16 %uint_0 %uint_0 | |
| %57 = OpLoad %_arr_v4int_uint_4_0 %55 None | |
| %58 = OpFunctionCall %_arr_v4int_uint_4 %tint_convert_explicit_layout %57 | |
| OpStore %dst %58 None | |
| %69 = OpLoad %_arr__arr__arr_int_uint_2_uint_3_uint_4 %src_nested None | |
| OpStore %dst_nested %69 None | |
| OpReturn | |
| OpFunctionEnd | |
| %main_inner = OpFunction %void None %72 | |
| %tint_local_index = OpFunctionParameter %uint | |
| %73 = OpLabel | |
| %idx = OpVariable %_ptr_Function_uint Function | |
| OpBranch %74 | |
| %74 = OpLabel | |
| OpStore %idx %tint_local_index | |
| OpBranch %77 | |
| %77 = OpLabel | |
| OpLoopMerge %78 %76 None | |
| OpBranch %75 | |
| %75 = OpLabel | |
| %84 = OpLoad %uint %idx None | |
| %85 = OpUGreaterThanEqual %bool %84 %uint_4 | |
| OpSelectionMerge %87 None | |
| OpBranchConditional %85 %88 %87 | |
| %88 = OpLabel | |
| OpBranch %78 | |
| %87 = OpLabel | |
| %89 = OpAccessChain %_ptr_Workgroup_v4int %src_workgroup %84 | |
| OpStore %89 %91 None | |
| OpBranch %76 | |
| %76 = OpLabel | |
| %92 = OpLoad %uint %idx None | |
| %93 = OpIAdd %uint %92 %uint_1 | |
| OpStore %idx %93 None | |
| OpBranch %77 | |
| %78 = OpLabel | |
| OpControlBarrier %uint_2 %uint_2 %uint_264 | |
| %81 = OpFunctionCall %void %foo %src_let | |
| OpReturn | |
| OpFunctionEnd | |
| %53 = OpFunction %_arr_v4int_uint_4 None %96 | |
| %start_byte_offset = OpFunctionParameter %uint | |
| %97 = OpLabel | |
| %a = OpVariable %_ptr_Function__arr_v4int_uint_4 Function | |
| %idx_0 = OpVariable %_ptr_Function_uint Function | |
| OpStore %a %src_let | |
| OpBranch %99 | |
| %99 = OpLabel | |
| OpStore %idx_0 %uint_0 | |
| OpBranch %102 | |
| %102 = OpLabel | |
| OpLoopMerge %103 %101 None | |
| OpBranch %100 | |
| %100 = OpLabel | |
| %106 = OpLoad %uint %idx_0 None | |
| %107 = OpUGreaterThanEqual %bool %106 %uint_4 | |
| OpSelectionMerge %108 None | |
| OpBranchConditional %107 %109 %108 | |
| %109 = OpLabel | |
| OpBranch %103 | |
| %108 = OpLabel | |
| %110 = OpIMul %uint %106 %uint_16 | |
| %112 = OpIAdd %uint %start_byte_offset %110 | |
| %113 = OpAccessChain %_ptr_Function_v4int %a %106 | |
| %115 = OpUDiv %uint %112 %uint_16 | |
| %116 = OpAccessChain %_ptr_Uniform_v4uint %11 %uint_0 %115 | |
| %118 = OpLoad %v4uint %116 None | |
| %119 = OpBitcast %v4int %118 | |
| OpStore %113 %119 None | |
| OpBranch %101 | |
| %101 = OpLabel | |
| %120 = OpLoad %uint %idx_0 None | |
| %121 = OpIAdd %uint %120 %uint_1 | |
| OpStore %idx_0 %121 None | |
| OpBranch %102 | |
| %103 = OpLabel | |
| %104 = OpLoad %_arr_v4int_uint_4 %a None | |
| OpReturnValue %104 | |
| OpFunctionEnd | |
| %main = OpFunction %void None %123 | |
| %124 = OpLabel | |
| %125 = OpLoad %uint %main_local_invocation_index_Input None | |
| %126 = OpFunctionCall %void %main_inner %125 | |
| OpReturn | |
| OpFunctionEnd | |
| %tint_convert_explicit_layout = OpFunction %_arr_v4int_uint_4 None %128 | |
| %tint_source = OpFunctionParameter %_arr_v4int_uint_4_0 | |
| %129 = OpLabel | |
| %130 = OpVariable %_ptr_Function__arr_v4int_uint_4_0 Function | |
| %132 = OpVariable %_ptr_Function__arr_v4int_uint_4 Function %src_let | |
| %idx_1 = OpVariable %_ptr_Function_uint Function | |
| OpStore %130 %tint_source | |
| OpBranch %133 | |
| %133 = OpLabel | |
| OpStore %idx_1 %uint_0 | |
| OpBranch %136 | |
| %136 = OpLabel | |
| OpLoopMerge %137 %135 None | |
| OpBranch %134 | |
| %134 = OpLabel | |
| %140 = OpLoad %uint %idx_1 None | |
| %141 = OpUGreaterThanEqual %bool %140 %uint_4 | |
| OpSelectionMerge %142 None | |
| OpBranchConditional %141 %143 %142 | |
| %143 = OpLabel | |
| OpBranch %137 | |
| %142 = OpLabel | |
| %144 = OpAccessChain %_ptr_Function_v4int %130 %140 | |
| %145 = OpLoad %v4int %144 None | |
| %146 = OpAccessChain %_ptr_Function_v4int %132 %140 | |
| OpStore %146 %145 None | |
| OpBranch %135 | |
| %135 = OpLabel | |
| %147 = OpLoad %uint %idx_1 None | |
| %148 = OpIAdd %uint %147 %uint_1 | |
| OpStore %idx_1 %148 None | |
| OpBranch %136 | |
| %137 = OpLabel | |
| %138 = OpLoad %_arr_v4int_uint_4 %132 None | |
| OpReturnValue %138 | |
| OpFunctionEnd |