blob: 0e185642af19505190e7229332f71c8632c5df49 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 208
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf1 "buf1"
OpMemberName %buf1 0 "v1"
OpName %x_8 "x_8"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_10 "x_10"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %S "S"
OpMemberName %S 0 "data"
OpName %func_struct_S_i11_ "func_struct_S_i11_"
OpName %s "s"
OpName %main_1 "main_1"
OpName %i "i"
OpName %arr "arr"
OpName %i_1 "i_1"
OpName %param "param"
OpName %j "j"
OpName %x_132 "x_132"
OpName %x_142 "x_142"
OpName %x_133_phi "x_133_phi"
OpName %x_143_phi "x_143_phi"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %tint_symbol "tint_symbol"
OpName %main "main"
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_5 ArrayStride 16
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %S 0 Offset 0
OpDecorate %_arr_S_uint_3 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf1 = OpTypeStruct %v2float
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_8 = OpVariable %_ptr_Uniform_buf1 Uniform
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_5 = OpConstant %uint 5
%_arr_int_uint_5 = OpTypeArray %int %uint_5
%buf0 = OpTypeStruct %_arr_int_uint_5
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_10 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%16 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %16
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %16
%void = OpTypeVoid
%S = OpTypeStruct %int
%_ptr_Function_S = OpTypePointer Function %S
%19 = OpTypeFunction %void %_ptr_Function_S
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%uint_1 = OpConstant %uint 1
%bool = OpTypeBool
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%_ptr_Function_int = OpTypePointer Function %int
%44 = OpTypeFunction %void
%48 = OpConstantNull %int
%uint_3 = OpConstant %uint 3
%_arr_S_uint_3 = OpTypeArray %S %uint_3
%_ptr_Function__arr_S_uint_3 = OpTypePointer Function %_arr_S_uint_3
%53 = OpConstantNull %_arr_S_uint_3
%56 = OpConstantNull %S
%_ptr_Function_bool = OpTypePointer Function %bool
%60 = OpConstantNull %bool
%int_2 = OpConstant %int 2
%int_1 = OpConstant %int 1
%int_3 = OpConstant %int 3
%int_4 = OpConstant %int 4
%main_out = OpTypeStruct %v4float
%196 = OpTypeFunction %void %main_out
%func_struct_S_i11_ = OpFunction %void None %19
%s = OpFunctionParameter %_ptr_Function_S
%25 = OpLabel
%28 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_0
%29 = OpLoad %float %28
%31 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_1
%32 = OpLoad %float %31
%33 = OpFOrdGreaterThan %bool %29 %32
OpSelectionMerge %35 None
OpBranchConditional %33 %36 %35
%36 = OpLabel
OpReturn
%35 = OpLabel
%39 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%40 = OpLoad %int %39
%43 = OpAccessChain %_ptr_Function_int %s %uint_0
OpStore %43 %40
OpReturn
OpFunctionEnd
%main_1 = OpFunction %void None %44
%46 = OpLabel
%i = OpVariable %_ptr_Function_int Function %48
%arr = OpVariable %_ptr_Function__arr_S_uint_3 Function %53
%i_1 = OpVariable %_ptr_Function_int Function %48
%param = OpVariable %_ptr_Function_S Function %56
%j = OpVariable %_ptr_Function_int Function %48
%x_132 = OpVariable %_ptr_Function_bool Function %60
%x_142 = OpVariable %_ptr_Function_bool Function %60
%x_133_phi = OpVariable %_ptr_Function_bool Function %60
%x_143_phi = OpVariable %_ptr_Function_bool Function %60
%65 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%66 = OpLoad %int %65
OpStore %i %66
OpBranch %67
%67 = OpLabel
OpLoopMerge %68 %69 None
OpBranch %70
%70 = OpLabel
%71 = OpLoad %int %i
%72 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%73 = OpLoad %int %72
%74 = OpSLessThan %bool %71 %73
OpSelectionMerge %75 None
OpBranchConditional %74 %76 %77
%76 = OpLabel
OpBranch %75
%77 = OpLabel
OpBranch %68
%75 = OpLabel
%78 = OpLoad %int %i
%79 = OpLoad %int %i
%80 = OpAccessChain %_ptr_Function_int %arr %78 %uint_0
OpStore %80 %79
OpBranch %69
%69 = OpLabel
%81 = OpLoad %int %i
%83 = OpIAdd %int %81 %int_1
OpStore %i %83
OpBranch %67
%68 = OpLabel
%84 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%85 = OpLoad %int %84
OpStore %i_1 %85
OpBranch %86
%86 = OpLabel
OpLoopMerge %87 %88 None
OpBranch %89
%89 = OpLabel
%90 = OpLoad %int %i_1
%91 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%92 = OpLoad %int %91
%93 = OpSLessThan %bool %90 %92
OpSelectionMerge %94 None
OpBranchConditional %93 %95 %96
%95 = OpLabel
OpBranch %94
%96 = OpLabel
OpBranch %87
%94 = OpLabel
%97 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_0
%98 = OpLoad %float %97
%99 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_1
%100 = OpLoad %float %99
%101 = OpFOrdGreaterThan %bool %98 %100
OpSelectionMerge %102 None
OpBranchConditional %101 %103 %102
%103 = OpLabel
OpBranch %87
%102 = OpLabel
%104 = OpLoad %int %i_1
%105 = OpAccessChain %_ptr_Function_int %arr %104 %uint_0
%106 = OpLoad %int %105
%108 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%109 = OpLoad %int %108
%110 = OpIEqual %bool %106 %109
OpSelectionMerge %111 None
OpBranchConditional %110 %112 %113
%112 = OpLabel
%114 = OpLoad %int %i_1
%115 = OpAccessChain %_ptr_Function_S %arr %114
%116 = OpLoad %S %115
OpStore %param %116
%117 = OpFunctionCall %void %func_struct_S_i11_ %param
%119 = OpLoad %S %param
%120 = OpAccessChain %_ptr_Function_S %arr %114
OpStore %120 %119
OpBranch %111
%113 = OpLabel
%121 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%122 = OpLoad %int %121
OpStore %j %122
OpBranch %123
%123 = OpLabel
OpLoopMerge %124 %125 None
OpBranch %126
%126 = OpLabel
%127 = OpLoad %int %j
%128 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%129 = OpLoad %int %128
%130 = OpSLessThan %bool %127 %129
OpSelectionMerge %131 None
OpBranchConditional %130 %132 %133
%132 = OpLabel
OpBranch %131
%133 = OpLabel
OpBranch %124
%131 = OpLabel
%134 = OpLoad %int %j
%135 = OpAccessChain %_ptr_Function_int %arr %134 %uint_0
%136 = OpLoad %int %135
%138 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_4
%139 = OpLoad %int %138
%140 = OpSGreaterThan %bool %136 %139
OpSelectionMerge %141 None
OpBranchConditional %140 %142 %141
%142 = OpLabel
OpKill
%141 = OpLabel
OpBranch %125
%125 = OpLabel
%143 = OpLoad %int %j
%144 = OpIAdd %int %143 %int_1
OpStore %j %144
OpBranch %123
%124 = OpLabel
OpBranch %111
%111 = OpLabel
OpBranch %88
%88 = OpLabel
%145 = OpLoad %int %i_1
%146 = OpIAdd %int %145 %int_1
OpStore %i_1 %146
OpBranch %86
%87 = OpLabel
%147 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%148 = OpLoad %int %147
%149 = OpAccessChain %_ptr_Function_int %arr %148 %uint_0
%150 = OpLoad %int %149
%151 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%152 = OpLoad %int %151
%153 = OpIEqual %bool %150 %152
OpStore %x_133_phi %153
OpSelectionMerge %154 None
OpBranchConditional %153 %155 %154
%155 = OpLabel
%156 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%157 = OpLoad %int %156
%158 = OpAccessChain %_ptr_Function_int %arr %157 %uint_0
%159 = OpLoad %int %158
%160 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%161 = OpLoad %int %160
%162 = OpIEqual %bool %159 %161
OpStore %x_132 %162
%163 = OpLoad %bool %x_132
OpStore %x_133_phi %163
OpBranch %154
%154 = OpLabel
%164 = OpLoad %bool %x_133_phi
OpStore %x_143_phi %164
OpSelectionMerge %165 None
OpBranchConditional %164 %166 %165
%166 = OpLabel
%167 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%168 = OpLoad %int %167
%169 = OpAccessChain %_ptr_Function_int %arr %168 %uint_0
%170 = OpLoad %int %169
%171 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%172 = OpLoad %int %171
%173 = OpIEqual %bool %170 %172
OpStore %x_142 %173
%174 = OpLoad %bool %x_142
OpStore %x_143_phi %174
OpBranch %165
%165 = OpLabel
%175 = OpLoad %bool %x_143_phi
OpSelectionMerge %176 None
OpBranchConditional %175 %177 %178
%177 = OpLabel
%179 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%180 = OpLoad %int %179
%181 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%182 = OpLoad %int %181
%183 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%184 = OpLoad %int %183
%185 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%186 = OpLoad %int %185
%187 = OpConvertSToF %float %180
%188 = OpConvertSToF %float %182
%189 = OpConvertSToF %float %184
%190 = OpConvertSToF %float %186
%191 = OpCompositeConstruct %v4float %187 %188 %189 %190
OpStore %x_GLF_color %191
OpBranch %176
%178 = OpLabel
%192 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%193 = OpLoad %int %192
%194 = OpConvertSToF %float %193
%195 = OpCompositeConstruct %v4float %194 %194 %194 %194
OpStore %x_GLF_color %195
OpBranch %176
%176 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %196
%tint_symbol = OpFunctionParameter %main_out
%200 = OpLabel
%201 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %201
OpReturn
OpFunctionEnd
%main = OpFunction %void None %44
%203 = OpLabel
%204 = OpFunctionCall %void %main_1
%206 = OpLoad %v4float %x_GLF_color
%207 = OpCompositeConstruct %main_out %206
%205 = OpFunctionCall %void %tint_symbol_2 %207
OpReturn
OpFunctionEnd