blob: f7073897552488af610f6e0b661838c082eab6ab [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 218
; Schema: 0
OpCapability Shader
%123 = OpExtInstImport "GLSL.std.450"
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_136 "x_136"
OpName %x_146 "x_146"
OpName %x_137_phi "x_137_phi"
OpName %x_147_phi "x_147_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
%49 = OpTypeFunction %void
%53 = 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
%58 = OpConstantNull %_arr_S_uint_3
%61 = OpConstantNull %S
%_ptr_Function_bool = OpTypePointer Function %bool
%65 = 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
%206 = OpTypeFunction %void %main_out
%func_struct_S_i11_ = OpFunction %void None %19
%s = OpFunctionParameter %_ptr_Function_S
%25 = OpLabel
OpBranch %26
%26 = OpLabel
OpLoopMerge %27 %28 None
OpBranch %29
%29 = OpLabel
%32 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_0
%33 = OpLoad %float %32
%35 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_1
%36 = OpLoad %float %35
%37 = OpFOrdGreaterThan %bool %33 %36
OpSelectionMerge %39 None
OpBranchConditional %37 %40 %41
%40 = OpLabel
OpBranch %39
%41 = OpLabel
OpBranch %27
%39 = OpLabel
OpReturn
%28 = OpLabel
OpBranch %26
%27 = OpLabel
%44 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%45 = OpLoad %int %44
%48 = OpAccessChain %_ptr_Function_int %s %uint_0
OpStore %48 %45
OpReturn
OpFunctionEnd
%main_1 = OpFunction %void None %49
%51 = OpLabel
%i = OpVariable %_ptr_Function_int Function %53
%arr = OpVariable %_ptr_Function__arr_S_uint_3 Function %58
%i_1 = OpVariable %_ptr_Function_int Function %53
%param = OpVariable %_ptr_Function_S Function %61
%j = OpVariable %_ptr_Function_int Function %53
%x_136 = OpVariable %_ptr_Function_bool Function %65
%x_146 = OpVariable %_ptr_Function_bool Function %65
%x_137_phi = OpVariable %_ptr_Function_bool Function %65
%x_147_phi = OpVariable %_ptr_Function_bool Function %65
%70 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%71 = OpLoad %int %70
OpStore %i %71
OpBranch %72
%72 = OpLabel
OpLoopMerge %73 %74 None
OpBranch %75
%75 = OpLabel
%76 = OpLoad %int %i
%78 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%79 = OpLoad %int %78
%80 = OpSLessThan %bool %76 %79
OpSelectionMerge %81 None
OpBranchConditional %80 %82 %83
%82 = OpLabel
OpBranch %81
%83 = OpLabel
OpBranch %73
%81 = OpLabel
%84 = OpLoad %int %i
%85 = OpLoad %int %i
%86 = OpAccessChain %_ptr_Function_int %arr %84 %uint_0
OpStore %86 %85
OpBranch %74
%74 = OpLabel
%87 = OpLoad %int %i
%88 = OpIAdd %int %87 %int_1
OpStore %i %88
OpBranch %72
%73 = OpLabel
%89 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%90 = OpLoad %int %89
OpStore %i_1 %90
OpBranch %91
%91 = OpLabel
OpLoopMerge %92 %93 None
OpBranch %94
%94 = OpLabel
%95 = OpLoad %int %i_1
%96 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%97 = OpLoad %int %96
%98 = OpSLessThan %bool %95 %97
OpSelectionMerge %99 None
OpBranchConditional %98 %100 %101
%100 = OpLabel
OpBranch %99
%101 = OpLabel
OpBranch %92
%99 = OpLabel
%102 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_0
%103 = OpLoad %float %102
%104 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_1
%105 = OpLoad %float %104
%106 = OpFOrdGreaterThan %bool %103 %105
OpSelectionMerge %107 None
OpBranchConditional %106 %108 %107
%108 = OpLabel
OpBranch %92
%107 = OpLabel
%109 = OpLoad %int %i_1
%110 = OpAccessChain %_ptr_Function_int %arr %109 %uint_0
%111 = OpLoad %int %110
%112 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%113 = OpLoad %int %112
%114 = OpIEqual %bool %111 %113
OpSelectionMerge %115 None
OpBranchConditional %114 %116 %117
%116 = OpLabel
%118 = OpLoad %int %i_1
%120 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%121 = OpLoad %int %120
%122 = OpExtInst %int %123 SClamp %118 %int_0 %int_3
%124 = OpAccessChain %_ptr_Function_int %arr %122 %uint_0
OpStore %124 %121
%125 = OpAccessChain %_ptr_Function_S %arr %int_2
%126 = OpLoad %S %125
OpStore %param %126
%127 = OpFunctionCall %void %func_struct_S_i11_ %param
%129 = OpLoad %S %param
%130 = OpAccessChain %_ptr_Function_S %arr %int_2
OpStore %130 %129
OpBranch %115
%117 = OpLabel
%131 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%132 = OpLoad %int %131
OpStore %j %132
OpBranch %133
%133 = OpLabel
OpLoopMerge %134 %135 None
OpBranch %136
%136 = OpLabel
%137 = OpLoad %int %j
%138 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%139 = OpLoad %int %138
%140 = OpSLessThan %bool %137 %139
OpSelectionMerge %141 None
OpBranchConditional %140 %142 %143
%142 = OpLabel
OpBranch %141
%143 = OpLabel
OpBranch %134
%141 = OpLabel
%144 = OpLoad %int %j
%145 = OpAccessChain %_ptr_Function_int %arr %144 %uint_0
%146 = OpLoad %int %145
%148 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_4
%149 = OpLoad %int %148
%150 = OpSGreaterThan %bool %146 %149
OpSelectionMerge %151 None
OpBranchConditional %150 %152 %151
%152 = OpLabel
OpKill
%151 = OpLabel
OpBranch %135
%135 = OpLabel
%153 = OpLoad %int %j
%154 = OpIAdd %int %153 %int_1
OpStore %j %154
OpBranch %133
%134 = OpLabel
OpBranch %115
%115 = OpLabel
OpBranch %93
%93 = OpLabel
%155 = OpLoad %int %i_1
%156 = OpIAdd %int %155 %int_1
OpStore %i_1 %156
OpBranch %91
%92 = OpLabel
%157 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%158 = OpLoad %int %157
%159 = OpAccessChain %_ptr_Function_int %arr %158 %uint_0
%160 = OpLoad %int %159
%161 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%162 = OpLoad %int %161
%163 = OpIEqual %bool %160 %162
OpStore %x_137_phi %163
OpSelectionMerge %164 None
OpBranchConditional %163 %165 %164
%165 = OpLabel
%166 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%167 = OpLoad %int %166
%168 = OpAccessChain %_ptr_Function_int %arr %167 %uint_0
%169 = OpLoad %int %168
%170 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%171 = OpLoad %int %170
%172 = OpIEqual %bool %169 %171
OpStore %x_136 %172
%173 = OpLoad %bool %x_136
OpStore %x_137_phi %173
OpBranch %164
%164 = OpLabel
%174 = OpLoad %bool %x_137_phi
OpStore %x_147_phi %174
OpSelectionMerge %175 None
OpBranchConditional %174 %176 %175
%176 = OpLabel
%177 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%178 = OpLoad %int %177
%179 = OpAccessChain %_ptr_Function_int %arr %178 %uint_0
%180 = OpLoad %int %179
%181 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%182 = OpLoad %int %181
%183 = OpIEqual %bool %180 %182
OpStore %x_146 %183
%184 = OpLoad %bool %x_146
OpStore %x_147_phi %184
OpBranch %175
%175 = OpLabel
%185 = OpLoad %bool %x_147_phi
OpSelectionMerge %186 None
OpBranchConditional %185 %187 %188
%187 = OpLabel
%189 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%190 = OpLoad %int %189
%191 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%192 = OpLoad %int %191
%193 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%194 = OpLoad %int %193
%195 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%196 = OpLoad %int %195
%197 = OpConvertSToF %float %190
%198 = OpConvertSToF %float %192
%199 = OpConvertSToF %float %194
%200 = OpConvertSToF %float %196
%201 = OpCompositeConstruct %v4float %197 %198 %199 %200
OpStore %x_GLF_color %201
OpBranch %186
%188 = OpLabel
%202 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%203 = OpLoad %int %202
%204 = OpConvertSToF %float %203
%205 = OpCompositeConstruct %v4float %204 %204 %204 %204
OpStore %x_GLF_color %205
OpBranch %186
%186 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %206
%tint_symbol = OpFunctionParameter %main_out
%210 = OpLabel
%211 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %211
OpReturn
OpFunctionEnd
%main = OpFunction %void None %49
%213 = OpLabel
%214 = OpFunctionCall %void %main_1
%216 = OpLoad %v4float %x_GLF_color
%217 = OpCompositeConstruct %main_out %216
%215 = OpFunctionCall %void %tint_symbol_2 %217
OpReturn
OpFunctionEnd