| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 138 |
| ; Schema: 0 |
| OpCapability Shader |
| %127 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" %main_local_invocation_id_Input %main_local_invocation_index_Input |
| OpExecutionMode %main LocalSize 32 1 8 |
| OpMemberName %U_block_tint_explicit_layout 0 "inner" |
| OpName %U_block_tint_explicit_layout "U_block_tint_explicit_layout" |
| OpName %dst_image2d "dst_image2d" |
| OpName %src_image2d "src_image2d" |
| OpName %outputs "outputs" |
| OpName %main_local_invocation_id_Input "main_local_invocation_id_Input" |
| OpName %main_local_invocation_index_Input "main_local_invocation_index_Input" |
| OpName %main_inner "main_inner" |
| OpName %lid "lid" |
| OpName %tint_local_index "tint_local_index" |
| OpName %init "init" |
| OpName %S "S" |
| OpName %s_group "s_group" |
| OpName %result "result" |
| OpName %tint_v4f32_to_v4u32 "tint_v4f32_to_v4u32" |
| OpName %value "value" |
| OpName %main "main" |
| OpDecorate %_arr_v4uint_uint_4 ArrayStride 16 |
| OpMemberDecorate %U_block_tint_explicit_layout 0 Offset 0 |
| OpDecorate %U_block_tint_explicit_layout Block |
| OpDecorate %1 DescriptorSet 0 |
| OpDecorate %1 Binding 3 |
| OpDecorate %1 NonWritable |
| OpDecorate %dst_image2d DescriptorSet 0 |
| OpDecorate %dst_image2d Binding 1 |
| OpDecorate %dst_image2d NonReadable |
| OpDecorate %src_image2d DescriptorSet 0 |
| OpDecorate %src_image2d Binding 2 |
| OpDecorate %main_local_invocation_id_Input BuiltIn LocalInvocationId |
| OpDecorate %main_local_invocation_index_Input BuiltIn LocalInvocationIndex |
| %uint = OpTypeInt 32 0 |
| %v4uint = OpTypeVector %uint 4 |
| %uint_4 = OpConstant %uint 4 |
| %_arr_v4uint_uint_4 = OpTypeArray %v4uint %uint_4 |
| %U_block_tint_explicit_layout = OpTypeStruct %_arr_v4uint_uint_4 |
| %_ptr_Uniform_U_block_tint_explicit_layout = OpTypePointer Uniform %U_block_tint_explicit_layout |
| %1 = OpVariable %_ptr_Uniform_U_block_tint_explicit_layout Uniform |
| %10 = OpTypeImage %uint 2D 0 0 0 2 Rgba32ui |
| %_ptr_UniformConstant_10 = OpTypePointer UniformConstant %10 |
| %dst_image2d = OpVariable %_ptr_UniformConstant_10 UniformConstant |
| %float = OpTypeFloat 32 |
| %13 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_ptr_UniformConstant_13 = OpTypePointer UniformConstant %13 |
| %src_image2d = OpVariable %_ptr_UniformConstant_13 UniformConstant |
| %uint_32 = OpConstant %uint 32 |
| %_arr_v4uint_uint_32 = OpTypeArray %v4uint %uint_32 |
| %uint_8 = OpConstant %uint 8 |
| %_arr__arr_v4uint_uint_32_uint_8 = OpTypeArray %_arr_v4uint_uint_32 %uint_8 |
| %_ptr_Workgroup__arr__arr_v4uint_uint_32_uint_8 = OpTypePointer Workgroup %_arr__arr_v4uint_uint_32_uint_8 |
| %outputs = OpVariable %_ptr_Workgroup__arr__arr_v4uint_uint_32_uint_8 Workgroup |
| %v3uint = OpTypeVector %uint 3 |
| %_ptr_Input_v3uint = OpTypePointer Input %v3uint |
| %main_local_invocation_id_Input = OpVariable %_ptr_Input_v3uint Input |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input |
| %void = OpTypeVoid |
| %30 = OpTypeFunction %void %v3uint %uint |
| %uint_256 = OpConstant %uint 256 |
| %bool = OpTypeBool |
| %uint_2 = OpConstant %uint 2 |
| %uint_264 = OpConstant %uint 264 |
| %int = OpTypeInt 32 1 |
| %_ptr_Workgroup_v4uint = OpTypePointer Workgroup %v4uint |
| %57 = OpConstantNull %v4uint |
| %_ptr_Function_int = OpTypePointer Function %int |
| %_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint |
| %uint_0 = OpConstant %uint 0 |
| %uint_3 = OpConstant %uint 3 |
| %int_8 = OpConstant %int 8 |
| %int_0 = OpConstant %int 0 |
| %v2uint = OpTypeVector %uint 2 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Function_v4uint = OpTypePointer Function %v4uint |
| %124 = OpTypeFunction %v4uint %v4float |
| %128 = OpConstantNull %v4float |
| %float_4_29496704e_09 = OpConstant %float 4.29496704e+09 |
| %129 = OpConstantComposite %v4float %float_4_29496704e_09 %float_4_29496704e_09 %float_4_29496704e_09 %float_4_29496704e_09 |
| %133 = OpTypeFunction %void |
| %main_inner = OpFunction %void None %30 |
| %lid = OpFunctionParameter %v3uint |
| %tint_local_index = OpFunctionParameter %uint |
| %31 = OpLabel |
| %S = OpVariable %_ptr_Function_int Function |
| %s_group = OpVariable %_ptr_Function_int Function |
| %result = OpVariable %_ptr_Function_v4uint Function |
| %32 = OpULessThan %bool %tint_local_index %uint_256 |
| OpSelectionMerge %35 None |
| OpBranchConditional %32 %36 %35 |
| %36 = OpLabel |
| %53 = OpUMod %uint %tint_local_index %uint_32 |
| %54 = OpUDiv %uint %tint_local_index %uint_32 |
| %55 = OpAccessChain %_ptr_Workgroup_v4uint %outputs %54 %53 |
| OpStore %55 %57 None |
| OpBranch %35 |
| %35 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| %40 = OpCompositeExtract %uint %lid 2 |
| %init = OpBitcast %int %40 |
| OpBranch %43 |
| %43 = OpLabel |
| OpStore %S %init |
| OpBranch %46 |
| %46 = OpLabel |
| OpLoopMerge %47 %45 None |
| OpBranch %44 |
| %44 = OpLabel |
| %60 = OpLoad %int %S None |
| %61 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %uint_3 |
| %65 = OpLoad %v4uint %61 None |
| %66 = OpCompositeExtract %uint %65 0 |
| %67 = OpBitcast %int %66 |
| %68 = OpSLessThan %bool %60 %67 |
| OpSelectionMerge %69 None |
| OpBranchConditional %68 %69 %70 |
| %70 = OpLabel |
| OpBranch %47 |
| %69 = OpLabel |
| OpBranch %45 |
| %45 = OpLabel |
| %71 = OpLoad %int %S None |
| %72 = OpBitcast %uint %71 |
| %73 = OpBitcast %uint %int_8 |
| %75 = OpIAdd %uint %72 %73 |
| %76 = OpBitcast %int %75 |
| OpStore %S %76 None |
| OpBranch %46 |
| %47 = OpLabel |
| OpBranch %48 |
| %48 = OpLabel |
| OpStore %s_group %int_0 |
| OpBranch %51 |
| %51 = OpLabel |
| OpLoopMerge %52 %50 None |
| OpBranch %49 |
| %49 = OpLabel |
| %79 = OpLoad %int %s_group None |
| %80 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %uint_3 |
| %81 = OpLoad %v4uint %80 None |
| %82 = OpCompositeExtract %uint %81 2 |
| %83 = OpBitcast %int %82 |
| %84 = OpSLessThan %bool %79 %83 |
| OpSelectionMerge %85 None |
| OpBranchConditional %84 %85 %86 |
| %86 = OpLabel |
| OpBranch %52 |
| %85 = OpLabel |
| %87 = OpCompositeExtract %uint %lid 2 |
| %88 = OpCompositeExtract %uint %lid 0 |
| %89 = OpAccessChain %_ptr_Workgroup_v4uint %outputs %87 %88 |
| %90 = OpLoad %13 %src_image2d None |
| %91 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %uint_3 |
| %92 = OpLoad %v4uint %91 None |
| %93 = OpCompositeExtract %uint %92 0 |
| %94 = OpBitcast %int %93 |
| %95 = OpBitcast %uint %94 |
| %97 = OpCompositeConstruct %v2uint %95 %95 |
| %98 = OpImageFetch %v4float %90 %97 Lod %int_0 |
| %100 = OpFunctionCall %v4uint %tint_v4f32_to_v4u32 %98 |
| OpStore %89 %100 None |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| %103 = OpCompositeExtract %uint %lid 2 |
| %104 = OpCompositeExtract %uint %lid 0 |
| %105 = OpAccessChain %_ptr_Workgroup_v4uint %outputs %103 %104 |
| %106 = OpLoad %v4uint %105 None |
| OpStore %result %106 |
| %109 = OpLoad %10 %dst_image2d None |
| %110 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %uint_3 |
| %111 = OpLoad %v4uint %110 None |
| %112 = OpCompositeExtract %uint %111 0 |
| %113 = OpBitcast %int %112 |
| %114 = OpBitcast %uint %113 |
| %115 = OpCompositeConstruct %v2uint %114 %114 |
| %116 = OpLoad %v4uint %result None |
| OpImageWrite %109 %115 %116 None |
| OpBranch %50 |
| %50 = OpLabel |
| %118 = OpLoad %int %s_group None |
| %119 = OpBitcast %uint %118 |
| %120 = OpBitcast %uint %int_8 |
| %121 = OpIAdd %uint %119 %120 |
| %122 = OpBitcast %int %121 |
| OpStore %s_group %122 None |
| OpBranch %51 |
| %52 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %tint_v4f32_to_v4u32 = OpFunction %v4uint None %124 |
| %value = OpFunctionParameter %v4float |
| %125 = OpLabel |
| %126 = OpExtInst %v4float %127 NClamp %value %128 %129 |
| %131 = OpConvertFToU %v4uint %126 |
| OpReturnValue %131 |
| OpFunctionEnd |
| %main = OpFunction %void None %133 |
| %134 = OpLabel |
| %135 = OpLoad %v3uint %main_local_invocation_id_Input None |
| %136 = OpLoad %uint %main_local_invocation_index_Input None |
| %137 = OpFunctionCall %void %main_inner %135 %136 |
| OpReturn |
| OpFunctionEnd |