| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 1 | |
| ; Bound: 139 | |
| ; 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 %S_tint_explicit_layout 0 "arr" | |
| OpName %S_tint_explicit_layout "S_tint_explicit_layout" | |
| OpMemberName %src_uniform_block_tint_explicit_layout 0 "inner" | |
| OpName %src_uniform_block_tint_explicit_layout "src_uniform_block_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 "val" | |
| OpName %main "main" | |
| OpName %tint_convert_explicit_layout "tint_convert_explicit_layout" | |
| OpName %tint_source "tint_source" | |
| OpDecorate %_arr_v4int_uint_4_0 ArrayStride 16 | |
| OpMemberDecorate %S_tint_explicit_layout 0 Offset 0 | |
| 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 | |
| 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 | |
| %_arr_v4int_uint_4_0 = OpTypeArray %v4int %uint_4 | |
| %S_tint_explicit_layout = OpTypeStruct %_arr_v4int_uint_4_0 | |
| %src_uniform_block_tint_explicit_layout = OpTypeStruct %S_tint_explicit_layout | |
| %_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 | |
| %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_Workgroup__arr_v4int_uint_4 Workgroup | |
| %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_Workgroup__arr__arr__arr_int_uint_2_uint_3_uint_4 = OpTypePointer Workgroup %_arr__arr__arr_int_uint_2_uint_3_uint_4 | |
| %dst_nested = OpVariable %_ptr_Workgroup__arr__arr__arr_int_uint_2_uint_3_uint_4 Workgroup | |
| %_ptr_Input_uint = OpTypePointer Input %uint | |
| %main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input | |
| %30 = OpTypeFunction %_arr_v4int_uint_4 | |
| %S = OpTypeStruct %_arr_v4int_uint_4 | |
| %34 = OpTypeFunction %S | |
| %36 = OpConstantNull %S | |
| %void = OpTypeVoid | |
| %40 = OpTypeFunction %void %_arr_v4int_uint_4 | |
| %_ptr_Function__arr_v4int_uint_4 = OpTypePointer Function %_arr_v4int_uint_4 | |
| %int_1 = OpConstant %int 1 | |
| %45 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 | |
| %int_2 = OpConstant %int 2 | |
| %47 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2 | |
| %int_3 = OpConstant %int 3 | |
| %49 = OpConstantComposite %v4int %int_3 %int_3 %int_3 %int_3 | |
| %44 = OpConstantComposite %_arr_v4int_uint_4 %45 %47 %49 %49 | |
| %_ptr_Uniform__arr_v4int_uint_4_0 = OpTypePointer Uniform %_arr_v4int_uint_4_0 | |
| %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 | |
| %69 = OpConstantNull %_arr__arr__arr_int_uint_2_uint_3_uint_4 | |
| %73 = OpTypeFunction %void %uint | |
| %bool = OpTypeBool | |
| %_ptr_Workgroup_v4int = OpTypePointer Workgroup %v4int | |
| %88 = OpConstantNull %v4int | |
| %uint_1 = OpConstant %uint 1 | |
| %uint_24 = OpConstant %uint 24 | |
| %uint_6 = OpConstant %uint 6 | |
| %_ptr_Workgroup_int = OpTypePointer Workgroup %int | |
| %int_0 = OpConstant %int 0 | |
| %uint_264 = OpConstant %uint 264 | |
| %114 = OpTypeFunction %void | |
| %119 = OpTypeFunction %_arr_v4int_uint_4 %_arr_v4int_uint_4_0 | |
| %_ptr_Function__arr_v4int_uint_4_0 = OpTypePointer Function %_arr_v4int_uint_4_0 | |
| %_ptr_Function_v4int = OpTypePointer Function %v4int | |
| %ret_arr = OpFunction %_arr_v4int_uint_4 None %30 | |
| %31 = OpLabel | |
| OpReturnValue %src_let | |
| OpFunctionEnd | |
| %ret_struct_arr = OpFunction %S None %34 | |
| %35 = OpLabel | |
| OpReturnValue %36 | |
| OpFunctionEnd | |
| %foo = OpFunction %void None %40 | |
| %src_param = OpFunctionParameter %_arr_v4int_uint_4 | |
| %41 = 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 %69 | |
| OpStore %dst %44 None | |
| OpStore %dst %src_param None | |
| %51 = OpFunctionCall %_arr_v4int_uint_4 %ret_arr | |
| OpStore %dst %51 None | |
| OpStore %dst %src_let None | |
| %52 = OpLoad %_arr_v4int_uint_4 %src_function None | |
| OpStore %dst %52 None | |
| %53 = OpLoad %_arr_v4int_uint_4 %src_private None | |
| OpStore %dst %53 None | |
| %54 = OpLoad %_arr_v4int_uint_4 %src_workgroup None | |
| OpStore %dst %54 None | |
| %55 = OpFunctionCall %S %ret_struct_arr | |
| %56 = OpCompositeExtract %_arr_v4int_uint_4 %55 0 | |
| OpStore %dst %56 None | |
| %57 = OpAccessChain %_ptr_Uniform__arr_v4int_uint_4_0 %11 %uint_0 %uint_0 | |
| %60 = OpLoad %_arr_v4int_uint_4_0 %57 None | |
| %61 = OpFunctionCall %_arr_v4int_uint_4 %tint_convert_explicit_layout %60 | |
| OpStore %dst %61 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 | |
| %82 = OpUGreaterThanEqual %bool %80 %uint_4 | |
| OpSelectionMerge %84 None | |
| OpBranchConditional %82 %85 %84 | |
| %85 = OpLabel | |
| OpBranch %79 | |
| %84 = OpLabel | |
| %86 = OpAccessChain %_ptr_Workgroup_v4int %src_workgroup %80 | |
| OpStore %86 %88 None | |
| %89 = OpAccessChain %_ptr_Workgroup_v4int %dst %80 | |
| OpStore %89 %88 None | |
| OpBranch %77 | |
| %77 = OpLabel | |
| %81 = OpIAdd %uint %80 %uint_1 | |
| OpBranch %78 | |
| %79 = OpLabel | |
| OpBranch %91 | |
| %91 = OpLabel | |
| OpBranch %94 | |
| %94 = OpLabel | |
| %96 = OpPhi %uint %tint_local_index %91 %97 %93 | |
| OpLoopMerge %95 %93 None | |
| OpBranch %92 | |
| %92 = OpLabel | |
| %98 = OpUGreaterThanEqual %bool %96 %uint_24 | |
| OpSelectionMerge %100 None | |
| OpBranchConditional %98 %101 %100 | |
| %101 = OpLabel | |
| OpBranch %95 | |
| %100 = OpLabel | |
| %102 = OpUMod %uint %96 %uint_2 | |
| %103 = OpUDiv %uint %96 %uint_2 | |
| %104 = OpUMod %uint %103 %uint_3 | |
| %105 = OpUDiv %uint %96 %uint_6 | |
| %107 = OpAccessChain %_ptr_Workgroup_int %dst_nested %105 %104 %102 | |
| OpStore %107 %int_0 None | |
| OpBranch %93 | |
| %93 = OpLabel | |
| %97 = OpIAdd %uint %96 %uint_1 | |
| OpBranch %94 | |
| %95 = OpLabel | |
| OpControlBarrier %uint_2 %uint_2 %uint_264 | |
| %112 = OpFunctionCall %void %foo %src_let | |
| OpReturn | |
| OpFunctionEnd | |
| %main = OpFunction %void None %114 | |
| %115 = OpLabel | |
| %116 = OpLoad %uint %main_local_invocation_index_Input None | |
| %117 = OpFunctionCall %void %main_inner %116 | |
| OpReturn | |
| OpFunctionEnd | |
| %tint_convert_explicit_layout = OpFunction %_arr_v4int_uint_4 None %119 | |
| %tint_source = OpFunctionParameter %_arr_v4int_uint_4_0 | |
| %120 = OpLabel | |
| %121 = OpVariable %_ptr_Function__arr_v4int_uint_4_0 Function | |
| %123 = OpVariable %_ptr_Function__arr_v4int_uint_4 Function %src_let | |
| OpStore %121 %tint_source | |
| OpBranch %124 | |
| %124 = OpLabel | |
| OpBranch %127 | |
| %127 = OpLabel | |
| %129 = OpPhi %uint %uint_0 %124 %130 %126 | |
| OpLoopMerge %128 %126 None | |
| OpBranch %125 | |
| %125 = OpLabel | |
| %131 = OpUGreaterThanEqual %bool %129 %uint_4 | |
| OpSelectionMerge %132 None | |
| OpBranchConditional %131 %133 %132 | |
| %133 = OpLabel | |
| OpBranch %128 | |
| %132 = OpLabel | |
| %134 = OpAccessChain %_ptr_Function_v4int %121 %129 | |
| %136 = OpLoad %v4int %134 None | |
| %137 = OpAccessChain %_ptr_Function_v4int %123 %129 | |
| OpStore %137 %136 None | |
| OpBranch %126 | |
| %126 = OpLabel | |
| %130 = OpIAdd %uint %129 %uint_1 | |
| OpBranch %127 | |
| %128 = OpLabel | |
| %138 = OpLoad %_arr_v4int_uint_4 %123 None | |
| OpReturnValue %138 | |
| OpFunctionEnd |