| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 214 |
| ; Schema: 0 |
| OpCapability Shader |
| %92 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %x_GLF_color_1_1 |
| OpExecutionMode %main OriginUpperLeft |
| OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1" |
| OpName %x_GLF_color_1_1 "x_GLF_color_1_1" |
| OpName %m "m" |
| OpName %buf2 "buf2" |
| OpMemberName %buf2 0 "one" |
| OpName %x_10 "x_10" |
| OpName %buf0 "buf0" |
| OpMemberName %buf0 0 "x_GLF_uniform_float_values" |
| OpName %x_12 "x_12" |
| OpName %gl_FragCoord "gl_FragCoord" |
| OpName %buf1 "buf1" |
| OpMemberName %buf1 0 "x_GLF_uniform_int_values" |
| OpName %x_16 "x_16" |
| OpName %x_GLF_color "x_GLF_color" |
| OpName %func0_i1_ "func0_i1_" |
| OpName %x "x" |
| OpName %i "i" |
| OpName %x_137 "x_137" |
| OpName %x_138 "x_138" |
| OpName %x_138_phi "x_138_phi" |
| OpName %x_139_phi "x_139_phi" |
| OpName %func1_ "func1_" |
| OpName %param "param" |
| OpName %main_1 "main_1" |
| OpName %main_out "main_out" |
| OpMemberName %main_out 0 "x_GLF_color_1" |
| OpName %main_inner "main_inner" |
| OpName %gl_FragCoord_param "gl_FragCoord_param" |
| OpName %main "main" |
| OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord |
| OpDecorate %x_GLF_color_1_1 Location 0 |
| OpDecorate %buf2 Block |
| OpMemberDecorate %buf2 0 Offset 0 |
| OpDecorate %x_10 NonWritable |
| OpDecorate %x_10 DescriptorSet 0 |
| OpDecorate %x_10 Binding 2 |
| OpDecorate %buf0 Block |
| OpMemberDecorate %buf0 0 Offset 0 |
| OpDecorate %_arr_float_uint_1 ArrayStride 16 |
| OpDecorate %x_12 NonWritable |
| OpDecorate %x_12 DescriptorSet 0 |
| OpDecorate %x_12 Binding 0 |
| OpDecorate %buf1 Block |
| OpMemberDecorate %buf1 0 Offset 0 |
| OpDecorate %_arr_int_uint_4 ArrayStride 16 |
| OpDecorate %x_16 NonWritable |
| OpDecorate %x_16 DescriptorSet 0 |
| OpDecorate %x_16 Binding 1 |
| OpMemberDecorate %main_out 0 Offset 0 |
| %float = OpTypeFloat 32 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Input_v4float = OpTypePointer Input %v4float |
| %gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %7 = OpConstantNull %v4float |
| %x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7 |
| %v2float = OpTypeVector %float 2 |
| %mat4v2float = OpTypeMatrix %v2float 4 |
| %_ptr_Private_mat4v2float = OpTypePointer Private %mat4v2float |
| %12 = OpConstantNull %mat4v2float |
| %m = OpVariable %_ptr_Private_mat4v2float Private %12 |
| %buf2 = OpTypeStruct %float |
| %_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2 |
| %x_10 = OpVariable %_ptr_Uniform_buf2 Uniform |
| %uint = OpTypeInt 32 0 |
| %uint_1 = OpConstant %uint 1 |
| %_arr_float_uint_1 = OpTypeArray %float %uint_1 |
| %buf0 = OpTypeStruct %_arr_float_uint_1 |
| %_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0 |
| %x_12 = OpVariable %_ptr_Uniform_buf0 Uniform |
| %_ptr_Private_v4float = OpTypePointer Private %v4float |
| %gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7 |
| %int = OpTypeInt 32 1 |
| %uint_4 = OpConstant %uint 4 |
| %_arr_int_uint_4 = OpTypeArray %int %uint_4 |
| %buf1 = OpTypeStruct %_arr_int_uint_4 |
| %_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1 |
| %x_16 = OpVariable %_ptr_Uniform_buf1 Uniform |
| %x_GLF_color = OpVariable %_ptr_Private_v4float Private %7 |
| %void = OpTypeVoid |
| %_ptr_Function_int = OpTypePointer Function %int |
| %31 = OpTypeFunction %void %_ptr_Function_int |
| %38 = OpConstantNull %int |
| %bool = OpTypeBool |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %42 = OpConstantNull %bool |
| %int_1 = OpConstant %int 1 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %int_0 = OpConstant %int 0 |
| %int_2 = OpConstant %int 2 |
| %int_3 = OpConstant %int 3 |
| %_ptr_Private_float = OpTypePointer Private %float |
| %104 = OpTypeFunction %void |
| %float_0 = OpConstant %float 0 |
| %118 = OpConstantComposite %v2float %float_0 %float_0 |
| %119 = OpConstantComposite %mat4v2float %118 %118 %118 %118 |
| %_ptr_Uniform_int = OpTypePointer Uniform %int |
| %v2bool = OpTypeVector %bool 2 |
| %uint_2 = OpConstant %uint 2 |
| %uint_3 = OpConstant %uint 3 |
| %main_out = OpTypeStruct %v4float |
| %201 = OpTypeFunction %main_out %v4float |
| %func0_i1_ = OpFunction %void None %31 |
| %x = OpFunctionParameter %_ptr_Function_int |
| %36 = OpLabel |
| %i = OpVariable %_ptr_Function_int Function %38 |
| %x_137 = OpVariable %_ptr_Function_bool Function %42 |
| %x_138 = OpVariable %_ptr_Function_bool Function %42 |
| %x_138_phi = OpVariable %_ptr_Function_bool Function %42 |
| %x_139_phi = OpVariable %_ptr_Function_bool Function %42 |
| %47 = OpLoad %int %x |
| %49 = OpSLessThan %bool %47 %int_1 |
| OpStore %x_139_phi %49 |
| %50 = OpLogicalNot %bool %49 |
| OpSelectionMerge %51 None |
| OpBranchConditional %50 %52 %51 |
| %52 = OpLabel |
| %54 = OpLoad %int %x |
| %55 = OpSGreaterThan %bool %54 %int_1 |
| OpStore %x_138_phi %55 |
| OpSelectionMerge %56 None |
| OpBranchConditional %55 %57 %56 |
| %57 = OpLabel |
| %60 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 |
| %61 = OpLoad %float %60 |
| %63 = OpAccessChain %_ptr_Uniform_float %x_12 %uint_0 %int_0 |
| %64 = OpLoad %float %63 |
| %65 = OpFOrdGreaterThan %bool %61 %64 |
| OpStore %x_137 %65 |
| %66 = OpLoad %bool %x_137 |
| OpStore %x_138_phi %66 |
| OpBranch %56 |
| %56 = OpLabel |
| %67 = OpLoad %bool %x_138_phi |
| OpStore %x_138 %67 |
| %68 = OpLoad %bool %x_138 |
| OpStore %x_139_phi %68 |
| OpBranch %51 |
| %51 = OpLabel |
| %69 = OpLoad %bool %x_139_phi |
| OpSelectionMerge %70 None |
| OpBranchConditional %69 %71 %70 |
| %71 = OpLabel |
| OpReturn |
| %70 = OpLabel |
| %72 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 |
| %73 = OpLoad %float %72 |
| %74 = OpAccessChain %_ptr_Uniform_float %x_12 %uint_0 %int_0 |
| %75 = OpLoad %float %74 |
| %76 = OpFOrdEqual %bool %73 %75 |
| OpSelectionMerge %77 None |
| OpBranchConditional %76 %78 %77 |
| %78 = OpLabel |
| OpStore %i %int_0 |
| OpBranch %79 |
| %79 = OpLabel |
| OpLoopMerge %80 %81 None |
| OpBranch %82 |
| %82 = OpLabel |
| %83 = OpLoad %int %i |
| %85 = OpSLessThan %bool %83 %int_2 |
| OpSelectionMerge %86 None |
| OpBranchConditional %85 %87 %88 |
| %87 = OpLabel |
| OpBranch %86 |
| %88 = OpLabel |
| OpBranch %80 |
| %86 = OpLabel |
| OpBranch %81 |
| %81 = OpLabel |
| %90 = OpLoad %int %x |
| %91 = OpExtInst %int %92 SClamp %90 %int_0 %int_3 |
| %94 = OpLoad %int %i |
| %95 = OpAccessChain %_ptr_Uniform_float %x_12 %uint_0 %int_0 |
| %96 = OpLoad %float %95 |
| %98 = OpAccessChain %_ptr_Private_float %m %91 %94 |
| %99 = OpLoad %float %98 |
| %100 = OpAccessChain %_ptr_Private_float %m %91 %94 |
| %101 = OpFAdd %float %99 %96 |
| OpStore %100 %101 |
| %102 = OpLoad %int %i |
| %103 = OpIAdd %int %102 %int_1 |
| OpStore %i %103 |
| OpBranch %79 |
| %80 = OpLabel |
| OpBranch %77 |
| %77 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %func1_ = OpFunction %void None %104 |
| %106 = OpLabel |
| %param = OpVariable %_ptr_Function_int Function %38 |
| %108 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1 |
| %109 = OpLoad %float %108 |
| %111 = OpFOrdLessThan %bool %109 %float_0 |
| OpSelectionMerge %112 None |
| OpBranchConditional %111 %113 %112 |
| %113 = OpLabel |
| OpReturn |
| %112 = OpLabel |
| OpStore %param %int_1 |
| %114 = OpFunctionCall %void %func0_i1_ %param |
| OpReturn |
| OpFunctionEnd |
| %main_1 = OpFunction %void None %104 |
| %117 = OpLabel |
| OpStore %m %119 |
| %120 = OpFunctionCall %void %func1_ |
| %121 = OpFunctionCall %void %func1_ |
| %122 = OpLoad %mat4v2float %m |
| %124 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0 |
| %125 = OpLoad %int %124 |
| %126 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0 |
| %127 = OpLoad %int %126 |
| %128 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_1 |
| %129 = OpLoad %int %128 |
| %130 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_1 |
| %131 = OpLoad %int %130 |
| %132 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0 |
| %133 = OpLoad %int %132 |
| %134 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0 |
| %135 = OpLoad %int %134 |
| %136 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0 |
| %137 = OpLoad %int %136 |
| %138 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0 |
| %139 = OpLoad %int %138 |
| %140 = OpConvertSToF %float %125 |
| %141 = OpConvertSToF %float %127 |
| %142 = OpCompositeConstruct %v2float %140 %141 |
| %143 = OpConvertSToF %float %129 |
| %144 = OpConvertSToF %float %131 |
| %145 = OpCompositeConstruct %v2float %143 %144 |
| %146 = OpConvertSToF %float %133 |
| %147 = OpConvertSToF %float %135 |
| %148 = OpCompositeConstruct %v2float %146 %147 |
| %149 = OpConvertSToF %float %137 |
| %150 = OpConvertSToF %float %139 |
| %151 = OpCompositeConstruct %v2float %149 %150 |
| %152 = OpCompositeConstruct %mat4v2float %142 %145 %148 %151 |
| %154 = OpCompositeExtract %v2float %122 0 |
| %155 = OpCompositeExtract %v2float %152 0 |
| %156 = OpFOrdEqual %v2bool %154 %155 |
| %153 = OpAll %bool %156 |
| OpSelectionMerge %158 None |
| OpBranchConditional %153 %159 %158 |
| %159 = OpLabel |
| %161 = OpCompositeExtract %v2float %122 1 |
| %162 = OpCompositeExtract %v2float %152 1 |
| %163 = OpFOrdEqual %v2bool %161 %162 |
| %160 = OpAll %bool %163 |
| OpBranch %158 |
| %158 = OpLabel |
| %164 = OpPhi %bool %153 %117 %160 %159 |
| OpSelectionMerge %165 None |
| OpBranchConditional %164 %166 %165 |
| %166 = OpLabel |
| %169 = OpCompositeExtract %v2float %122 2 |
| %170 = OpCompositeExtract %v2float %152 2 |
| %171 = OpFOrdEqual %v2bool %169 %170 |
| %167 = OpAll %bool %171 |
| OpBranch %165 |
| %165 = OpLabel |
| %172 = OpPhi %bool %164 %158 %167 %166 |
| OpSelectionMerge %173 None |
| OpBranchConditional %172 %174 %173 |
| %174 = OpLabel |
| %177 = OpCompositeExtract %v2float %122 3 |
| %178 = OpCompositeExtract %v2float %152 3 |
| %179 = OpFOrdEqual %v2bool %177 %178 |
| %175 = OpAll %bool %179 |
| OpBranch %173 |
| %173 = OpLabel |
| %180 = OpPhi %bool %172 %165 %175 %174 |
| OpSelectionMerge %181 None |
| OpBranchConditional %180 %182 %183 |
| %182 = OpLabel |
| %184 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_3 |
| %185 = OpLoad %int %184 |
| %186 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0 |
| %187 = OpLoad %int %186 |
| %188 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0 |
| %189 = OpLoad %int %188 |
| %190 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_3 |
| %191 = OpLoad %int %190 |
| %192 = OpConvertSToF %float %185 |
| %193 = OpConvertSToF %float %187 |
| %194 = OpConvertSToF %float %189 |
| %195 = OpConvertSToF %float %191 |
| %196 = OpCompositeConstruct %v4float %192 %193 %194 %195 |
| OpStore %x_GLF_color %196 |
| OpBranch %181 |
| %183 = OpLabel |
| %197 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0 |
| %198 = OpLoad %int %197 |
| %199 = OpConvertSToF %float %198 |
| %200 = OpCompositeConstruct %v4float %199 %199 %199 %199 |
| OpStore %x_GLF_color %200 |
| OpBranch %181 |
| %181 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %main_out None %201 |
| %gl_FragCoord_param = OpFunctionParameter %v4float |
| %205 = OpLabel |
| OpStore %gl_FragCoord %gl_FragCoord_param |
| %206 = OpFunctionCall %void %main_1 |
| %207 = OpLoad %v4float %x_GLF_color |
| %208 = OpCompositeConstruct %main_out %207 |
| OpReturnValue %208 |
| OpFunctionEnd |
| %main = OpFunction %void None %104 |
| %210 = OpLabel |
| %212 = OpLoad %v4float %gl_FragCoord_param_1 |
| %211 = OpFunctionCall %main_out %main_inner %212 |
| %213 = OpCompositeExtract %v4float %211 0 |
| OpStore %x_GLF_color_1_1 %213 |
| OpReturn |
| OpFunctionEnd |