| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 1 | |
| ; Bound: 142 | |
| ; 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 %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 | |
| %_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 | |
| %bool = OpTypeBool | |
| %_ptr_Workgroup_v4int = OpTypePointer Workgroup %v4int | |
| %90 = OpConstantNull %v4int | |
| %uint_1 = OpConstant %uint 1 | |
| %93 = OpTypeFunction %_arr_v4int_uint_4 %uint | |
| %uint_16 = OpConstant %uint 16 | |
| %_ptr_Function_v4int = OpTypePointer Function %v4int | |
| %_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint | |
| %118 = OpTypeFunction %void | |
| %123 = 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 | |
| OpBranch %74 | |
| %74 = OpLabel | |
| OpBranch %77 | |
| %77 = OpLabel | |
| %79 = OpPhi %uint %tint_local_index %74 %80 %76 | |
| OpLoopMerge %78 %76 None | |
| OpBranch %75 | |
| %75 = OpLabel | |
| %84 = OpUGreaterThanEqual %bool %79 %uint_4 | |
| OpSelectionMerge %86 None | |
| OpBranchConditional %84 %87 %86 | |
| %87 = OpLabel | |
| OpBranch %78 | |
| %86 = OpLabel | |
| %88 = OpAccessChain %_ptr_Workgroup_v4int %src_workgroup %79 | |
| OpStore %88 %90 None | |
| OpBranch %76 | |
| %76 = OpLabel | |
| %80 = OpIAdd %uint %79 %uint_1 | |
| OpBranch %77 | |
| %78 = OpLabel | |
| OpControlBarrier %uint_2 %uint_2 %uint_264 | |
| %83 = OpFunctionCall %void %foo %src_let | |
| OpReturn | |
| OpFunctionEnd | |
| %53 = OpFunction %_arr_v4int_uint_4 None %93 | |
| %start_byte_offset = OpFunctionParameter %uint | |
| %94 = OpLabel | |
| %a = OpVariable %_ptr_Function__arr_v4int_uint_4 Function | |
| OpStore %a %src_let | |
| OpBranch %96 | |
| %96 = OpLabel | |
| OpBranch %99 | |
| %99 = OpLabel | |
| %101 = OpPhi %uint %uint_0 %96 %102 %98 | |
| OpLoopMerge %100 %98 None | |
| OpBranch %97 | |
| %97 = OpLabel | |
| %104 = OpUGreaterThanEqual %bool %101 %uint_4 | |
| OpSelectionMerge %105 None | |
| OpBranchConditional %104 %106 %105 | |
| %106 = OpLabel | |
| OpBranch %100 | |
| %105 = OpLabel | |
| %107 = OpIMul %uint %101 %uint_16 | |
| %109 = OpIAdd %uint %start_byte_offset %107 | |
| %110 = OpAccessChain %_ptr_Function_v4int %a %101 | |
| %112 = OpUDiv %uint %109 %uint_16 | |
| %113 = OpAccessChain %_ptr_Uniform_v4uint %11 %uint_0 %112 | |
| %115 = OpLoad %v4uint %113 None | |
| %116 = OpBitcast %v4int %115 | |
| OpStore %110 %116 None | |
| OpBranch %98 | |
| %98 = OpLabel | |
| %102 = OpIAdd %uint %101 %uint_1 | |
| OpBranch %99 | |
| %100 = OpLabel | |
| %103 = OpLoad %_arr_v4int_uint_4 %a None | |
| OpReturnValue %103 | |
| OpFunctionEnd | |
| %main = OpFunction %void None %118 | |
| %119 = OpLabel | |
| %120 = OpLoad %uint %main_local_invocation_index_Input None | |
| %121 = OpFunctionCall %void %main_inner %120 | |
| OpReturn | |
| OpFunctionEnd | |
| %tint_convert_explicit_layout = OpFunction %_arr_v4int_uint_4 None %123 | |
| %tint_source = OpFunctionParameter %_arr_v4int_uint_4_0 | |
| %124 = OpLabel | |
| %125 = OpVariable %_ptr_Function__arr_v4int_uint_4_0 Function | |
| %127 = OpVariable %_ptr_Function__arr_v4int_uint_4 Function %src_let | |
| OpStore %125 %tint_source | |
| OpBranch %128 | |
| %128 = OpLabel | |
| OpBranch %131 | |
| %131 = OpLabel | |
| %133 = OpPhi %uint %uint_0 %128 %134 %130 | |
| OpLoopMerge %132 %130 None | |
| OpBranch %129 | |
| %129 = OpLabel | |
| %136 = OpUGreaterThanEqual %bool %133 %uint_4 | |
| OpSelectionMerge %137 None | |
| OpBranchConditional %136 %138 %137 | |
| %138 = OpLabel | |
| OpBranch %132 | |
| %137 = OpLabel | |
| %139 = OpAccessChain %_ptr_Function_v4int %125 %133 | |
| %140 = OpLoad %v4int %139 None | |
| %141 = OpAccessChain %_ptr_Function_v4int %127 %133 | |
| OpStore %141 %140 None | |
| OpBranch %130 | |
| %130 = OpLabel | |
| %134 = OpIAdd %uint %133 %uint_1 | |
| OpBranch %131 | |
| %132 = OpLabel | |
| %135 = OpLoad %_arr_v4int_uint_4 %127 None | |
| OpReturnValue %135 | |
| OpFunctionEnd |