blob: 5f3b9c017f6d6d84e0883babbe85db6f94d62548 [file] [log] [blame]
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor
OpExecutionMode %_entrypoint_v OriginUpperLeft
OpName %sk_FragColor "sk_FragColor"
OpName %_UniformBuffer "_UniformBuffer"
OpMemberName %_UniformBuffer 0 "colorGreen"
OpMemberName %_UniformBuffer 1 "colorRed"
OpMemberName %_UniformBuffer 2 "testMatrix2x2"
OpName %_entrypoint_v "_entrypoint_v"
OpName %main "main"
OpName %ok "ok"
OpName %i "i"
OpName %f "f"
OpName %f2 "f2"
OpName %iv "iv"
OpDecorate %sk_FragColor RelaxedPrecision
OpDecorate %sk_FragColor Location 0
OpDecorate %sk_FragColor Index 0
OpMemberDecorate %_UniformBuffer 0 Offset 0
OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
OpMemberDecorate %_UniformBuffer 1 Offset 16
OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
OpMemberDecorate %_UniformBuffer 2 Offset 32
OpMemberDecorate %_UniformBuffer 2 ColMajor
OpMemberDecorate %_UniformBuffer 2 MatrixStride 16
OpDecorate %_UniformBuffer Block
OpDecorate %7 Binding 0
OpDecorate %7 DescriptorSet 0
OpDecorate %92 RelaxedPrecision
OpDecorate %116 RelaxedPrecision
OpDecorate %127 RelaxedPrecision
OpDecorate %128 RelaxedPrecision
OpDecorate %135 RelaxedPrecision
OpDecorate %136 RelaxedPrecision
OpDecorate %137 RelaxedPrecision
OpDecorate %144 RelaxedPrecision
OpDecorate %145 RelaxedPrecision
OpDecorate %201 RelaxedPrecision
OpDecorate %203 RelaxedPrecision
OpDecorate %204 RelaxedPrecision
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%sk_FragColor = OpVariable %_ptr_Output_v4float Output
%v2float = OpTypeVector %float 2
%mat2v2float = OpTypeMatrix %v2float 2
%_UniformBuffer = OpTypeStruct %v4float %v4float %mat2v2float
%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
%7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
%void = OpTypeVoid
%14 = OpTypeFunction %void
%float_0 = OpConstant %float 0
%17 = OpConstantComposite %v2float %float_0 %float_0
%_ptr_Function_v2float = OpTypePointer Function %v2float
%21 = OpTypeFunction %v4float %_ptr_Function_v2float
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%true = OpConstantTrue %bool
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%int_5 = OpConstant %int 5
%int_1 = OpConstant %int 1
%false = OpConstantFalse %bool
%int_6 = OpConstant %int 6
%int_7 = OpConstant %int 7
%_ptr_Function_float = OpTypePointer Function %float
%float_0_5 = OpConstant %float 0.5
%float_1 = OpConstant %float 1
%float_1_5 = OpConstant %float 1.5
%float_2_5 = OpConstant %float 2.5
%87 = OpConstantComposite %v2float %float_0_5 %float_0_5
%int_0 = OpConstant %int 0
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
%float_n1 = OpConstant %float -1
%142 = OpConstantComposite %v4float %float_0 %float_n1 %float_0 %float_n1
%v4bool = OpTypeVector %bool 4
%float_n2 = OpConstant %float -2
%float_n3 = OpConstant %float -3
%float_n4 = OpConstant %float -4
%155 = OpConstantComposite %v2float %float_n1 %float_n2
%156 = OpConstantComposite %v2float %float_n3 %float_n4
%157 = OpConstantComposite %mat2v2float %155 %156
%_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float
%int_2 = OpConstant %int 2
%v2bool = OpTypeVector %bool 2
%v2int = OpTypeVector %int 2
%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_n5 = OpConstant %int -5
%191 = OpConstantComposite %v2int %int_n5 %int_5
%_ptr_Function_v4float = OpTypePointer Function %v4float
%_entrypoint_v = OpFunction %void None %14
%15 = OpLabel
%18 = OpVariable %_ptr_Function_v2float Function
OpStore %18 %17
%20 = OpFunctionCall %v4float %main %18
OpStore %sk_FragColor %20
OpReturn
OpFunctionEnd
%main = OpFunction %v4float None %21
%22 = OpFunctionParameter %_ptr_Function_v2float
%23 = OpLabel
%ok = OpVariable %_ptr_Function_bool Function
%i = OpVariable %_ptr_Function_int Function
%f = OpVariable %_ptr_Function_float Function
%f2 = OpVariable %_ptr_Function_v2float Function
%iv = OpVariable %_ptr_Function_v2int Function
%195 = OpVariable %_ptr_Function_v4float Function
OpStore %ok %true
OpStore %i %int_5
%33 = OpIAdd %int %int_5 %int_1
OpStore %i %33
OpSelectionMerge %36 None
OpBranchConditional %true %35 %36
%35 = OpLabel
%38 = OpIEqual %bool %33 %int_6
OpBranch %36
%36 = OpLabel
%39 = OpPhi %bool %false %23 %38 %35
OpStore %ok %39
OpSelectionMerge %41 None
OpBranchConditional %39 %40 %41
%40 = OpLabel
%42 = OpIAdd %int %33 %int_1
OpStore %i %42
%44 = OpIEqual %bool %42 %int_7
OpBranch %41
%41 = OpLabel
%45 = OpPhi %bool %false %36 %44 %40
OpStore %ok %45
OpSelectionMerge %47 None
OpBranchConditional %45 %46 %47
%46 = OpLabel
%48 = OpLoad %int %i
%49 = OpISub %int %48 %int_1
OpStore %i %49
%50 = OpIEqual %bool %49 %int_6
OpBranch %47
%47 = OpLabel
%51 = OpPhi %bool %false %41 %50 %46
OpStore %ok %51
%52 = OpLoad %int %i
%53 = OpISub %int %52 %int_1
OpStore %i %53
OpSelectionMerge %55 None
OpBranchConditional %51 %54 %55
%54 = OpLabel
%56 = OpIEqual %bool %53 %int_5
OpBranch %55
%55 = OpLabel
%57 = OpPhi %bool %false %47 %56 %54
OpStore %ok %57
OpStore %f %float_0_5
%62 = OpFAdd %float %float_0_5 %float_1
OpStore %f %62
OpSelectionMerge %64 None
OpBranchConditional %57 %63 %64
%63 = OpLabel
%66 = OpFOrdEqual %bool %62 %float_1_5
OpBranch %64
%64 = OpLabel
%67 = OpPhi %bool %false %55 %66 %63
OpStore %ok %67
OpSelectionMerge %69 None
OpBranchConditional %67 %68 %69
%68 = OpLabel
%70 = OpFAdd %float %62 %float_1
OpStore %f %70
%72 = OpFOrdEqual %bool %70 %float_2_5
OpBranch %69
%69 = OpLabel
%73 = OpPhi %bool %false %64 %72 %68
OpStore %ok %73
OpSelectionMerge %75 None
OpBranchConditional %73 %74 %75
%74 = OpLabel
%76 = OpLoad %float %f
%77 = OpFSub %float %76 %float_1
OpStore %f %77
%78 = OpFOrdEqual %bool %77 %float_1_5
OpBranch %75
%75 = OpLabel
%79 = OpPhi %bool %false %69 %78 %74
OpStore %ok %79
%80 = OpLoad %float %f
%81 = OpFSub %float %80 %float_1
OpStore %f %81
OpSelectionMerge %83 None
OpBranchConditional %79 %82 %83
%82 = OpLabel
%84 = OpFOrdEqual %bool %81 %float_0_5
OpBranch %83
%83 = OpLabel
%85 = OpPhi %bool %false %75 %84 %82
OpStore %ok %85
OpStore %f2 %87
%88 = OpAccessChain %_ptr_Function_float %f2 %int_0
%90 = OpLoad %float %88
%91 = OpFAdd %float %90 %float_1
OpStore %88 %91
%92 = OpLoad %bool %ok
OpSelectionMerge %94 None
OpBranchConditional %92 %93 %94
%93 = OpLabel
%95 = OpLoad %v2float %f2
%96 = OpCompositeExtract %float %95 0
%97 = OpFOrdEqual %bool %96 %float_1_5
OpBranch %94
%94 = OpLabel
%98 = OpPhi %bool %false %83 %97 %93
OpStore %ok %98
OpSelectionMerge %100 None
OpBranchConditional %98 %99 %100
%99 = OpLabel
%101 = OpAccessChain %_ptr_Function_float %f2 %int_0
%102 = OpLoad %float %101
%103 = OpFAdd %float %102 %float_1
OpStore %101 %103
%104 = OpFOrdEqual %bool %103 %float_2_5
OpBranch %100
%100 = OpLabel
%105 = OpPhi %bool %false %94 %104 %99
OpStore %ok %105
OpSelectionMerge %107 None
OpBranchConditional %105 %106 %107
%106 = OpLabel
%108 = OpAccessChain %_ptr_Function_float %f2 %int_0
%109 = OpLoad %float %108
%110 = OpFSub %float %109 %float_1
OpStore %108 %110
%111 = OpFOrdEqual %bool %110 %float_1_5
OpBranch %107
%107 = OpLabel
%112 = OpPhi %bool %false %100 %111 %106
OpStore %ok %112
%113 = OpAccessChain %_ptr_Function_float %f2 %int_0
%114 = OpLoad %float %113
%115 = OpFSub %float %114 %float_1
OpStore %113 %115
%116 = OpLoad %bool %ok
OpSelectionMerge %118 None
OpBranchConditional %116 %117 %118
%117 = OpLabel
%119 = OpLoad %v2float %f2
%120 = OpCompositeExtract %float %119 0
%121 = OpFOrdEqual %bool %120 %float_0_5
OpBranch %118
%118 = OpLabel
%122 = OpPhi %bool %false %107 %121 %117
OpStore %ok %122
OpSelectionMerge %124 None
OpBranchConditional %122 %123 %124
%123 = OpLabel
%125 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
%127 = OpLoad %v4float %125
%128 = OpCompositeExtract %float %127 0
%129 = OpFUnordNotEqual %bool %128 %float_1
OpBranch %124
%124 = OpLabel
%130 = OpPhi %bool %false %118 %129 %123
OpStore %ok %130
OpSelectionMerge %132 None
OpBranchConditional %130 %131 %132
%131 = OpLabel
%134 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
%135 = OpLoad %v4float %134
%136 = OpCompositeExtract %float %135 1
%137 = OpFNegate %float %136
%138 = OpFOrdEqual %bool %float_n1 %137
OpBranch %132
%132 = OpLabel
%139 = OpPhi %bool %false %124 %138 %131
OpStore %ok %139
OpSelectionMerge %141 None
OpBranchConditional %139 %140 %141
%140 = OpLabel
%143 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
%144 = OpLoad %v4float %143
%145 = OpFNegate %v4float %144
%146 = OpFOrdEqual %v4bool %142 %145
%148 = OpAll %bool %146
OpBranch %141
%141 = OpLabel
%149 = OpPhi %bool %false %132 %148 %140
OpStore %ok %149
OpSelectionMerge %151 None
OpBranchConditional %149 %150 %151
%150 = OpLabel
%158 = OpAccessChain %_ptr_Uniform_mat2v2float %7 %int_2
%161 = OpLoad %mat2v2float %158
%162 = OpCompositeExtract %v2float %161 0
%163 = OpFNegate %v2float %162
%164 = OpCompositeExtract %v2float %161 1
%165 = OpFNegate %v2float %164
%166 = OpCompositeConstruct %mat2v2float %163 %165
%168 = OpFOrdEqual %v2bool %155 %163
%169 = OpAll %bool %168
%170 = OpFOrdEqual %v2bool %156 %165
%171 = OpAll %bool %170
%172 = OpLogicalAnd %bool %169 %171
OpBranch %151
%151 = OpLabel
%173 = OpPhi %bool %false %141 %172 %150
OpStore %ok %173
%177 = OpLoad %int %i
%178 = OpLoad %int %i
%179 = OpSNegate %int %178
%180 = OpCompositeConstruct %v2int %177 %179
OpStore %iv %180
OpSelectionMerge %182 None
OpBranchConditional %173 %181 %182
%181 = OpLabel
%183 = OpLoad %int %i
%184 = OpSNegate %int %183
%186 = OpIEqual %bool %184 %int_n5
OpBranch %182
%182 = OpLabel
%187 = OpPhi %bool %false %151 %186 %181
OpStore %ok %187
OpSelectionMerge %189 None
OpBranchConditional %187 %188 %189
%188 = OpLabel
%190 = OpSNegate %v2int %180
%192 = OpIEqual %v2bool %190 %191
%193 = OpAll %bool %192
OpBranch %189
%189 = OpLabel
%194 = OpPhi %bool %false %182 %193 %188
OpStore %ok %194
OpSelectionMerge %199 None
OpBranchConditional %194 %197 %198
%197 = OpLabel
%200 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
%201 = OpLoad %v4float %200
OpStore %195 %201
OpBranch %199
%198 = OpLabel
%202 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
%203 = OpLoad %v4float %202
OpStore %195 %203
OpBranch %199
%199 = OpLabel
%204 = OpLoad %v4float %195
OpReturnValue %204
OpFunctionEnd