1#!amber 2 3# Copyright 2021 Google LLC 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16 17 18# A test for a coverage-gap found by the GraphicsFuzz project. 19 20# Short description: A fragment shader that covers specific BRW code paths 21 22# The test passes because the shader always writes red. 23 24SHADER vertex variant_vertex_shader PASSTHROUGH 25 26# variant_fragment_shader is derived from the following GLSL: 27# #version 320 es 28# 29# #define LOOP for (int i = 0; i < 1; i++) 30# 31# precision highp int; 32# precision highp float; 33# 34# const int _GLF_global_loop_bound = 100; 35# int _GLF_global_loop_count = 0; 36# 37# layout(location = 0) out vec4 _GLF_color; 38# 39# void main() 40# { 41# mat2x3 m23 = mat2x3(0); 42# mat2x4 m24 = mat2x4(0); 43# mat3x2 m32 = mat3x2(0); 44# mat3 m33 = mat3(0); 45# mat3x4 m34 = mat3x4(0); 46# mat4x2 m42 = mat4x2(0); 47# mat4x3 m43 = mat4x3(0); 48# mat4 m44 = mat4(0); 49# 50# // Each loop iterates just once. 51# LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { 52# LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { 53# LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { 54# LOOP { LOOP { LOOP { LOOP { LOOP { 55# // Run until _GLF_global_loop_bound is 98. 56# do 57# { 58# _GLF_global_loop_count++; 59# } 60# while(_GLF_global_loop_count < _GLF_global_loop_bound - 2); 61# 62# // Write one to the first matrix element. 63# m23[i][i] = 1.0; 64# m24[i][i] = 1.0; 65# m32[i][i] = 1.0; 66# m33[i][i] = 1.0; 67# m34[i][i] = 1.0; 68# m42[i][i] = 1.0; 69# m43[i][i] = 1.0; 70# m44[i][i] = 1.0; 71# } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } 72# 73# float sum = 0.0; 74# // Iterate twice. The first iteration reads one and the second zero. 75# for(int r = 0; _GLF_global_loop_count < _GLF_global_loop_bound; r++) 76# { 77# _GLF_global_loop_count++; 78# sum += m23[0][r]; 79# sum += m24[0][r]; 80# sum += m32[0][r]; 81# sum += m33[0][r]; 82# sum += m34[0][r]; 83# sum += m42[0][r]; 84# sum += m43[0][r]; 85# sum += m44[0][r]; 86# } 87# 88# // Always true. 89# if (sum == 8.0) 90# _GLF_color = vec4(1, 0, 0, 1); 91# else 92# _GLF_color = vec4(0); 93# } 94SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 95; SPIR-V 96; Version: 1.0 97; Generator: Khronos Glslang Reference Front End; 10 98; Bound: 531 99; Schema: 0 100 OpCapability Shader 101 %1 = OpExtInstImport "GLSL.std.450" 102 OpMemoryModel Logical GLSL450 103 OpEntryPoint Fragment %4 "main" %528 104 OpExecutionMode %4 OriginUpperLeft 105 OpSource ESSL 320 106 OpName %4 "main" 107 OpName %8 "_GLF_global_loop_count" 108 OpName %14 "m23" 109 OpName %21 "m24" 110 OpName %27 "m32" 111 OpName %32 "m33" 112 OpName %36 "m34" 113 OpName %40 "m42" 114 OpName %44 "m43" 115 OpName %48 "m44" 116 OpName %51 "i" 117 OpName %61 "i" 118 OpName %69 "i" 119 OpName %77 "i" 120 OpName %85 "i" 121 OpName %93 "i" 122 OpName %101 "i" 123 OpName %109 "i" 124 OpName %117 "i" 125 OpName %125 "i" 126 OpName %133 "i" 127 OpName %141 "i" 128 OpName %149 "i" 129 OpName %157 "i" 130 OpName %165 "i" 131 OpName %173 "i" 132 OpName %181 "i" 133 OpName %189 "i" 134 OpName %197 "i" 135 OpName %205 "i" 136 OpName %213 "i" 137 OpName %221 "i" 138 OpName %229 "i" 139 OpName %237 "i" 140 OpName %245 "i" 141 OpName %253 "i" 142 OpName %261 "i" 143 OpName %269 "i" 144 OpName %277 "i" 145 OpName %285 "i" 146 OpName %293 "i" 147 OpName %301 "i" 148 OpName %309 "i" 149 OpName %317 "i" 150 OpName %325 "i" 151 OpName %333 "i" 152 OpName %341 "i" 153 OpName %349 "i" 154 OpName %468 "sum" 155 OpName %469 "r" 156 OpName %528 "_GLF_color" 157 OpDecorate %528 Location 0 158 %2 = OpTypeVoid 159 %3 = OpTypeFunction %2 160 %6 = OpTypeInt 32 1 161 %7 = OpTypePointer Private %6 162 %8 = OpVariable %7 Private 163 %9 = OpConstant %6 0 164 %10 = OpTypeFloat 32 165 %11 = OpTypeVector %10 3 166 %12 = OpTypeMatrix %11 2 167 %13 = OpTypePointer Function %12 168 %15 = OpConstant %10 0 169 %16 = OpConstantComposite %11 %15 %15 %15 170 %17 = OpConstantComposite %12 %16 %16 171 %18 = OpTypeVector %10 4 172 %19 = OpTypeMatrix %18 2 173 %20 = OpTypePointer Function %19 174 %22 = OpConstantComposite %18 %15 %15 %15 %15 175 %23 = OpConstantComposite %19 %22 %22 176 %24 = OpTypeVector %10 2 177 %25 = OpTypeMatrix %24 3 178 %26 = OpTypePointer Function %25 179 %28 = OpConstantComposite %24 %15 %15 180 %29 = OpConstantComposite %25 %28 %28 %28 181 %30 = OpTypeMatrix %11 3 182 %31 = OpTypePointer Function %30 183 %33 = OpConstantComposite %30 %16 %16 %16 184 %34 = OpTypeMatrix %18 3 185 %35 = OpTypePointer Function %34 186 %37 = OpConstantComposite %34 %22 %22 %22 187 %38 = OpTypeMatrix %24 4 188 %39 = OpTypePointer Function %38 189 %41 = OpConstantComposite %38 %28 %28 %28 %28 190 %42 = OpTypeMatrix %11 4 191 %43 = OpTypePointer Function %42 192 %45 = OpConstantComposite %42 %16 %16 %16 %16 193 %46 = OpTypeMatrix %18 4 194 %47 = OpTypePointer Function %46 195 %49 = OpConstantComposite %46 %22 %22 %22 %22 196 %50 = OpTypePointer Function %6 197 %58 = OpConstant %6 1 198 %59 = OpTypeBool 199 %364 = OpConstant %6 98 200 %368 = OpConstant %10 1 201 %369 = OpTypePointer Function %10 202 %476 = OpConstant %6 100 203 %523 = OpConstant %10 8 204 %527 = OpTypePointer Output %18 205 %528 = OpVariable %527 Output 206 %529 = OpConstantComposite %18 %368 %15 %15 %368 207 %4 = OpFunction %2 None %3 208 %5 = OpLabel 209 %14 = OpVariable %13 Function 210 %21 = OpVariable %20 Function 211 %27 = OpVariable %26 Function 212 %32 = OpVariable %31 Function 213 %36 = OpVariable %35 Function 214 %40 = OpVariable %39 Function 215 %44 = OpVariable %43 Function 216 %48 = OpVariable %47 Function 217 %51 = OpVariable %50 Function 218 %61 = OpVariable %50 Function 219 %69 = OpVariable %50 Function 220 %77 = OpVariable %50 Function 221 %85 = OpVariable %50 Function 222 %93 = OpVariable %50 Function 223 %101 = OpVariable %50 Function 224 %109 = OpVariable %50 Function 225 %117 = OpVariable %50 Function 226 %125 = OpVariable %50 Function 227 %133 = OpVariable %50 Function 228 %141 = OpVariable %50 Function 229 %149 = OpVariable %50 Function 230 %157 = OpVariable %50 Function 231 %165 = OpVariable %50 Function 232 %173 = OpVariable %50 Function 233 %181 = OpVariable %50 Function 234 %189 = OpVariable %50 Function 235 %197 = OpVariable %50 Function 236 %205 = OpVariable %50 Function 237 %213 = OpVariable %50 Function 238 %221 = OpVariable %50 Function 239 %229 = OpVariable %50 Function 240 %237 = OpVariable %50 Function 241 %245 = OpVariable %50 Function 242 %253 = OpVariable %50 Function 243 %261 = OpVariable %50 Function 244 %269 = OpVariable %50 Function 245 %277 = OpVariable %50 Function 246 %285 = OpVariable %50 Function 247 %293 = OpVariable %50 Function 248 %301 = OpVariable %50 Function 249 %309 = OpVariable %50 Function 250 %317 = OpVariable %50 Function 251 %325 = OpVariable %50 Function 252 %333 = OpVariable %50 Function 253 %341 = OpVariable %50 Function 254 %349 = OpVariable %50 Function 255 %468 = OpVariable %369 Function 256 %469 = OpVariable %50 Function 257 OpStore %8 %9 258 OpStore %14 %17 259 OpStore %21 %23 260 OpStore %27 %29 261 OpStore %32 %33 262 OpStore %36 %37 263 OpStore %40 %41 264 OpStore %44 %45 265 OpStore %48 %49 266 OpStore %51 %9 267 OpBranch %52 268 %52 = OpLabel 269 OpLoopMerge %54 %55 None 270 OpBranch %56 271 %56 = OpLabel 272 %57 = OpLoad %6 %51 273 %60 = OpSLessThan %59 %57 %58 274 OpBranchConditional %60 %53 %54 275 %53 = OpLabel 276 OpStore %61 %9 277 OpBranch %62 278 %62 = OpLabel 279 OpLoopMerge %64 %65 None 280 OpBranch %66 281 %66 = OpLabel 282 %67 = OpLoad %6 %61 283 %68 = OpSLessThan %59 %67 %58 284 OpBranchConditional %68 %63 %64 285 %63 = OpLabel 286 OpStore %69 %9 287 OpBranch %70 288 %70 = OpLabel 289 OpLoopMerge %72 %73 None 290 OpBranch %74 291 %74 = OpLabel 292 %75 = OpLoad %6 %69 293 %76 = OpSLessThan %59 %75 %58 294 OpBranchConditional %76 %71 %72 295 %71 = OpLabel 296 OpStore %77 %9 297 OpBranch %78 298 %78 = OpLabel 299 OpLoopMerge %80 %81 None 300 OpBranch %82 301 %82 = OpLabel 302 %83 = OpLoad %6 %77 303 %84 = OpSLessThan %59 %83 %58 304 OpBranchConditional %84 %79 %80 305 %79 = OpLabel 306 OpStore %85 %9 307 OpBranch %86 308 %86 = OpLabel 309 OpLoopMerge %88 %89 None 310 OpBranch %90 311 %90 = OpLabel 312 %91 = OpLoad %6 %85 313 %92 = OpSLessThan %59 %91 %58 314 OpBranchConditional %92 %87 %88 315 %87 = OpLabel 316 OpStore %93 %9 317 OpBranch %94 318 %94 = OpLabel 319 OpLoopMerge %96 %97 None 320 OpBranch %98 321 %98 = OpLabel 322 %99 = OpLoad %6 %93 323 %100 = OpSLessThan %59 %99 %58 324 OpBranchConditional %100 %95 %96 325 %95 = OpLabel 326 OpStore %101 %9 327 OpBranch %102 328 %102 = OpLabel 329 OpLoopMerge %104 %105 None 330 OpBranch %106 331 %106 = OpLabel 332 %107 = OpLoad %6 %101 333 %108 = OpSLessThan %59 %107 %58 334 OpBranchConditional %108 %103 %104 335 %103 = OpLabel 336 OpStore %109 %9 337 OpBranch %110 338 %110 = OpLabel 339 OpLoopMerge %112 %113 None 340 OpBranch %114 341 %114 = OpLabel 342 %115 = OpLoad %6 %109 343 %116 = OpSLessThan %59 %115 %58 344 OpBranchConditional %116 %111 %112 345 %111 = OpLabel 346 OpStore %117 %9 347 OpBranch %118 348 %118 = OpLabel 349 OpLoopMerge %120 %121 None 350 OpBranch %122 351 %122 = OpLabel 352 %123 = OpLoad %6 %117 353 %124 = OpSLessThan %59 %123 %58 354 OpBranchConditional %124 %119 %120 355 %119 = OpLabel 356 OpStore %125 %9 357 OpBranch %126 358 %126 = OpLabel 359 OpLoopMerge %128 %129 None 360 OpBranch %130 361 %130 = OpLabel 362 %131 = OpLoad %6 %125 363 %132 = OpSLessThan %59 %131 %58 364 OpBranchConditional %132 %127 %128 365 %127 = OpLabel 366 OpStore %133 %9 367 OpBranch %134 368 %134 = OpLabel 369 OpLoopMerge %136 %137 None 370 OpBranch %138 371 %138 = OpLabel 372 %139 = OpLoad %6 %133 373 %140 = OpSLessThan %59 %139 %58 374 OpBranchConditional %140 %135 %136 375 %135 = OpLabel 376 OpStore %141 %9 377 OpBranch %142 378 %142 = OpLabel 379 OpLoopMerge %144 %145 None 380 OpBranch %146 381 %146 = OpLabel 382 %147 = OpLoad %6 %141 383 %148 = OpSLessThan %59 %147 %58 384 OpBranchConditional %148 %143 %144 385 %143 = OpLabel 386 OpStore %149 %9 387 OpBranch %150 388 %150 = OpLabel 389 OpLoopMerge %152 %153 None 390 OpBranch %154 391 %154 = OpLabel 392 %155 = OpLoad %6 %149 393 %156 = OpSLessThan %59 %155 %58 394 OpBranchConditional %156 %151 %152 395 %151 = OpLabel 396 OpStore %157 %9 397 OpBranch %158 398 %158 = OpLabel 399 OpLoopMerge %160 %161 None 400 OpBranch %162 401 %162 = OpLabel 402 %163 = OpLoad %6 %157 403 %164 = OpSLessThan %59 %163 %58 404 OpBranchConditional %164 %159 %160 405 %159 = OpLabel 406 OpStore %165 %9 407 OpBranch %166 408 %166 = OpLabel 409 OpLoopMerge %168 %169 None 410 OpBranch %170 411 %170 = OpLabel 412 %171 = OpLoad %6 %165 413 %172 = OpSLessThan %59 %171 %58 414 OpBranchConditional %172 %167 %168 415 %167 = OpLabel 416 OpStore %173 %9 417 OpBranch %174 418 %174 = OpLabel 419 OpLoopMerge %176 %177 None 420 OpBranch %178 421 %178 = OpLabel 422 %179 = OpLoad %6 %173 423 %180 = OpSLessThan %59 %179 %58 424 OpBranchConditional %180 %175 %176 425 %175 = OpLabel 426 OpStore %181 %9 427 OpBranch %182 428 %182 = OpLabel 429 OpLoopMerge %184 %185 None 430 OpBranch %186 431 %186 = OpLabel 432 %187 = OpLoad %6 %181 433 %188 = OpSLessThan %59 %187 %58 434 OpBranchConditional %188 %183 %184 435 %183 = OpLabel 436 OpStore %189 %9 437 OpBranch %190 438 %190 = OpLabel 439 OpLoopMerge %192 %193 None 440 OpBranch %194 441 %194 = OpLabel 442 %195 = OpLoad %6 %189 443 %196 = OpSLessThan %59 %195 %58 444 OpBranchConditional %196 %191 %192 445 %191 = OpLabel 446 OpStore %197 %9 447 OpBranch %198 448 %198 = OpLabel 449 OpLoopMerge %200 %201 None 450 OpBranch %202 451 %202 = OpLabel 452 %203 = OpLoad %6 %197 453 %204 = OpSLessThan %59 %203 %58 454 OpBranchConditional %204 %199 %200 455 %199 = OpLabel 456 OpStore %205 %9 457 OpBranch %206 458 %206 = OpLabel 459 OpLoopMerge %208 %209 None 460 OpBranch %210 461 %210 = OpLabel 462 %211 = OpLoad %6 %205 463 %212 = OpSLessThan %59 %211 %58 464 OpBranchConditional %212 %207 %208 465 %207 = OpLabel 466 OpStore %213 %9 467 OpBranch %214 468 %214 = OpLabel 469 OpLoopMerge %216 %217 None 470 OpBranch %218 471 %218 = OpLabel 472 %219 = OpLoad %6 %213 473 %220 = OpSLessThan %59 %219 %58 474 OpBranchConditional %220 %215 %216 475 %215 = OpLabel 476 OpStore %221 %9 477 OpBranch %222 478 %222 = OpLabel 479 OpLoopMerge %224 %225 None 480 OpBranch %226 481 %226 = OpLabel 482 %227 = OpLoad %6 %221 483 %228 = OpSLessThan %59 %227 %58 484 OpBranchConditional %228 %223 %224 485 %223 = OpLabel 486 OpStore %229 %9 487 OpBranch %230 488 %230 = OpLabel 489 OpLoopMerge %232 %233 None 490 OpBranch %234 491 %234 = OpLabel 492 %235 = OpLoad %6 %229 493 %236 = OpSLessThan %59 %235 %58 494 OpBranchConditional %236 %231 %232 495 %231 = OpLabel 496 OpStore %237 %9 497 OpBranch %238 498 %238 = OpLabel 499 OpLoopMerge %240 %241 None 500 OpBranch %242 501 %242 = OpLabel 502 %243 = OpLoad %6 %237 503 %244 = OpSLessThan %59 %243 %58 504 OpBranchConditional %244 %239 %240 505 %239 = OpLabel 506 OpStore %245 %9 507 OpBranch %246 508 %246 = OpLabel 509 OpLoopMerge %248 %249 None 510 OpBranch %250 511 %250 = OpLabel 512 %251 = OpLoad %6 %245 513 %252 = OpSLessThan %59 %251 %58 514 OpBranchConditional %252 %247 %248 515 %247 = OpLabel 516 OpStore %253 %9 517 OpBranch %254 518 %254 = OpLabel 519 OpLoopMerge %256 %257 None 520 OpBranch %258 521 %258 = OpLabel 522 %259 = OpLoad %6 %253 523 %260 = OpSLessThan %59 %259 %58 524 OpBranchConditional %260 %255 %256 525 %255 = OpLabel 526 OpStore %261 %9 527 OpBranch %262 528 %262 = OpLabel 529 OpLoopMerge %264 %265 None 530 OpBranch %266 531 %266 = OpLabel 532 %267 = OpLoad %6 %261 533 %268 = OpSLessThan %59 %267 %58 534 OpBranchConditional %268 %263 %264 535 %263 = OpLabel 536 OpStore %269 %9 537 OpBranch %270 538 %270 = OpLabel 539 OpLoopMerge %272 %273 None 540 OpBranch %274 541 %274 = OpLabel 542 %275 = OpLoad %6 %269 543 %276 = OpSLessThan %59 %275 %58 544 OpBranchConditional %276 %271 %272 545 %271 = OpLabel 546 OpStore %277 %9 547 OpBranch %278 548 %278 = OpLabel 549 OpLoopMerge %280 %281 None 550 OpBranch %282 551 %282 = OpLabel 552 %283 = OpLoad %6 %277 553 %284 = OpSLessThan %59 %283 %58 554 OpBranchConditional %284 %279 %280 555 %279 = OpLabel 556 OpStore %285 %9 557 OpBranch %286 558 %286 = OpLabel 559 OpLoopMerge %288 %289 None 560 OpBranch %290 561 %290 = OpLabel 562 %291 = OpLoad %6 %285 563 %292 = OpSLessThan %59 %291 %58 564 OpBranchConditional %292 %287 %288 565 %287 = OpLabel 566 OpStore %293 %9 567 OpBranch %294 568 %294 = OpLabel 569 OpLoopMerge %296 %297 None 570 OpBranch %298 571 %298 = OpLabel 572 %299 = OpLoad %6 %293 573 %300 = OpSLessThan %59 %299 %58 574 OpBranchConditional %300 %295 %296 575 %295 = OpLabel 576 OpStore %301 %9 577 OpBranch %302 578 %302 = OpLabel 579 OpLoopMerge %304 %305 None 580 OpBranch %306 581 %306 = OpLabel 582 %307 = OpLoad %6 %301 583 %308 = OpSLessThan %59 %307 %58 584 OpBranchConditional %308 %303 %304 585 %303 = OpLabel 586 OpStore %309 %9 587 OpBranch %310 588 %310 = OpLabel 589 OpLoopMerge %312 %313 None 590 OpBranch %314 591 %314 = OpLabel 592 %315 = OpLoad %6 %309 593 %316 = OpSLessThan %59 %315 %58 594 OpBranchConditional %316 %311 %312 595 %311 = OpLabel 596 OpStore %317 %9 597 OpBranch %318 598 %318 = OpLabel 599 OpLoopMerge %320 %321 None 600 OpBranch %322 601 %322 = OpLabel 602 %323 = OpLoad %6 %317 603 %324 = OpSLessThan %59 %323 %58 604 OpBranchConditional %324 %319 %320 605 %319 = OpLabel 606 OpStore %325 %9 607 OpBranch %326 608 %326 = OpLabel 609 OpLoopMerge %328 %329 None 610 OpBranch %330 611 %330 = OpLabel 612 %331 = OpLoad %6 %325 613 %332 = OpSLessThan %59 %331 %58 614 OpBranchConditional %332 %327 %328 615 %327 = OpLabel 616 OpStore %333 %9 617 OpBranch %334 618 %334 = OpLabel 619 OpLoopMerge %336 %337 None 620 OpBranch %338 621 %338 = OpLabel 622 %339 = OpLoad %6 %333 623 %340 = OpSLessThan %59 %339 %58 624 OpBranchConditional %340 %335 %336 625 %335 = OpLabel 626 OpStore %341 %9 627 OpBranch %342 628 %342 = OpLabel 629 OpLoopMerge %344 %345 None 630 OpBranch %346 631 %346 = OpLabel 632 %347 = OpLoad %6 %341 633 %348 = OpSLessThan %59 %347 %58 634 OpBranchConditional %348 %343 %344 635 %343 = OpLabel 636 OpStore %349 %9 637 OpBranch %350 638 %350 = OpLabel 639 OpLoopMerge %352 %353 None 640 OpBranch %354 641 %354 = OpLabel 642 %355 = OpLoad %6 %349 643 %356 = OpSLessThan %59 %355 %58 644 OpBranchConditional %356 %351 %352 645 %351 = OpLabel 646 OpBranch %357 647 %357 = OpLabel 648 OpLoopMerge %359 %360 None 649 OpBranch %358 650 %358 = OpLabel 651 %361 = OpLoad %6 %8 652 %362 = OpIAdd %6 %361 %58 653 OpStore %8 %362 654 OpBranch %360 655 %360 = OpLabel 656 %363 = OpLoad %6 %8 657 %365 = OpSLessThan %59 %363 %364 658 OpBranchConditional %365 %357 %359 659 %359 = OpLabel 660 %366 = OpLoad %6 %349 661 %367 = OpLoad %6 %349 662 %370 = OpAccessChain %369 %14 %366 %367 663 OpStore %370 %368 664 %371 = OpLoad %6 %349 665 %372 = OpLoad %6 %349 666 %373 = OpAccessChain %369 %21 %371 %372 667 OpStore %373 %368 668 %374 = OpLoad %6 %349 669 %375 = OpLoad %6 %349 670 %376 = OpAccessChain %369 %27 %374 %375 671 OpStore %376 %368 672 %377 = OpLoad %6 %349 673 %378 = OpLoad %6 %349 674 %379 = OpAccessChain %369 %32 %377 %378 675 OpStore %379 %368 676 %380 = OpLoad %6 %349 677 %381 = OpLoad %6 %349 678 %382 = OpAccessChain %369 %36 %380 %381 679 OpStore %382 %368 680 %383 = OpLoad %6 %349 681 %384 = OpLoad %6 %349 682 %385 = OpAccessChain %369 %40 %383 %384 683 OpStore %385 %368 684 %386 = OpLoad %6 %349 685 %387 = OpLoad %6 %349 686 %388 = OpAccessChain %369 %44 %386 %387 687 OpStore %388 %368 688 %389 = OpLoad %6 %349 689 %390 = OpLoad %6 %349 690 %391 = OpAccessChain %369 %48 %389 %390 691 OpStore %391 %368 692 OpBranch %353 693 %353 = OpLabel 694 %392 = OpLoad %6 %349 695 %393 = OpIAdd %6 %392 %58 696 OpStore %349 %393 697 OpBranch %350 698 %352 = OpLabel 699 OpBranch %345 700 %345 = OpLabel 701 %394 = OpLoad %6 %341 702 %395 = OpIAdd %6 %394 %58 703 OpStore %341 %395 704 OpBranch %342 705 %344 = OpLabel 706 OpBranch %337 707 %337 = OpLabel 708 %396 = OpLoad %6 %333 709 %397 = OpIAdd %6 %396 %58 710 OpStore %333 %397 711 OpBranch %334 712 %336 = OpLabel 713 OpBranch %329 714 %329 = OpLabel 715 %398 = OpLoad %6 %325 716 %399 = OpIAdd %6 %398 %58 717 OpStore %325 %399 718 OpBranch %326 719 %328 = OpLabel 720 OpBranch %321 721 %321 = OpLabel 722 %400 = OpLoad %6 %317 723 %401 = OpIAdd %6 %400 %58 724 OpStore %317 %401 725 OpBranch %318 726 %320 = OpLabel 727 OpBranch %313 728 %313 = OpLabel 729 %402 = OpLoad %6 %309 730 %403 = OpIAdd %6 %402 %58 731 OpStore %309 %403 732 OpBranch %310 733 %312 = OpLabel 734 OpBranch %305 735 %305 = OpLabel 736 %404 = OpLoad %6 %301 737 %405 = OpIAdd %6 %404 %58 738 OpStore %301 %405 739 OpBranch %302 740 %304 = OpLabel 741 OpBranch %297 742 %297 = OpLabel 743 %406 = OpLoad %6 %293 744 %407 = OpIAdd %6 %406 %58 745 OpStore %293 %407 746 OpBranch %294 747 %296 = OpLabel 748 OpBranch %289 749 %289 = OpLabel 750 %408 = OpLoad %6 %285 751 %409 = OpIAdd %6 %408 %58 752 OpStore %285 %409 753 OpBranch %286 754 %288 = OpLabel 755 OpBranch %281 756 %281 = OpLabel 757 %410 = OpLoad %6 %277 758 %411 = OpIAdd %6 %410 %58 759 OpStore %277 %411 760 OpBranch %278 761 %280 = OpLabel 762 OpBranch %273 763 %273 = OpLabel 764 %412 = OpLoad %6 %269 765 %413 = OpIAdd %6 %412 %58 766 OpStore %269 %413 767 OpBranch %270 768 %272 = OpLabel 769 OpBranch %265 770 %265 = OpLabel 771 %414 = OpLoad %6 %261 772 %415 = OpIAdd %6 %414 %58 773 OpStore %261 %415 774 OpBranch %262 775 %264 = OpLabel 776 OpBranch %257 777 %257 = OpLabel 778 %416 = OpLoad %6 %253 779 %417 = OpIAdd %6 %416 %58 780 OpStore %253 %417 781 OpBranch %254 782 %256 = OpLabel 783 OpBranch %249 784 %249 = OpLabel 785 %418 = OpLoad %6 %245 786 %419 = OpIAdd %6 %418 %58 787 OpStore %245 %419 788 OpBranch %246 789 %248 = OpLabel 790 OpBranch %241 791 %241 = OpLabel 792 %420 = OpLoad %6 %237 793 %421 = OpIAdd %6 %420 %58 794 OpStore %237 %421 795 OpBranch %238 796 %240 = OpLabel 797 OpBranch %233 798 %233 = OpLabel 799 %422 = OpLoad %6 %229 800 %423 = OpIAdd %6 %422 %58 801 OpStore %229 %423 802 OpBranch %230 803 %232 = OpLabel 804 OpBranch %225 805 %225 = OpLabel 806 %424 = OpLoad %6 %221 807 %425 = OpIAdd %6 %424 %58 808 OpStore %221 %425 809 OpBranch %222 810 %224 = OpLabel 811 OpBranch %217 812 %217 = OpLabel 813 %426 = OpLoad %6 %213 814 %427 = OpIAdd %6 %426 %58 815 OpStore %213 %427 816 OpBranch %214 817 %216 = OpLabel 818 OpBranch %209 819 %209 = OpLabel 820 %428 = OpLoad %6 %205 821 %429 = OpIAdd %6 %428 %58 822 OpStore %205 %429 823 OpBranch %206 824 %208 = OpLabel 825 OpBranch %201 826 %201 = OpLabel 827 %430 = OpLoad %6 %197 828 %431 = OpIAdd %6 %430 %58 829 OpStore %197 %431 830 OpBranch %198 831 %200 = OpLabel 832 OpBranch %193 833 %193 = OpLabel 834 %432 = OpLoad %6 %189 835 %433 = OpIAdd %6 %432 %58 836 OpStore %189 %433 837 OpBranch %190 838 %192 = OpLabel 839 OpBranch %185 840 %185 = OpLabel 841 %434 = OpLoad %6 %181 842 %435 = OpIAdd %6 %434 %58 843 OpStore %181 %435 844 OpBranch %182 845 %184 = OpLabel 846 OpBranch %177 847 %177 = OpLabel 848 %436 = OpLoad %6 %173 849 %437 = OpIAdd %6 %436 %58 850 OpStore %173 %437 851 OpBranch %174 852 %176 = OpLabel 853 OpBranch %169 854 %169 = OpLabel 855 %438 = OpLoad %6 %165 856 %439 = OpIAdd %6 %438 %58 857 OpStore %165 %439 858 OpBranch %166 859 %168 = OpLabel 860 OpBranch %161 861 %161 = OpLabel 862 %440 = OpLoad %6 %157 863 %441 = OpIAdd %6 %440 %58 864 OpStore %157 %441 865 OpBranch %158 866 %160 = OpLabel 867 OpBranch %153 868 %153 = OpLabel 869 %442 = OpLoad %6 %149 870 %443 = OpIAdd %6 %442 %58 871 OpStore %149 %443 872 OpBranch %150 873 %152 = OpLabel 874 OpBranch %145 875 %145 = OpLabel 876 %444 = OpLoad %6 %141 877 %445 = OpIAdd %6 %444 %58 878 OpStore %141 %445 879 OpBranch %142 880 %144 = OpLabel 881 OpBranch %137 882 %137 = OpLabel 883 %446 = OpLoad %6 %133 884 %447 = OpIAdd %6 %446 %58 885 OpStore %133 %447 886 OpBranch %134 887 %136 = OpLabel 888 OpBranch %129 889 %129 = OpLabel 890 %448 = OpLoad %6 %125 891 %449 = OpIAdd %6 %448 %58 892 OpStore %125 %449 893 OpBranch %126 894 %128 = OpLabel 895 OpBranch %121 896 %121 = OpLabel 897 %450 = OpLoad %6 %117 898 %451 = OpIAdd %6 %450 %58 899 OpStore %117 %451 900 OpBranch %118 901 %120 = OpLabel 902 OpBranch %113 903 %113 = OpLabel 904 %452 = OpLoad %6 %109 905 %453 = OpIAdd %6 %452 %58 906 OpStore %109 %453 907 OpBranch %110 908 %112 = OpLabel 909 OpBranch %105 910 %105 = OpLabel 911 %454 = OpLoad %6 %101 912 %455 = OpIAdd %6 %454 %58 913 OpStore %101 %455 914 OpBranch %102 915 %104 = OpLabel 916 OpBranch %97 917 %97 = OpLabel 918 %456 = OpLoad %6 %93 919 %457 = OpIAdd %6 %456 %58 920 OpStore %93 %457 921 OpBranch %94 922 %96 = OpLabel 923 OpBranch %89 924 %89 = OpLabel 925 %458 = OpLoad %6 %85 926 %459 = OpIAdd %6 %458 %58 927 OpStore %85 %459 928 OpBranch %86 929 %88 = OpLabel 930 OpBranch %81 931 %81 = OpLabel 932 %460 = OpLoad %6 %77 933 %461 = OpIAdd %6 %460 %58 934 OpStore %77 %461 935 OpBranch %78 936 %80 = OpLabel 937 OpBranch %73 938 %73 = OpLabel 939 %462 = OpLoad %6 %69 940 %463 = OpIAdd %6 %462 %58 941 OpStore %69 %463 942 OpBranch %70 943 %72 = OpLabel 944 OpBranch %65 945 %65 = OpLabel 946 %464 = OpLoad %6 %61 947 %465 = OpIAdd %6 %464 %58 948 OpStore %61 %465 949 OpBranch %62 950 %64 = OpLabel 951 OpBranch %55 952 %55 = OpLabel 953 %466 = OpLoad %6 %51 954 %467 = OpIAdd %6 %466 %58 955 OpStore %51 %467 956 OpBranch %52 957 %54 = OpLabel 958 OpStore %468 %15 959 OpStore %469 %9 960 OpBranch %470 961 %470 = OpLabel 962 OpLoopMerge %472 %473 None 963 OpBranch %474 964 %474 = OpLabel 965 %475 = OpLoad %6 %8 966 %477 = OpSLessThan %59 %475 %476 967 OpBranchConditional %477 %471 %472 968 %471 = OpLabel 969 %478 = OpLoad %6 %8 970 %479 = OpIAdd %6 %478 %58 971 OpStore %8 %479 972 %480 = OpLoad %6 %469 973 %481 = OpAccessChain %369 %14 %9 %480 974 %482 = OpLoad %10 %481 975 %483 = OpLoad %10 %468 976 %484 = OpFAdd %10 %483 %482 977 OpStore %468 %484 978 %485 = OpLoad %6 %469 979 %486 = OpAccessChain %369 %21 %9 %485 980 %487 = OpLoad %10 %486 981 %488 = OpLoad %10 %468 982 %489 = OpFAdd %10 %488 %487 983 OpStore %468 %489 984 %490 = OpLoad %6 %469 985 %491 = OpAccessChain %369 %27 %9 %490 986 %492 = OpLoad %10 %491 987 %493 = OpLoad %10 %468 988 %494 = OpFAdd %10 %493 %492 989 OpStore %468 %494 990 %495 = OpLoad %6 %469 991 %496 = OpAccessChain %369 %32 %9 %495 992 %497 = OpLoad %10 %496 993 %498 = OpLoad %10 %468 994 %499 = OpFAdd %10 %498 %497 995 OpStore %468 %499 996 %500 = OpLoad %6 %469 997 %501 = OpAccessChain %369 %36 %9 %500 998 %502 = OpLoad %10 %501 999 %503 = OpLoad %10 %468 1000 %504 = OpFAdd %10 %503 %502 1001 OpStore %468 %504 1002 %505 = OpLoad %6 %469 1003 %506 = OpAccessChain %369 %40 %9 %505 1004 %507 = OpLoad %10 %506 1005 %508 = OpLoad %10 %468 1006 %509 = OpFAdd %10 %508 %507 1007 OpStore %468 %509 1008 %510 = OpLoad %6 %469 1009 %511 = OpAccessChain %369 %44 %9 %510 1010 %512 = OpLoad %10 %511 1011 %513 = OpLoad %10 %468 1012 %514 = OpFAdd %10 %513 %512 1013 OpStore %468 %514 1014 %515 = OpLoad %6 %469 1015 %516 = OpAccessChain %369 %48 %9 %515 1016 %517 = OpLoad %10 %516 1017 %518 = OpLoad %10 %468 1018 %519 = OpFAdd %10 %518 %517 1019 OpStore %468 %519 1020 OpBranch %473 1021 %473 = OpLabel 1022 %520 = OpLoad %6 %469 1023 %521 = OpIAdd %6 %520 %58 1024 OpStore %469 %521 1025 OpBranch %470 1026 %472 = OpLabel 1027 %522 = OpLoad %10 %468 1028 %524 = OpFOrdEqual %59 %522 %523 1029 OpSelectionMerge %526 None 1030 OpBranchConditional %524 %525 %530 1031 %525 = OpLabel 1032 OpStore %528 %529 1033 OpBranch %526 1034 %530 = OpLabel 1035 OpStore %528 %22 1036 OpBranch %526 1037 %526 = OpLabel 1038 OpReturn 1039 OpFunctionEnd 1040END 1041 1042 1043BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM 1044 1045PIPELINE graphics variant_pipeline 1046 ATTACH variant_vertex_shader 1047 ATTACH variant_fragment_shader 1048 FRAMEBUFFER_SIZE 256 256 1049 BIND BUFFER variant_framebuffer AS color LOCATION 0 1050END 1051CLEAR_COLOR variant_pipeline 0 0 0 255 1052 1053CLEAR variant_pipeline 1054RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 1055 1056EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 1057