| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 0 | |
| ; Bound: 193 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| OpCapability ImageQuery | |
| %25 = OpExtInstImport "GLSL.std.450" | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint GLCompute %main "main" %GlobalInvocationID_1 | |
| OpExecutionMode %main LocalSize 1 1 1 | |
| OpName %GlobalInvocationID_1 "GlobalInvocationID_1" | |
| OpName %src "src" | |
| OpName %dst "dst" | |
| OpName %OutputBuf "OutputBuf" | |
| OpMemberName %OutputBuf 0 "result" | |
| OpName %output "output" | |
| OpName %Uniforms "Uniforms" | |
| OpMemberName %Uniforms 0 "dstTextureFlipY" | |
| OpMemberName %Uniforms 1 "channelCount" | |
| OpMemberName %Uniforms 2 "srcCopyOrigin" | |
| OpMemberName %Uniforms 3 "dstCopyOrigin" | |
| OpMemberName %Uniforms 4 "copySize" | |
| OpName %uniforms "uniforms" | |
| OpName %aboutEqual "aboutEqual" | |
| OpName %value "value" | |
| OpName %expect "expect" | |
| OpName %main_inner "main_inner" | |
| OpName %GlobalInvocationID "GlobalInvocationID" | |
| OpName %success "success" | |
| OpName %srcTexCoord "srcTexCoord" | |
| OpName %main "main" | |
| OpDecorate %GlobalInvocationID_1 BuiltIn GlobalInvocationId | |
| OpDecorate %src DescriptorSet 0 | |
| OpDecorate %src Binding 0 | |
| OpDecorate %dst DescriptorSet 0 | |
| OpDecorate %dst Binding 1 | |
| OpDecorate %OutputBuf Block | |
| OpMemberDecorate %OutputBuf 0 Offset 0 | |
| OpDecorate %_runtimearr_uint ArrayStride 4 | |
| OpDecorate %output DescriptorSet 0 | |
| OpDecorate %output Binding 2 | |
| OpDecorate %Uniforms Block | |
| OpMemberDecorate %Uniforms 0 Offset 0 | |
| OpMemberDecorate %Uniforms 1 Offset 4 | |
| OpMemberDecorate %Uniforms 2 Offset 8 | |
| OpMemberDecorate %Uniforms 3 Offset 16 | |
| OpMemberDecorate %Uniforms 4 Offset 24 | |
| OpDecorate %uniforms NonWritable | |
| OpDecorate %uniforms DescriptorSet 0 | |
| OpDecorate %uniforms Binding 3 | |
| %uint = OpTypeInt 32 0 | |
| %v3uint = OpTypeVector %uint 3 | |
| %_ptr_Input_v3uint = OpTypePointer Input %v3uint | |
| %GlobalInvocationID_1 = OpVariable %_ptr_Input_v3uint Input | |
| %float = OpTypeFloat 32 | |
| %7 = OpTypeImage %float 2D 0 0 0 1 Unknown | |
| %_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7 | |
| %src = OpVariable %_ptr_UniformConstant_7 UniformConstant | |
| %dst = OpVariable %_ptr_UniformConstant_7 UniformConstant | |
| %_runtimearr_uint = OpTypeRuntimeArray %uint | |
| %OutputBuf = OpTypeStruct %_runtimearr_uint | |
| %_ptr_StorageBuffer_OutputBuf = OpTypePointer StorageBuffer %OutputBuf | |
| %output = OpVariable %_ptr_StorageBuffer_OutputBuf StorageBuffer | |
| %v2uint = OpTypeVector %uint 2 | |
| %Uniforms = OpTypeStruct %uint %uint %v2uint %v2uint %v2uint | |
| %_ptr_Uniform_Uniforms = OpTypePointer Uniform %Uniforms | |
| %uniforms = OpVariable %_ptr_Uniform_Uniforms Uniform | |
| %bool = OpTypeBool | |
| %18 = OpTypeFunction %bool %float %float | |
| %float_0_00100000005 = OpConstant %float 0.00100000005 | |
| %void = OpTypeVoid | |
| %29 = OpTypeFunction %void %v3uint | |
| %int = OpTypeInt 32 1 | |
| %v2int = OpTypeVector %int 2 | |
| %int_0 = OpConstant %int 0 | |
| %v4float = OpTypeVector %float 4 | |
| %float_0 = OpConstant %float 0 | |
| %float_1 = OpConstant %float 1 | |
| %46 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 | |
| %true = OpConstantTrue %bool | |
| %_ptr_Function_bool = OpTypePointer Function %bool | |
| %50 = OpConstantNull %bool | |
| %uint_3 = OpConstant %uint 3 | |
| %uint_0 = OpConstant %uint 0 | |
| %_ptr_Uniform_uint = OpTypePointer Uniform %uint | |
| %uint_1 = OpConstant %uint 1 | |
| %uint_4 = OpConstant %uint 4 | |
| %v4bool = OpTypeVector %bool 4 | |
| %_ptr_Uniform_v2uint = OpTypePointer Uniform %v2uint | |
| %uint_2 = OpConstant %uint 2 | |
| %_ptr_Function_v2uint = OpTypePointer Function %v2uint | |
| %110 = OpConstantNull %v2uint | |
| %_ptr_Function_uint = OpTypePointer Function %uint | |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint | |
| %188 = OpTypeFunction %void | |
| %aboutEqual = OpFunction %bool None %18 | |
| %value = OpFunctionParameter %float | |
| %expect = OpFunctionParameter %float | |
| %23 = OpLabel | |
| %26 = OpFSub %float %value %expect | |
| %24 = OpExtInst %float %25 FAbs %26 | |
| %28 = OpFOrdLessThan %bool %24 %float_0_00100000005 | |
| OpReturnValue %28 | |
| OpFunctionEnd | |
| %main_inner = OpFunction %void None %29 | |
| %GlobalInvocationID = OpFunctionParameter %v3uint | |
| %33 = OpLabel | |
| %success = OpVariable %_ptr_Function_bool Function %50 | |
| %srcTexCoord = OpVariable %_ptr_Function_v2uint Function %110 | |
| %37 = OpLoad %7 %src | |
| %34 = OpImageQuerySizeLod %v2int %37 %int_0 | |
| %40 = OpLoad %7 %dst | |
| %39 = OpImageQuerySizeLod %v2int %40 %int_0 | |
| %42 = OpVectorShuffle %v2uint %GlobalInvocationID %GlobalInvocationID 0 1 | |
| OpStore %success %true | |
| %51 = OpCompositeExtract %uint %42 0 | |
| %55 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_3 %uint_0 | |
| %56 = OpLoad %uint %55 | |
| %57 = OpULessThan %bool %51 %56 | |
| OpSelectionMerge %58 None | |
| OpBranchConditional %57 %58 %59 | |
| %59 = OpLabel | |
| %60 = OpCompositeExtract %uint %42 1 | |
| %62 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_3 %uint_1 | |
| %63 = OpLoad %uint %62 | |
| %64 = OpULessThan %bool %60 %63 | |
| OpBranch %58 | |
| %58 = OpLabel | |
| %65 = OpPhi %bool %57 %33 %64 %59 | |
| OpSelectionMerge %66 None | |
| OpBranchConditional %65 %66 %67 | |
| %67 = OpLabel | |
| %68 = OpCompositeExtract %uint %42 0 | |
| %69 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_3 %uint_0 | |
| %70 = OpLoad %uint %69 | |
| %72 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_4 %uint_0 | |
| %73 = OpLoad %uint %72 | |
| %74 = OpIAdd %uint %70 %73 | |
| %75 = OpUGreaterThanEqual %bool %68 %74 | |
| OpBranch %66 | |
| %66 = OpLabel | |
| %76 = OpPhi %bool %65 %58 %75 %67 | |
| OpSelectionMerge %77 None | |
| OpBranchConditional %76 %77 %78 | |
| %78 = OpLabel | |
| %79 = OpCompositeExtract %uint %42 1 | |
| %80 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_3 %uint_1 | |
| %81 = OpLoad %uint %80 | |
| %82 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_4 %uint_1 | |
| %83 = OpLoad %uint %82 | |
| %84 = OpIAdd %uint %81 %83 | |
| %85 = OpUGreaterThanEqual %bool %79 %84 | |
| OpBranch %77 | |
| %77 = OpLabel | |
| %86 = OpPhi %bool %76 %66 %85 %78 | |
| OpSelectionMerge %87 None | |
| OpBranchConditional %86 %88 %89 | |
| %88 = OpLabel | |
| %90 = OpLoad %bool %success | |
| OpSelectionMerge %91 None | |
| OpBranchConditional %90 %92 %91 | |
| %92 = OpLabel | |
| %95 = OpLoad %7 %dst | |
| %96 = OpBitcast %v2int %42 | |
| %94 = OpImageFetch %v4float %95 %96 Lod %int_0 | |
| %97 = OpFOrdEqual %v4bool %94 %46 | |
| %93 = OpAll %bool %97 | |
| OpBranch %91 | |
| %91 = OpLabel | |
| %99 = OpPhi %bool %90 %88 %93 %92 | |
| OpStore %success %99 | |
| OpBranch %87 | |
| %89 = OpLabel | |
| %101 = OpAccessChain %_ptr_Uniform_v2uint %uniforms %uint_3 | |
| %102 = OpLoad %v2uint %101 | |
| %103 = OpISub %v2uint %42 %102 | |
| %105 = OpAccessChain %_ptr_Uniform_v2uint %uniforms %uint_2 | |
| %106 = OpLoad %v2uint %105 | |
| %107 = OpIAdd %v2uint %103 %106 | |
| OpStore %srcTexCoord %107 | |
| %111 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_0 | |
| %112 = OpLoad %uint %111 | |
| %113 = OpIEqual %bool %112 %uint_1 | |
| OpSelectionMerge %114 None | |
| OpBranchConditional %113 %115 %114 | |
| %115 = OpLabel | |
| %117 = OpAccessChain %_ptr_Function_uint %srcTexCoord %uint_1 | |
| %119 = OpCompositeExtract %int %34 1 | |
| %118 = OpBitcast %uint %119 | |
| %120 = OpAccessChain %_ptr_Function_uint %srcTexCoord %uint_1 | |
| %121 = OpLoad %uint %120 | |
| %122 = OpISub %uint %118 %121 | |
| %123 = OpISub %uint %122 %uint_1 | |
| OpStore %117 %123 | |
| OpBranch %114 | |
| %114 = OpLabel | |
| %125 = OpLoad %7 %src | |
| %127 = OpLoad %v2uint %srcTexCoord | |
| %126 = OpBitcast %v2int %127 | |
| %124 = OpImageFetch %v4float %125 %126 Lod %int_0 | |
| %129 = OpLoad %7 %dst | |
| %130 = OpBitcast %v2int %42 | |
| %128 = OpImageFetch %v4float %129 %130 Lod %int_0 | |
| %131 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_1 | |
| %132 = OpLoad %uint %131 | |
| %133 = OpIEqual %bool %132 %uint_2 | |
| OpSelectionMerge %134 None | |
| OpBranchConditional %133 %135 %136 | |
| %135 = OpLabel | |
| %137 = OpLoad %bool %success | |
| OpSelectionMerge %138 None | |
| OpBranchConditional %137 %139 %138 | |
| %139 = OpLabel | |
| %141 = OpCompositeExtract %float %128 0 | |
| %142 = OpCompositeExtract %float %124 0 | |
| %140 = OpFunctionCall %bool %aboutEqual %141 %142 | |
| OpBranch %138 | |
| %138 = OpLabel | |
| %143 = OpPhi %bool %137 %135 %140 %139 | |
| OpSelectionMerge %144 None | |
| OpBranchConditional %143 %145 %144 | |
| %145 = OpLabel | |
| %147 = OpCompositeExtract %float %128 1 | |
| %148 = OpCompositeExtract %float %124 1 | |
| %146 = OpFunctionCall %bool %aboutEqual %147 %148 | |
| OpBranch %144 | |
| %144 = OpLabel | |
| %149 = OpPhi %bool %143 %138 %146 %145 | |
| OpStore %success %149 | |
| OpBranch %134 | |
| %136 = OpLabel | |
| %150 = OpLoad %bool %success | |
| OpSelectionMerge %151 None | |
| OpBranchConditional %150 %152 %151 | |
| %152 = OpLabel | |
| %154 = OpCompositeExtract %float %128 0 | |
| %155 = OpCompositeExtract %float %124 0 | |
| %153 = OpFunctionCall %bool %aboutEqual %154 %155 | |
| OpBranch %151 | |
| %151 = OpLabel | |
| %156 = OpPhi %bool %150 %136 %153 %152 | |
| OpSelectionMerge %157 None | |
| OpBranchConditional %156 %158 %157 | |
| %158 = OpLabel | |
| %160 = OpCompositeExtract %float %128 1 | |
| %161 = OpCompositeExtract %float %124 1 | |
| %159 = OpFunctionCall %bool %aboutEqual %160 %161 | |
| OpBranch %157 | |
| %157 = OpLabel | |
| %162 = OpPhi %bool %156 %151 %159 %158 | |
| OpSelectionMerge %163 None | |
| OpBranchConditional %162 %164 %163 | |
| %164 = OpLabel | |
| %166 = OpCompositeExtract %float %128 2 | |
| %167 = OpCompositeExtract %float %124 2 | |
| %165 = OpFunctionCall %bool %aboutEqual %166 %167 | |
| OpBranch %163 | |
| %163 = OpLabel | |
| %168 = OpPhi %bool %162 %157 %165 %164 | |
| OpSelectionMerge %169 None | |
| OpBranchConditional %168 %170 %169 | |
| %170 = OpLabel | |
| %172 = OpCompositeExtract %float %128 3 | |
| %173 = OpCompositeExtract %float %124 3 | |
| %171 = OpFunctionCall %bool %aboutEqual %172 %173 | |
| OpBranch %169 | |
| %169 = OpLabel | |
| %174 = OpPhi %bool %168 %163 %171 %170 | |
| OpStore %success %174 | |
| OpBranch %134 | |
| %134 = OpLabel | |
| OpBranch %87 | |
| %87 = OpLabel | |
| %175 = OpCompositeExtract %uint %GlobalInvocationID 1 | |
| %177 = OpCompositeExtract %int %39 0 | |
| %176 = OpBitcast %uint %177 | |
| %178 = OpIMul %uint %175 %176 | |
| %179 = OpCompositeExtract %uint %GlobalInvocationID 0 | |
| %180 = OpIAdd %uint %178 %179 | |
| %181 = OpLoad %bool %success | |
| OpSelectionMerge %182 None | |
| OpBranchConditional %181 %183 %184 | |
| %183 = OpLabel | |
| %186 = OpAccessChain %_ptr_StorageBuffer_uint %output %uint_0 %180 | |
| OpStore %186 %uint_1 | |
| OpBranch %182 | |
| %184 = OpLabel | |
| %187 = OpAccessChain %_ptr_StorageBuffer_uint %output %uint_0 %180 | |
| OpStore %187 %uint_0 | |
| OpBranch %182 | |
| %182 = OpLabel | |
| OpReturn | |
| OpFunctionEnd | |
| %main = OpFunction %void None %188 | |
| %190 = OpLabel | |
| %192 = OpLoad %v3uint %GlobalInvocationID_1 | |
| %191 = OpFunctionCall %void %main_inner %192 | |
| OpReturn | |
| OpFunctionEnd |