blob: f897e83062ef64a2e1e987655f01665986bb7ed6 [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 261
; Schema: 0
OpCapability Shader
OpCapability RuntimeDescriptorArray
OpCapability Sampled1D
OpCapability ImageQuery
OpExtension "SPV_EXT_descriptor_indexing"
%80 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %fs "fs"
OpExecutionMode %fs OriginUpperLeft
OpMemberName %tint_resource_table_metadata_struct_tint_explicit_layout 0 "array_length"
OpMemberName %tint_resource_table_metadata_struct_tint_explicit_layout 1 "bindings"
OpName %tint_resource_table_metadata_struct_tint_explicit_layout "tint_resource_table_metadata_struct_tint_explicit_layout"
OpName %tint_resource_table_metadata "tint_resource_table_metadata"
OpName %fs "fs"
OpName %tint_storage_metadata_length "tint_storage_metadata_length"
OpName %tint_storage_metadata_length_0 "tint_storage_metadata_length"
OpName %tint_storage_metadata_length_1 "tint_storage_metadata_length"
OpName %t1d "t1d"
OpName %tint_storage_metadata_length_2 "tint_storage_metadata_length"
OpName %tint_storage_metadata_length_3 "tint_storage_metadata_length"
OpName %tint_storage_metadata_length_4 "tint_storage_metadata_length"
OpName %t2d "t2d"
OpName %tint_storage_metadata_length_5 "tint_storage_metadata_length"
OpName %tint_storage_metadata_length_6 "tint_storage_metadata_length"
OpName %tint_storage_metadata_length_7 "tint_storage_metadata_length"
OpName %tcube "tcube"
OpDecorate %1 DescriptorSet 43
OpDecorate %1 Binding 51
OpDecorate %6 DescriptorSet 43
OpDecorate %6 Binding 51
OpDecorate %11 DescriptorSet 43
OpDecorate %11 Binding 51
OpMemberDecorate %tint_resource_table_metadata_struct_tint_explicit_layout 0 Offset 0
OpDecorate %_runtimearr_uint ArrayStride 4
OpMemberDecorate %tint_resource_table_metadata_struct_tint_explicit_layout 1 Offset 4
OpDecorate %tint_resource_table_metadata_struct_tint_explicit_layout Block
OpDecorate %tint_resource_table_metadata DescriptorSet 42
OpDecorate %tint_resource_table_metadata Binding 52
OpDecorate %tint_resource_table_metadata NonWritable
%float = OpTypeFloat 32
%4 = OpTypeImage %float 1D 0 0 0 1 Unknown
%_runtimearr_4 = OpTypeRuntimeArray %4
%_ptr_UniformConstant__runtimearr_4 = OpTypePointer UniformConstant %_runtimearr_4
%1 = OpVariable %_ptr_UniformConstant__runtimearr_4 UniformConstant
%int = OpTypeInt 32 1
%9 = OpTypeImage %int 2D 0 0 0 1 Unknown
%_runtimearr_9 = OpTypeRuntimeArray %9
%_ptr_UniformConstant__runtimearr_9 = OpTypePointer UniformConstant %_runtimearr_9
%6 = OpVariable %_ptr_UniformConstant__runtimearr_9 UniformConstant
%uint = OpTypeInt 32 0
%14 = OpTypeImage %uint 3D 0 0 0 1 Unknown
%_runtimearr_14 = OpTypeRuntimeArray %14
%_ptr_UniformConstant__runtimearr_14 = OpTypePointer UniformConstant %_runtimearr_14
%11 = OpVariable %_ptr_UniformConstant__runtimearr_14 UniformConstant
%_runtimearr_uint = OpTypeRuntimeArray %uint
%tint_resource_table_metadata_struct_tint_explicit_layout = OpTypeStruct %uint %_runtimearr_uint
%_ptr_StorageBuffer_tint_resource_table_metadata_struct_tint_explicit_layout = OpTypePointer StorageBuffer %tint_resource_table_metadata_struct_tint_explicit_layout
%tint_resource_table_metadata = OpVariable %_ptr_StorageBuffer_tint_resource_table_metadata_struct_tint_explicit_layout StorageBuffer
%void = OpTypeVoid
%22 = OpTypeFunction %void
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%uint_0 = OpConstant %uint 0
%bool = OpTypeBool
%false = OpConstantFalse %bool
%_ptr_UniformConstant_4 = OpTypePointer UniformConstant %4
%uint_1 = OpConstant %uint 1
%int_0 = OpConstant %int 0
%v4float = OpTypeVector %float 4
%int_1 = OpConstant %int 1
%_ptr_UniformConstant_9 = OpTypePointer UniformConstant %9
%v2uint = OpTypeVector %uint 2
%142 = OpConstantComposite %v2uint %uint_1 %uint_1
%v2int = OpTypeVector %int 2
%144 = OpConstantComposite %v2int %int_0 %int_1
%v4int = OpTypeVector %int 4
%int_2 = OpConstant %int 2
%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
%v3uint = OpTypeVector %uint 3
%204 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%v3int = OpTypeVector %int 3
%206 = OpConstantComposite %v3int %int_2 %int_1 %int_0
%v4uint = OpTypeVector %uint 4
%uint_2 = OpConstant %uint 2
%v2bool = OpTypeVector %bool 2
%uint_9 = OpConstant %uint 9
%uint_20 = OpConstant %uint 20
%uint_3 = OpConstant %uint 3
%fs = OpFunction %void None %22
%23 = OpLabel
%tint_storage_metadata_length = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%27 = OpLoad %uint %tint_storage_metadata_length None
%28 = OpULessThan %bool %uint_0 %27
OpSelectionMerge %30 None
OpBranchConditional %28 %31 %32
%31 = OpLabel
%211 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_0
%212 = OpLoad %uint %211 None
%213 = OpCompositeConstruct %v2uint %212 %212
%214 = OpCompositeConstruct %v2uint %uint_1 %uint_2
%216 = OpIEqual %v2bool %213 %214
%34 = OpAny %bool %216
OpBranch %30
%32 = OpLabel
OpBranch %30
%30 = OpLabel
%33 = OpPhi %bool %34 %31 %false %32
OpSelectionMerge %36 None
OpBranchConditional %33 %37 %38
%37 = OpLabel
OpBranch %36
%38 = OpLabel
%218 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%219 = OpLoad %uint %218 None
%40 = OpIAdd %uint %uint_0 %219
OpBranch %36
%36 = OpLabel
%39 = OpPhi %uint %uint_0 %37 %40 %38
%41 = OpAccessChain %_ptr_UniformConstant_4 %1 %39
%43 = OpLoad %4 %41 None
%tint_storage_metadata_length_0 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%45 = OpLoad %uint %tint_storage_metadata_length_0 None
%46 = OpULessThan %bool %uint_0 %45
OpSelectionMerge %47 None
OpBranchConditional %46 %48 %49
%48 = OpLabel
%220 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_0
%221 = OpLoad %uint %220 None
%222 = OpCompositeConstruct %v2uint %221 %221
%223 = OpCompositeConstruct %v2uint %uint_1 %uint_2
%224 = OpIEqual %v2bool %222 %223
%51 = OpAny %bool %224
OpBranch %47
%49 = OpLabel
OpBranch %47
%47 = OpLabel
%50 = OpPhi %bool %51 %48 %false %49
OpSelectionMerge %52 None
OpBranchConditional %50 %53 %54
%53 = OpLabel
OpBranch %52
%54 = OpLabel
%225 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%226 = OpLoad %uint %225 None
%56 = OpIAdd %uint %uint_0 %226
OpBranch %52
%52 = OpLabel
%55 = OpPhi %uint %uint_0 %53 %56 %54
%57 = OpAccessChain %_ptr_UniformConstant_4 %1 %55
%58 = OpLoad %4 %57 None
%tint_storage_metadata_length_1 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%60 = OpLoad %uint %tint_storage_metadata_length_1 None
%61 = OpULessThan %bool %uint_0 %60
OpSelectionMerge %62 None
OpBranchConditional %61 %63 %64
%63 = OpLabel
%227 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_0
%228 = OpLoad %uint %227 None
%229 = OpCompositeConstruct %v2uint %228 %228
%230 = OpCompositeConstruct %v2uint %uint_1 %uint_2
%231 = OpIEqual %v2bool %229 %230
%66 = OpAny %bool %231
OpBranch %62
%64 = OpLabel
OpBranch %62
%62 = OpLabel
%65 = OpPhi %bool %66 %63 %false %64
OpSelectionMerge %67 None
OpBranchConditional %65 %68 %69
%68 = OpLabel
OpBranch %67
%69 = OpLabel
%232 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%233 = OpLoad %uint %232 None
%71 = OpIAdd %uint %uint_0 %233
OpBranch %67
%67 = OpLabel
%70 = OpPhi %uint %uint_0 %68 %71 %69
%72 = OpAccessChain %_ptr_UniformConstant_4 %1 %70
%73 = OpLoad %4 %72 None
%74 = OpImageQueryLevels %uint %58
%75 = OpISub %uint %74 %uint_1
%77 = OpBitcast %uint %int_0
%79 = OpExtInst %uint %80 UMin %77 %75
%81 = OpImageQuerySizeLod %uint %73 %79
%82 = OpISub %uint %81 %uint_1
%83 = OpBitcast %uint %int_0
%84 = OpExtInst %uint %80 UMin %83 %82
%t1d = OpImageFetch %v4float %43 %84 Lod %79
%87 = OpBitcast %uint %int_1
%tint_storage_metadata_length_2 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%90 = OpLoad %uint %tint_storage_metadata_length_2 None
%91 = OpULessThan %bool %87 %90
OpSelectionMerge %92 None
OpBranchConditional %91 %93 %94
%93 = OpLabel
%234 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %87
%235 = OpLoad %uint %234 None
%96 = OpIEqual %bool %235 %uint_9
OpBranch %92
%94 = OpLabel
OpBranch %92
%92 = OpLabel
%95 = OpPhi %bool %96 %93 %false %94
OpSelectionMerge %97 None
OpBranchConditional %95 %98 %99
%98 = OpLabel
OpBranch %97
%99 = OpLabel
%237 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%238 = OpLoad %uint %237 None
%101 = OpIAdd %uint %uint_2 %238
OpBranch %97
%97 = OpLabel
%100 = OpPhi %uint %87 %98 %101 %99
%102 = OpAccessChain %_ptr_UniformConstant_9 %6 %100
%104 = OpLoad %9 %102 None
%tint_storage_metadata_length_3 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%106 = OpLoad %uint %tint_storage_metadata_length_3 None
%107 = OpULessThan %bool %87 %106
OpSelectionMerge %108 None
OpBranchConditional %107 %109 %110
%109 = OpLabel
%239 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %87
%240 = OpLoad %uint %239 None
%112 = OpIEqual %bool %240 %uint_9
OpBranch %108
%110 = OpLabel
OpBranch %108
%108 = OpLabel
%111 = OpPhi %bool %112 %109 %false %110
OpSelectionMerge %113 None
OpBranchConditional %111 %114 %115
%114 = OpLabel
OpBranch %113
%115 = OpLabel
%241 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%242 = OpLoad %uint %241 None
%117 = OpIAdd %uint %uint_2 %242
OpBranch %113
%113 = OpLabel
%116 = OpPhi %uint %87 %114 %117 %115
%118 = OpAccessChain %_ptr_UniformConstant_9 %6 %116
%119 = OpLoad %9 %118 None
%tint_storage_metadata_length_4 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%121 = OpLoad %uint %tint_storage_metadata_length_4 None
%122 = OpULessThan %bool %87 %121
OpSelectionMerge %123 None
OpBranchConditional %122 %124 %125
%124 = OpLabel
%243 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %87
%244 = OpLoad %uint %243 None
%127 = OpIEqual %bool %244 %uint_9
OpBranch %123
%125 = OpLabel
OpBranch %123
%123 = OpLabel
%126 = OpPhi %bool %127 %124 %false %125
OpSelectionMerge %128 None
OpBranchConditional %126 %129 %130
%129 = OpLabel
OpBranch %128
%130 = OpLabel
%245 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%246 = OpLoad %uint %245 None
%132 = OpIAdd %uint %uint_2 %246
OpBranch %128
%128 = OpLabel
%131 = OpPhi %uint %87 %129 %132 %130
%133 = OpAccessChain %_ptr_UniformConstant_9 %6 %131
%134 = OpLoad %9 %133 None
%135 = OpImageQueryLevels %uint %119
%136 = OpISub %uint %135 %uint_1
%137 = OpBitcast %uint %int_0
%138 = OpExtInst %uint %80 UMin %137 %136
%139 = OpImageQuerySizeLod %v2uint %134 %138
%141 = OpISub %v2uint %139 %142
%143 = OpBitcast %v2uint %144
%146 = OpExtInst %v2uint %80 UMin %143 %141
%t2d = OpImageFetch %v4int %104 %146 Lod %138
%149 = OpBitcast %uint %int_2
%tint_storage_metadata_length_5 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%152 = OpLoad %uint %tint_storage_metadata_length_5 None
%153 = OpULessThan %bool %149 %152
OpSelectionMerge %154 None
OpBranchConditional %153 %155 %156
%155 = OpLabel
%247 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %149
%248 = OpLoad %uint %247 None
%158 = OpIEqual %bool %248 %uint_20
OpBranch %154
%156 = OpLabel
OpBranch %154
%154 = OpLabel
%157 = OpPhi %bool %158 %155 %false %156
OpSelectionMerge %159 None
OpBranchConditional %157 %160 %161
%160 = OpLabel
OpBranch %159
%161 = OpLabel
%250 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%251 = OpLoad %uint %250 None
%163 = OpIAdd %uint %uint_3 %251
OpBranch %159
%159 = OpLabel
%162 = OpPhi %uint %149 %160 %163 %161
%164 = OpAccessChain %_ptr_UniformConstant_14 %11 %162
%166 = OpLoad %14 %164 None
%tint_storage_metadata_length_6 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%168 = OpLoad %uint %tint_storage_metadata_length_6 None
%169 = OpULessThan %bool %149 %168
OpSelectionMerge %170 None
OpBranchConditional %169 %171 %172
%171 = OpLabel
%253 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %149
%254 = OpLoad %uint %253 None
%174 = OpIEqual %bool %254 %uint_20
OpBranch %170
%172 = OpLabel
OpBranch %170
%170 = OpLabel
%173 = OpPhi %bool %174 %171 %false %172
OpSelectionMerge %175 None
OpBranchConditional %173 %176 %177
%176 = OpLabel
OpBranch %175
%177 = OpLabel
%255 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%256 = OpLoad %uint %255 None
%179 = OpIAdd %uint %uint_3 %256
OpBranch %175
%175 = OpLabel
%178 = OpPhi %uint %149 %176 %179 %177
%180 = OpAccessChain %_ptr_UniformConstant_14 %11 %178
%181 = OpLoad %14 %180 None
%tint_storage_metadata_length_7 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%183 = OpLoad %uint %tint_storage_metadata_length_7 None
%184 = OpULessThan %bool %149 %183
OpSelectionMerge %185 None
OpBranchConditional %184 %186 %187
%186 = OpLabel
%257 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %149
%258 = OpLoad %uint %257 None
%189 = OpIEqual %bool %258 %uint_20
OpBranch %185
%187 = OpLabel
OpBranch %185
%185 = OpLabel
%188 = OpPhi %bool %189 %186 %false %187
OpSelectionMerge %190 None
OpBranchConditional %188 %191 %192
%191 = OpLabel
OpBranch %190
%192 = OpLabel
%259 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0
%260 = OpLoad %uint %259 None
%194 = OpIAdd %uint %uint_3 %260
OpBranch %190
%190 = OpLabel
%193 = OpPhi %uint %149 %191 %194 %192
%195 = OpAccessChain %_ptr_UniformConstant_14 %11 %193
%196 = OpLoad %14 %195 None
%197 = OpImageQueryLevels %uint %181
%198 = OpISub %uint %197 %uint_1
%199 = OpBitcast %uint %int_0
%200 = OpExtInst %uint %80 UMin %199 %198
%201 = OpImageQuerySizeLod %v3uint %196 %200
%203 = OpISub %v3uint %201 %204
%205 = OpBitcast %v3uint %206
%208 = OpExtInst %v3uint %80 UMin %205 %203
%tcube = OpImageFetch %v4uint %166 %208 Lod %200
OpReturn
OpFunctionEnd