Files
wgpu/tests/out/spv/binding-arrays.spvasm
T
Jim Blandy 8b267218a4 Implement module compaction.
Add a new Naga feature, `"compact"`, which adds a new function
`naga::compact::compact`, which removes unused expressions, types, and
constants from a `Module`.
2023-09-20 18:46:33 +02:00

559 lines
16 KiB
Plaintext

; SPIR-V
; Version: 1.1
; Generator: rspirv
; Bound: 431
OpCapability Shader
OpCapability ImageQuery
OpCapability ShaderNonUniform
OpExtension "SPV_EXT_descriptor_indexing"
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %64 "main" %59 %62
OpExecutionMode %64 OriginUpperLeft
OpMemberDecorate %4 0 Offset 0
OpMemberDecorate %21 0 Offset 0
OpDecorate %24 DescriptorSet 0
OpDecorate %24 Binding 0
OpDecorate %28 DescriptorSet 0
OpDecorate %28 Binding 1
OpDecorate %30 DescriptorSet 0
OpDecorate %30 Binding 2
OpDecorate %32 DescriptorSet 0
OpDecorate %32 Binding 3
OpDecorate %34 DescriptorSet 0
OpDecorate %34 Binding 4
OpDecorate %36 DescriptorSet 0
OpDecorate %36 Binding 5
OpDecorate %38 DescriptorSet 0
OpDecorate %38 Binding 6
OpDecorate %40 DescriptorSet 0
OpDecorate %40 Binding 7
OpDecorate %42 DescriptorSet 0
OpDecorate %42 Binding 8
OpDecorate %43 Block
OpMemberDecorate %43 0 Offset 0
OpDecorate %59 Location 0
OpDecorate %59 Flat
OpDecorate %62 Location 0
OpDecorate %95 NonUniform
OpDecorate %118 NonUniform
OpDecorate %120 NonUniform
OpDecorate %145 NonUniform
OpDecorate %147 NonUniform
OpDecorate %183 NonUniform
OpDecorate %211 NonUniform
OpDecorate %227 NonUniform
OpDecorate %243 NonUniform
OpDecorate %264 NonUniform
OpDecorate %266 NonUniform
OpDecorate %288 NonUniform
OpDecorate %290 NonUniform
OpDecorate %312 NonUniform
OpDecorate %314 NonUniform
OpDecorate %336 NonUniform
OpDecorate %338 NonUniform
OpDecorate %360 NonUniform
OpDecorate %362 NonUniform
OpDecorate %384 NonUniform
OpDecorate %386 NonUniform
OpDecorate %409 NonUniform
%2 = OpTypeVoid
%3 = OpTypeInt 32 0
%4 = OpTypeStruct %3
%6 = OpTypeFloat 32
%5 = OpTypeImage %6 2D 0 0 0 1 Unknown
%7 = OpTypeRuntimeArray %5
%9 = OpConstant %3 5
%8 = OpTypeArray %5 %9
%10 = OpTypeImage %6 2D 0 1 0 1 Unknown
%11 = OpTypeArray %10 %9
%12 = OpTypeImage %6 2D 0 0 1 1 Unknown
%13 = OpTypeArray %12 %9
%14 = OpTypeImage %6 2D 1 0 0 1 Unknown
%15 = OpTypeArray %14 %9
%16 = OpTypeImage %6 2D 0 0 0 2 Rgba32f
%17 = OpTypeArray %16 %9
%18 = OpTypeSampler
%19 = OpTypeArray %18 %9
%20 = OpTypeArray %18 %9
%21 = OpTypeStruct %3
%22 = OpTypeVector %6 4
%23 = OpTypeVector %3 2
%27 = OpConstant %3 10
%26 = OpTypeArray %5 %27
%25 = OpTypePointer UniformConstant %26
%24 = OpVariable %25 UniformConstant
%29 = OpTypePointer UniformConstant %8
%28 = OpVariable %29 UniformConstant
%31 = OpTypePointer UniformConstant %11
%30 = OpVariable %31 UniformConstant
%33 = OpTypePointer UniformConstant %13
%32 = OpVariable %33 UniformConstant
%35 = OpTypePointer UniformConstant %15
%34 = OpVariable %35 UniformConstant
%37 = OpTypePointer UniformConstant %17
%36 = OpVariable %37 UniformConstant
%39 = OpTypePointer UniformConstant %19
%38 = OpVariable %39 UniformConstant
%41 = OpTypePointer UniformConstant %20
%40 = OpVariable %41 UniformConstant
%43 = OpTypeStruct %4
%44 = OpTypePointer Uniform %43
%42 = OpVariable %44 Uniform
%46 = OpTypePointer Function %3
%47 = OpConstantNull %3
%49 = OpTypePointer Function %23
%50 = OpConstantNull %23
%52 = OpTypePointer Function %6
%53 = OpConstantNull %6
%55 = OpTypePointer Function %22
%56 = OpConstantNull %22
%60 = OpTypePointer Input %3
%59 = OpVariable %60 Input
%63 = OpTypePointer Output %22
%62 = OpVariable %63 Output
%65 = OpTypeFunction %2
%66 = OpTypePointer Uniform %4
%67 = OpConstant %3 0
%69 = OpConstant %6 0.0
%70 = OpTypeInt 32 1
%71 = OpConstant %70 0
%73 = OpTypePointer Uniform %3
%79 = OpTypeVector %6 2
%81 = OpTypeVector %70 2
%83 = OpTypePointer UniformConstant %5
%101 = OpTypePointer UniformConstant %18
%104 = OpTypeSampledImage %5
%125 = OpTypePointer UniformConstant %14
%128 = OpTypePointer UniformConstant %18
%131 = OpTypeSampledImage %14
%154 = OpTypeBool
%160 = OpTypeVector %154 2
%196 = OpTypePointer UniformConstant %10
%199 = OpTypeVector %3 3
%231 = OpTypePointer UniformConstant %12
%391 = OpTypePointer UniformConstant %16
%64 = OpFunction %2 None %65
%57 = OpLabel
%48 = OpVariable %49 Function %50
%54 = OpVariable %55 Function %56
%45 = OpVariable %46 Function %47
%51 = OpVariable %52 Function %53
%61 = OpLoad %3 %59
%58 = OpCompositeConstruct %21 %61
%68 = OpAccessChain %66 %42 %67
OpBranch %72
%72 = OpLabel
%74 = OpAccessChain %73 %68 %67
%75 = OpLoad %3 %74
%76 = OpCompositeExtract %3 %58 0
OpStore %45 %67
%77 = OpCompositeConstruct %23 %67 %67
OpStore %48 %77
OpStore %51 %69
%78 = OpCompositeConstruct %22 %69 %69 %69 %69
OpStore %54 %78
%80 = OpCompositeConstruct %79 %69 %69
%82 = OpCompositeConstruct %81 %71 %71
%84 = OpAccessChain %83 %24 %67
%85 = OpLoad %5 %84
%86 = OpImageQuerySizeLod %23 %85 %67
%87 = OpLoad %23 %48
%88 = OpIAdd %23 %87 %86
OpStore %48 %88
%89 = OpAccessChain %83 %24 %75
%90 = OpLoad %5 %89
%91 = OpImageQuerySizeLod %23 %90 %67
%92 = OpLoad %23 %48
%93 = OpIAdd %23 %92 %91
OpStore %48 %93
%94 = OpAccessChain %83 %24 %76
%95 = OpLoad %5 %94
%96 = OpImageQuerySizeLod %23 %95 %67
%97 = OpLoad %23 %48
%98 = OpIAdd %23 %97 %96
OpStore %48 %98
%99 = OpAccessChain %83 %28 %67
%100 = OpLoad %5 %99
%102 = OpAccessChain %101 %38 %67
%103 = OpLoad %18 %102
%105 = OpSampledImage %104 %100 %103
%106 = OpImageGather %22 %105 %80 %67
%107 = OpLoad %22 %54
%108 = OpFAdd %22 %107 %106
OpStore %54 %108
%109 = OpAccessChain %83 %28 %75
%110 = OpLoad %5 %109
%111 = OpAccessChain %101 %38 %75
%112 = OpLoad %18 %111
%113 = OpSampledImage %104 %110 %112
%114 = OpImageGather %22 %113 %80 %67
%115 = OpLoad %22 %54
%116 = OpFAdd %22 %115 %114
OpStore %54 %116
%117 = OpAccessChain %83 %28 %76
%118 = OpLoad %5 %117
%119 = OpAccessChain %101 %38 %76
%120 = OpLoad %18 %119
%121 = OpSampledImage %104 %118 %120
%122 = OpImageGather %22 %121 %80 %67
%123 = OpLoad %22 %54
%124 = OpFAdd %22 %123 %122
OpStore %54 %124
%126 = OpAccessChain %125 %34 %67
%127 = OpLoad %14 %126
%129 = OpAccessChain %128 %40 %67
%130 = OpLoad %18 %129
%132 = OpSampledImage %131 %127 %130
%133 = OpImageDrefGather %22 %132 %80 %69
%134 = OpLoad %22 %54
%135 = OpFAdd %22 %134 %133
OpStore %54 %135
%136 = OpAccessChain %125 %34 %75
%137 = OpLoad %14 %136
%138 = OpAccessChain %128 %40 %75
%139 = OpLoad %18 %138
%140 = OpSampledImage %131 %137 %139
%141 = OpImageDrefGather %22 %140 %80 %69
%142 = OpLoad %22 %54
%143 = OpFAdd %22 %142 %141
OpStore %54 %143
%144 = OpAccessChain %125 %34 %76
%145 = OpLoad %14 %144
%146 = OpAccessChain %128 %40 %76
%147 = OpLoad %18 %146
%148 = OpSampledImage %131 %145 %147
%149 = OpImageDrefGather %22 %148 %80 %69
%150 = OpLoad %22 %54
%151 = OpFAdd %22 %150 %149
OpStore %54 %151
%152 = OpAccessChain %83 %24 %67
%153 = OpLoad %5 %152
%155 = OpImageQueryLevels %70 %153
%156 = OpULessThan %154 %71 %155
OpSelectionMerge %157 None
OpBranchConditional %156 %158 %157
%158 = OpLabel
%159 = OpImageQuerySizeLod %81 %153 %71
%161 = OpULessThan %160 %82 %159
%162 = OpAll %154 %161
OpBranchConditional %162 %163 %157
%163 = OpLabel
%164 = OpImageFetch %22 %153 %82 Lod %71
OpBranch %157
%157 = OpLabel
%165 = OpPhi %22 %56 %72 %56 %158 %164 %163
%166 = OpLoad %22 %54
%167 = OpFAdd %22 %166 %165
OpStore %54 %167
%168 = OpAccessChain %83 %24 %75
%169 = OpLoad %5 %168
%170 = OpImageQueryLevels %70 %169
%171 = OpULessThan %154 %71 %170
OpSelectionMerge %172 None
OpBranchConditional %171 %173 %172
%173 = OpLabel
%174 = OpImageQuerySizeLod %81 %169 %71
%175 = OpULessThan %160 %82 %174
%176 = OpAll %154 %175
OpBranchConditional %176 %177 %172
%177 = OpLabel
%178 = OpImageFetch %22 %169 %82 Lod %71
OpBranch %172
%172 = OpLabel
%179 = OpPhi %22 %56 %157 %56 %173 %178 %177
%180 = OpLoad %22 %54
%181 = OpFAdd %22 %180 %179
OpStore %54 %181
%182 = OpAccessChain %83 %24 %76
%183 = OpLoad %5 %182
%184 = OpImageQueryLevels %70 %183
%185 = OpULessThan %154 %71 %184
OpSelectionMerge %186 None
OpBranchConditional %185 %187 %186
%187 = OpLabel
%188 = OpImageQuerySizeLod %81 %183 %71
%189 = OpULessThan %160 %82 %188
%190 = OpAll %154 %189
OpBranchConditional %190 %191 %186
%191 = OpLabel
%192 = OpImageFetch %22 %183 %82 Lod %71
OpBranch %186
%186 = OpLabel
%193 = OpPhi %22 %56 %172 %56 %187 %192 %191
%194 = OpLoad %22 %54
%195 = OpFAdd %22 %194 %193
OpStore %54 %195
%197 = OpAccessChain %196 %30 %67
%198 = OpLoad %10 %197
%200 = OpImageQuerySizeLod %199 %198 %67
%201 = OpCompositeExtract %3 %200 2
%202 = OpLoad %3 %45
%203 = OpIAdd %3 %202 %201
OpStore %45 %203
%204 = OpAccessChain %196 %30 %75
%205 = OpLoad %10 %204
%206 = OpImageQuerySizeLod %199 %205 %67
%207 = OpCompositeExtract %3 %206 2
%208 = OpLoad %3 %45
%209 = OpIAdd %3 %208 %207
OpStore %45 %209
%210 = OpAccessChain %196 %30 %76
%211 = OpLoad %10 %210
%212 = OpImageQuerySizeLod %199 %211 %67
%213 = OpCompositeExtract %3 %212 2
%214 = OpLoad %3 %45
%215 = OpIAdd %3 %214 %213
OpStore %45 %215
%216 = OpAccessChain %83 %28 %67
%217 = OpLoad %5 %216
%218 = OpImageQueryLevels %3 %217
%219 = OpLoad %3 %45
%220 = OpIAdd %3 %219 %218
OpStore %45 %220
%221 = OpAccessChain %83 %28 %75
%222 = OpLoad %5 %221
%223 = OpImageQueryLevels %3 %222
%224 = OpLoad %3 %45
%225 = OpIAdd %3 %224 %223
OpStore %45 %225
%226 = OpAccessChain %83 %28 %76
%227 = OpLoad %5 %226
%228 = OpImageQueryLevels %3 %227
%229 = OpLoad %3 %45
%230 = OpIAdd %3 %229 %228
OpStore %45 %230
%232 = OpAccessChain %231 %32 %67
%233 = OpLoad %12 %232
%234 = OpImageQuerySamples %3 %233
%235 = OpLoad %3 %45
%236 = OpIAdd %3 %235 %234
OpStore %45 %236
%237 = OpAccessChain %231 %32 %75
%238 = OpLoad %12 %237
%239 = OpImageQuerySamples %3 %238
%240 = OpLoad %3 %45
%241 = OpIAdd %3 %240 %239
OpStore %45 %241
%242 = OpAccessChain %231 %32 %76
%243 = OpLoad %12 %242
%244 = OpImageQuerySamples %3 %243
%245 = OpLoad %3 %45
%246 = OpIAdd %3 %245 %244
OpStore %45 %246
%247 = OpAccessChain %83 %28 %67
%248 = OpLoad %5 %247
%249 = OpAccessChain %101 %38 %67
%250 = OpLoad %18 %249
%251 = OpSampledImage %104 %248 %250
%252 = OpImageSampleImplicitLod %22 %251 %80
%253 = OpLoad %22 %54
%254 = OpFAdd %22 %253 %252
OpStore %54 %254
%255 = OpAccessChain %83 %28 %75
%256 = OpLoad %5 %255
%257 = OpAccessChain %101 %38 %75
%258 = OpLoad %18 %257
%259 = OpSampledImage %104 %256 %258
%260 = OpImageSampleImplicitLod %22 %259 %80
%261 = OpLoad %22 %54
%262 = OpFAdd %22 %261 %260
OpStore %54 %262
%263 = OpAccessChain %83 %28 %76
%264 = OpLoad %5 %263
%265 = OpAccessChain %101 %38 %76
%266 = OpLoad %18 %265
%267 = OpSampledImage %104 %264 %266
%268 = OpImageSampleImplicitLod %22 %267 %80
%269 = OpLoad %22 %54
%270 = OpFAdd %22 %269 %268
OpStore %54 %270
%271 = OpAccessChain %83 %28 %67
%272 = OpLoad %5 %271
%273 = OpAccessChain %101 %38 %67
%274 = OpLoad %18 %273
%275 = OpSampledImage %104 %272 %274
%276 = OpImageSampleImplicitLod %22 %275 %80 Bias %69
%277 = OpLoad %22 %54
%278 = OpFAdd %22 %277 %276
OpStore %54 %278
%279 = OpAccessChain %83 %28 %75
%280 = OpLoad %5 %279
%281 = OpAccessChain %101 %38 %75
%282 = OpLoad %18 %281
%283 = OpSampledImage %104 %280 %282
%284 = OpImageSampleImplicitLod %22 %283 %80 Bias %69
%285 = OpLoad %22 %54
%286 = OpFAdd %22 %285 %284
OpStore %54 %286
%287 = OpAccessChain %83 %28 %76
%288 = OpLoad %5 %287
%289 = OpAccessChain %101 %38 %76
%290 = OpLoad %18 %289
%291 = OpSampledImage %104 %288 %290
%292 = OpImageSampleImplicitLod %22 %291 %80 Bias %69
%293 = OpLoad %22 %54
%294 = OpFAdd %22 %293 %292
OpStore %54 %294
%295 = OpAccessChain %125 %34 %67
%296 = OpLoad %14 %295
%297 = OpAccessChain %128 %40 %67
%298 = OpLoad %18 %297
%299 = OpSampledImage %131 %296 %298
%300 = OpImageSampleDrefImplicitLod %6 %299 %80 %69
%301 = OpLoad %6 %51
%302 = OpFAdd %6 %301 %300
OpStore %51 %302
%303 = OpAccessChain %125 %34 %75
%304 = OpLoad %14 %303
%305 = OpAccessChain %128 %40 %75
%306 = OpLoad %18 %305
%307 = OpSampledImage %131 %304 %306
%308 = OpImageSampleDrefImplicitLod %6 %307 %80 %69
%309 = OpLoad %6 %51
%310 = OpFAdd %6 %309 %308
OpStore %51 %310
%311 = OpAccessChain %125 %34 %76
%312 = OpLoad %14 %311
%313 = OpAccessChain %128 %40 %76
%314 = OpLoad %18 %313
%315 = OpSampledImage %131 %312 %314
%316 = OpImageSampleDrefImplicitLod %6 %315 %80 %69
%317 = OpLoad %6 %51
%318 = OpFAdd %6 %317 %316
OpStore %51 %318
%319 = OpAccessChain %125 %34 %67
%320 = OpLoad %14 %319
%321 = OpAccessChain %128 %40 %67
%322 = OpLoad %18 %321
%323 = OpSampledImage %131 %320 %322
%324 = OpImageSampleDrefExplicitLod %6 %323 %80 %69 Lod %69
%325 = OpLoad %6 %51
%326 = OpFAdd %6 %325 %324
OpStore %51 %326
%327 = OpAccessChain %125 %34 %75
%328 = OpLoad %14 %327
%329 = OpAccessChain %128 %40 %75
%330 = OpLoad %18 %329
%331 = OpSampledImage %131 %328 %330
%332 = OpImageSampleDrefExplicitLod %6 %331 %80 %69 Lod %69
%333 = OpLoad %6 %51
%334 = OpFAdd %6 %333 %332
OpStore %51 %334
%335 = OpAccessChain %125 %34 %76
%336 = OpLoad %14 %335
%337 = OpAccessChain %128 %40 %76
%338 = OpLoad %18 %337
%339 = OpSampledImage %131 %336 %338
%340 = OpImageSampleDrefExplicitLod %6 %339 %80 %69 Lod %69
%341 = OpLoad %6 %51
%342 = OpFAdd %6 %341 %340
OpStore %51 %342
%343 = OpAccessChain %83 %28 %67
%344 = OpLoad %5 %343
%345 = OpAccessChain %101 %38 %67
%346 = OpLoad %18 %345
%347 = OpSampledImage %104 %344 %346
%348 = OpImageSampleExplicitLod %22 %347 %80 Grad %80 %80
%349 = OpLoad %22 %54
%350 = OpFAdd %22 %349 %348
OpStore %54 %350
%351 = OpAccessChain %83 %28 %75
%352 = OpLoad %5 %351
%353 = OpAccessChain %101 %38 %75
%354 = OpLoad %18 %353
%355 = OpSampledImage %104 %352 %354
%356 = OpImageSampleExplicitLod %22 %355 %80 Grad %80 %80
%357 = OpLoad %22 %54
%358 = OpFAdd %22 %357 %356
OpStore %54 %358
%359 = OpAccessChain %83 %28 %76
%360 = OpLoad %5 %359
%361 = OpAccessChain %101 %38 %76
%362 = OpLoad %18 %361
%363 = OpSampledImage %104 %360 %362
%364 = OpImageSampleExplicitLod %22 %363 %80 Grad %80 %80
%365 = OpLoad %22 %54
%366 = OpFAdd %22 %365 %364
OpStore %54 %366
%367 = OpAccessChain %83 %28 %67
%368 = OpLoad %5 %367
%369 = OpAccessChain %101 %38 %67
%370 = OpLoad %18 %369
%371 = OpSampledImage %104 %368 %370
%372 = OpImageSampleExplicitLod %22 %371 %80 Lod %69
%373 = OpLoad %22 %54
%374 = OpFAdd %22 %373 %372
OpStore %54 %374
%375 = OpAccessChain %83 %28 %75
%376 = OpLoad %5 %375
%377 = OpAccessChain %101 %38 %75
%378 = OpLoad %18 %377
%379 = OpSampledImage %104 %376 %378
%380 = OpImageSampleExplicitLod %22 %379 %80 Lod %69
%381 = OpLoad %22 %54
%382 = OpFAdd %22 %381 %380
OpStore %54 %382
%383 = OpAccessChain %83 %28 %76
%384 = OpLoad %5 %383
%385 = OpAccessChain %101 %38 %76
%386 = OpLoad %18 %385
%387 = OpSampledImage %104 %384 %386
%388 = OpImageSampleExplicitLod %22 %387 %80 Lod %69
%389 = OpLoad %22 %54
%390 = OpFAdd %22 %389 %388
OpStore %54 %390
%392 = OpAccessChain %391 %36 %67
%393 = OpLoad %16 %392
%394 = OpLoad %22 %54
%395 = OpImageQuerySize %81 %393
%396 = OpULessThan %160 %82 %395
%397 = OpAll %154 %396
OpSelectionMerge %398 None
OpBranchConditional %397 %399 %398
%399 = OpLabel
OpImageWrite %393 %82 %394
OpBranch %398
%398 = OpLabel
%400 = OpAccessChain %391 %36 %75
%401 = OpLoad %16 %400
%402 = OpLoad %22 %54
%403 = OpImageQuerySize %81 %401
%404 = OpULessThan %160 %82 %403
%405 = OpAll %154 %404
OpSelectionMerge %406 None
OpBranchConditional %405 %407 %406
%407 = OpLabel
OpImageWrite %401 %82 %402
OpBranch %406
%406 = OpLabel
%408 = OpAccessChain %391 %36 %76
%409 = OpLoad %16 %408
%410 = OpLoad %22 %54
%411 = OpImageQuerySize %81 %409
%412 = OpULessThan %160 %82 %411
%413 = OpAll %154 %412
OpSelectionMerge %414 None
OpBranchConditional %413 %415 %414
%415 = OpLabel
OpImageWrite %409 %82 %410
OpBranch %414
%414 = OpLabel
%416 = OpLoad %23 %48
%417 = OpLoad %3 %45
%418 = OpCompositeConstruct %23 %417 %417
%419 = OpIAdd %23 %416 %418
%420 = OpConvertUToF %79 %419
%421 = OpLoad %22 %54
%422 = OpCompositeExtract %6 %420 0
%423 = OpCompositeExtract %6 %420 1
%424 = OpCompositeExtract %6 %420 0
%425 = OpCompositeExtract %6 %420 1
%426 = OpCompositeConstruct %22 %422 %423 %424 %425
%427 = OpFAdd %22 %421 %426
%428 = OpLoad %6 %51
%429 = OpCompositeConstruct %22 %428 %428 %428 %428
%430 = OpFAdd %22 %427 %429
OpStore %62 %430
OpReturn
OpFunctionEnd