blob: 2125db7570d82bba497362f03da3cf33f39f4fcf [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 252
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_7 "x_7"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
OpName %x_11 "x_11"
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %main_1 "main_1"
OpName %a "a"
OpName %b "b"
OpName %i "i"
OpName %i_1 "i_1"
OpName %i_2 "i_2"
OpName %i_3 "i_3"
OpName %i_4 "i_4"
OpName %i_5 "i_5"
OpName %i_6 "i_6"
OpName %i_7 "i_7"
OpName %i_8 "i_8"
OpName %i_9 "i_9"
OpName %i_10 "i_10"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main "main"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_2 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_3 ArrayStride 16
OpDecorate %x_11 NonWritable
OpDecorate %x_11 DescriptorSet 0
OpDecorate %x_11 Binding 1
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%buf0 = OpTypeStruct %_arr_float_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%int = OpTypeInt 32 1
%uint_3 = OpConstant %uint 3
%_arr_int_uint_3 = OpTypeArray %int %uint_3
%buf1 = OpTypeStruct %_arr_int_uint_3
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_11 = OpVariable %_ptr_Uniform_buf1 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%17 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %17
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %17
%_ptr_Input_v4float = OpTypePointer Input %v4float
%tint_symbol = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %17
%void = OpTypeVoid
%23 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%29 = OpConstantNull %float
%_ptr_Function_int = OpTypePointer Function %int
%33 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%bool = OpTypeBool
%int_2 = OpConstant %int 2
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%float_1 = OpConstant %float 1
%main_out = OpTypeStruct %v4float
%239 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %23
%26 = OpLabel
%a = OpVariable %_ptr_Function_float Function %29
%b = OpVariable %_ptr_Function_float Function %29
%i = OpVariable %_ptr_Function_int Function %33
%i_1 = OpVariable %_ptr_Function_int Function %33
%i_2 = OpVariable %_ptr_Function_int Function %33
%i_3 = OpVariable %_ptr_Function_int Function %33
%i_4 = OpVariable %_ptr_Function_int Function %33
%i_5 = OpVariable %_ptr_Function_int Function %33
%i_6 = OpVariable %_ptr_Function_int Function %33
%i_7 = OpVariable %_ptr_Function_int Function %33
%i_8 = OpVariable %_ptr_Function_int Function %33
%i_9 = OpVariable %_ptr_Function_int Function %33
%i_10 = OpVariable %_ptr_Function_int Function %33
%47 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%48 = OpLoad %float %47
OpStore %a %48
%50 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
%51 = OpLoad %float %50
OpStore %b %51
%53 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%54 = OpLoad %int %53
OpStore %i %54
OpBranch %55
%55 = OpLabel
OpLoopMerge %56 %57 None
OpBranch %58
%58 = OpLabel
%59 = OpLoad %int %i
%60 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%61 = OpLoad %int %60
%62 = OpSLessThan %bool %59 %61
OpSelectionMerge %64 None
OpBranchConditional %62 %65 %66
%65 = OpLabel
OpBranch %64
%66 = OpLabel
OpBranch %56
%64 = OpLabel
%67 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%68 = OpLoad %int %67
OpStore %i_1 %68
OpBranch %69
%69 = OpLabel
OpLoopMerge %70 %71 None
OpBranch %72
%72 = OpLabel
%73 = OpLoad %int %i_1
%74 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%75 = OpLoad %int %74
%76 = OpSLessThan %bool %73 %75
OpSelectionMerge %77 None
OpBranchConditional %76 %78 %79
%78 = OpLabel
OpBranch %77
%79 = OpLabel
OpBranch %70
%77 = OpLabel
%80 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%81 = OpLoad %int %80
OpStore %i_2 %81
OpBranch %82
%82 = OpLabel
OpLoopMerge %83 %84 None
OpBranch %85
%85 = OpLabel
%86 = OpLoad %int %i_2
%87 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%88 = OpLoad %int %87
%89 = OpSLessThan %bool %86 %88
OpSelectionMerge %90 None
OpBranchConditional %89 %91 %92
%91 = OpLabel
OpBranch %90
%92 = OpLabel
OpBranch %83
%90 = OpLabel
%94 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_2
%95 = OpLoad %int %94
OpStore %i_3 %95
OpBranch %96
%96 = OpLabel
OpLoopMerge %97 %98 None
OpBranch %99
%99 = OpLabel
%100 = OpLoad %int %i_3
%101 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%102 = OpLoad %int %101
%103 = OpSLessThan %bool %100 %102
OpSelectionMerge %104 None
OpBranchConditional %103 %105 %106
%105 = OpLabel
OpBranch %104
%106 = OpLabel
OpBranch %97
%104 = OpLabel
%107 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_2
%108 = OpLoad %int %107
OpStore %i_4 %108
OpBranch %109
%109 = OpLabel
OpLoopMerge %110 %111 None
OpBranch %112
%112 = OpLabel
%113 = OpLoad %int %i_4
%114 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%115 = OpLoad %int %114
%116 = OpSLessThan %bool %113 %115
OpSelectionMerge %117 None
OpBranchConditional %116 %118 %119
%118 = OpLabel
OpBranch %117
%119 = OpLabel
OpBranch %110
%117 = OpLabel
%120 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%121 = OpLoad %int %120
OpStore %i_5 %121
OpBranch %122
%122 = OpLabel
OpLoopMerge %123 %124 None
OpBranch %125
%125 = OpLabel
%126 = OpLoad %int %i_5
%127 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%128 = OpLoad %int %127
%129 = OpSLessThan %bool %126 %128
OpSelectionMerge %130 None
OpBranchConditional %129 %131 %132
%131 = OpLabel
OpBranch %130
%132 = OpLabel
OpBranch %123
%130 = OpLabel
%133 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%134 = OpLoad %int %133
OpStore %i_6 %134
OpBranch %135
%135 = OpLabel
OpLoopMerge %136 %137 None
OpBranch %138
%138 = OpLabel
%139 = OpLoad %int %i_6
%140 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%141 = OpLoad %int %140
%142 = OpSLessThan %bool %139 %141
OpSelectionMerge %143 None
OpBranchConditional %142 %144 %145
%144 = OpLabel
OpBranch %143
%145 = OpLabel
OpBranch %136
%143 = OpLabel
%146 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%147 = OpLoad %int %146
OpStore %i_7 %147
OpBranch %148
%148 = OpLabel
OpLoopMerge %149 %150 None
OpBranch %151
%151 = OpLabel
%152 = OpLoad %int %i_7
%153 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%154 = OpLoad %int %153
%155 = OpSLessThan %bool %152 %154
OpSelectionMerge %156 None
OpBranchConditional %155 %157 %158
%157 = OpLabel
OpBranch %156
%158 = OpLabel
OpBranch %149
%156 = OpLabel
%159 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%160 = OpLoad %int %159
OpStore %i_8 %160
OpBranch %161
%161 = OpLabel
OpLoopMerge %162 %163 None
OpBranch %164
%164 = OpLabel
%165 = OpLoad %int %i_8
%166 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%167 = OpLoad %int %166
%168 = OpSLessThan %bool %165 %167
OpSelectionMerge %169 None
OpBranchConditional %168 %170 %171
%170 = OpLabel
OpBranch %169
%171 = OpLabel
OpBranch %162
%169 = OpLabel
%172 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%173 = OpLoad %int %172
OpStore %i_9 %173
OpBranch %174
%174 = OpLabel
OpLoopMerge %175 %176 None
OpBranch %177
%177 = OpLabel
%178 = OpLoad %int %i_9
%179 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%180 = OpLoad %int %179
%181 = OpSLessThan %bool %178 %180
OpSelectionMerge %182 None
OpBranchConditional %181 %183 %184
%183 = OpLabel
OpBranch %182
%184 = OpLabel
OpBranch %175
%182 = OpLabel
%185 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_1
%186 = OpLoad %int %185
OpStore %i_10 %186
OpBranch %187
%187 = OpLabel
OpLoopMerge %188 %189 None
OpBranch %190
%190 = OpLabel
%191 = OpLoad %int %i_10
%192 = OpAccessChain %_ptr_Uniform_int %x_11 %uint_0 %int_0
%193 = OpLoad %int %192
%194 = OpSLessThan %bool %191 %193
OpSelectionMerge %195 None
OpBranchConditional %194 %196 %197
%196 = OpLabel
OpBranch %195
%197 = OpLabel
OpBranch %188
%195 = OpLabel
%198 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
%199 = OpLoad %float %198
OpStore %a %199
%202 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%203 = OpLoad %float %202
%204 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
%205 = OpLoad %float %204
%206 = OpFOrdGreaterThan %bool %203 %205
OpSelectionMerge %207 None
OpBranchConditional %206 %208 %207
%208 = OpLabel
OpBranch %188
%207 = OpLabel
OpBranch %189
%189 = OpLabel
%209 = OpLoad %int %i_10
%210 = OpIAdd %int %209 %int_1
OpStore %i_10 %210
OpBranch %187
%188 = OpLabel
OpBranch %176
%176 = OpLabel
%211 = OpLoad %int %i_9
%212 = OpIAdd %int %211 %int_1
OpStore %i_9 %212
OpBranch %174
%175 = OpLabel
OpBranch %163
%163 = OpLabel
%213 = OpLoad %int %i_8
%214 = OpIAdd %int %213 %int_1
OpStore %i_8 %214
OpBranch %161
%162 = OpLabel
OpBranch %150
%150 = OpLabel
%215 = OpLoad %int %i_7
%216 = OpIAdd %int %215 %int_1
OpStore %i_7 %216
OpBranch %148
%149 = OpLabel
OpBranch %137
%137 = OpLabel
%217 = OpLoad %int %i_6
%218 = OpIAdd %int %217 %int_1
OpStore %i_6 %218
OpBranch %135
%136 = OpLabel
OpBranch %124
%124 = OpLabel
%219 = OpLoad %int %i_5
%220 = OpIAdd %int %219 %int_1
OpStore %i_5 %220
OpBranch %122
%123 = OpLabel
OpBranch %111
%111 = OpLabel
%221 = OpLoad %int %i_4
%222 = OpIAdd %int %221 %int_1
OpStore %i_4 %222
OpBranch %109
%110 = OpLabel
OpBranch %98
%98 = OpLabel
%223 = OpLoad %int %i_3
%224 = OpIAdd %int %223 %int_1
OpStore %i_3 %224
OpBranch %96
%97 = OpLabel
OpBranch %84
%84 = OpLabel
%225 = OpLoad %int %i_2
%226 = OpIAdd %int %225 %int_1
OpStore %i_2 %226
OpBranch %82
%83 = OpLabel
OpBranch %71
%71 = OpLabel
%227 = OpLoad %int %i_1
%228 = OpIAdd %int %227 %int_1
OpStore %i_1 %228
OpBranch %69
%70 = OpLabel
%229 = OpLoad %float %b
%231 = OpFAdd %float %229 %float_1
OpStore %b %231
OpBranch %57
%57 = OpLabel
%232 = OpLoad %int %i
%233 = OpIAdd %int %232 %int_1
OpStore %i %233
OpBranch %55
%56 = OpLabel
%234 = OpLoad %float %b
%235 = OpLoad %float %a
%236 = OpLoad %float %a
%237 = OpLoad %float %b
%238 = OpCompositeConstruct %v4float %234 %235 %236 %237
OpStore %x_GLF_color %238
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %239
%tint_symbol_1 = OpFunctionParameter %main_out
%243 = OpLabel
%244 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %244
OpReturn
OpFunctionEnd
%main = OpFunction %void None %23
%246 = OpLabel
%247 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %247
%248 = OpFunctionCall %void %main_1
%250 = OpLoad %v4float %x_GLF_color
%251 = OpCompositeConstruct %main_out %250
%249 = OpFunctionCall %void %tint_symbol_3 %251
OpReturn
OpFunctionEnd