#!amber # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # A test for a coverage-gap found by the GraphicsFuzz project. # Short description: A fragment shader that covers specific BRW code paths # The test passes because the shader always writes red. # Optimized using spirv-opt with the following arguments: # '-O' # spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af SHADER vertex variant_vertex_shader PASSTHROUGH # variant_fragment_shader is derived from the following GLSL: # #version 320 es # # precision highp float; # precision highp int; # # layout(location = 0) out vec4 _GLF_color; # # const int _GLF_global_loop_bound = 10; # int _GLF_global_loop_count = 0; # # #define LOOP for (int i = 0; i < 5 && _GLF_global_loop_count < _GLF_global_loop_bound; i++, _GLF_global_loop_count++, a++) # # void main() # { # vec2 v = gl_FragCoord.xy; # _GLF_color = vec4(v, 0, 1); # int a = 0; # # LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { # LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { # LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { # // Always false. # if(gl_FragCoord.x < 0.0) # { # return; # } # } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } # # // Always true because the partial derivative of gl_FragCoord is the same # // in x and y directions. The two most inner loops run until _GLF_global_loop_count # // (and a with it) becomes ten. The other loops increase the variable a by one. # if (dFdx(v.x) - dFdy(v.y) == 0.0 && a == 10 + 38) # _GLF_color = vec4(1, 0, 0, 1); # else # _GLF_color = vec4(0); # } SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 ; SPIR-V ; Version: 1.0 ; Generator: Khronos Glslang Reference Front End; 10 ; Bound: 2564 ; Schema: 0 OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" %16 %20 OpExecutionMode %4 OriginUpperLeft OpSource ESSL 320 OpName %4 "main" OpName %16 "gl_FragCoord" OpName %20 "_GLF_color" OpDecorate %16 BuiltIn FragCoord OpDecorate %20 Location 0 %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeInt 32 1 %9 = OpConstant %6 0 %10 = OpTypeFloat 32 %14 = OpTypeVector %10 4 %15 = OpTypePointer Input %14 %16 = OpVariable %15 Input %19 = OpTypePointer Output %14 %20 = OpVariable %19 Output %22 = OpConstant %10 0 %23 = OpConstant %10 1 %36 = OpConstant %6 5 %37 = OpTypeBool %40 = OpConstant %6 10 %461 = OpTypeInt 32 0 %462 = OpConstant %461 0 %463 = OpTypePointer Input %10 %471 = OpConstant %6 1 %716 = OpConstant %6 48 %721 = OpConstantComposite %14 %23 %22 %22 %23 %723 = OpConstantComposite %14 %22 %22 %22 %22 %726 = OpConstantFalse %37 %729 = OpConstantTrue %37 %4 = OpFunction %2 None %3 %5 = OpLabel OpSelectionMerge %724 None OpSwitch %462 %725 %725 = OpLabel %17 = OpLoad %14 %16 %24 = OpCompositeExtract %10 %17 0 %25 = OpCompositeExtract %10 %17 1 %26 = OpCompositeConstruct %14 %24 %25 %22 %23 OpStore %20 %26 OpBranch %30 %30 = OpLabel %966 = OpPhi %37 %726 %725 %2483 %33 %926 = OpPhi %6 %9 %725 %704 %33 %811 = OpPhi %6 %9 %725 %702 %33 %810 = OpPhi %6 %9 %725 %700 %33 %38 = OpSLessThan %37 %810 %36 %41 = OpSLessThan %37 %811 %40 %42 = OpLogicalAnd %37 %38 %41 OpLoopMerge %32 %33 None OpBranchConditional %42 %31 %32 %31 = OpLabel OpBranch %44 %44 = OpLabel %965 = OpPhi %37 %966 %31 %2406 %47 %925 = OpPhi %6 %926 %31 %698 %47 %813 = OpPhi %6 %811 %31 %696 %47 %812 = OpPhi %6 %9 %31 %694 %47 %50 = OpSLessThan %37 %812 %36 %52 = OpSLessThan %37 %813 %40 %53 = OpLogicalAnd %37 %50 %52 OpLoopMerge %46 %47 None OpBranchConditional %53 %45 %46 %45 = OpLabel OpBranch %55 %55 = OpLabel %964 = OpPhi %37 %965 %45 %2331 %58 %924 = OpPhi %6 %925 %45 %692 %58 %815 = OpPhi %6 %813 %45 %690 %58 %814 = OpPhi %6 %9 %45 %688 %58 %61 = OpSLessThan %37 %814 %36 %63 = OpSLessThan %37 %815 %40 %64 = OpLogicalAnd %37 %61 %63 OpLoopMerge %57 %58 None OpBranchConditional %64 %56 %57 %56 = OpLabel OpBranch %66 %66 = OpLabel %963 = OpPhi %37 %964 %56 %2258 %69 %923 = OpPhi %6 %924 %56 %686 %69 %817 = OpPhi %6 %815 %56 %684 %69 %816 = OpPhi %6 %9 %56 %682 %69 %72 = OpSLessThan %37 %816 %36 %74 = OpSLessThan %37 %817 %40 %75 = OpLogicalAnd %37 %72 %74 OpLoopMerge %68 %69 None OpBranchConditional %75 %67 %68 %67 = OpLabel OpBranch %77 %77 = OpLabel %962 = OpPhi %37 %963 %67 %2187 %80 %922 = OpPhi %6 %923 %67 %680 %80 %819 = OpPhi %6 %817 %67 %678 %80 %818 = OpPhi %6 %9 %67 %676 %80 %83 = OpSLessThan %37 %818 %36 %85 = OpSLessThan %37 %819 %40 %86 = OpLogicalAnd %37 %83 %85 OpLoopMerge %79 %80 None OpBranchConditional %86 %78 %79 %78 = OpLabel OpBranch %88 %88 = OpLabel %961 = OpPhi %37 %962 %78 %2118 %91 %921 = OpPhi %6 %922 %78 %674 %91 %821 = OpPhi %6 %819 %78 %672 %91 %820 = OpPhi %6 %9 %78 %670 %91 %94 = OpSLessThan %37 %820 %36 %96 = OpSLessThan %37 %821 %40 %97 = OpLogicalAnd %37 %94 %96 OpLoopMerge %90 %91 None OpBranchConditional %97 %89 %90 %89 = OpLabel OpBranch %99 %99 = OpLabel %960 = OpPhi %37 %961 %89 %2051 %102 %920 = OpPhi %6 %921 %89 %668 %102 %823 = OpPhi %6 %821 %89 %666 %102 %822 = OpPhi %6 %9 %89 %664 %102 %105 = OpSLessThan %37 %822 %36 %107 = OpSLessThan %37 %823 %40 %108 = OpLogicalAnd %37 %105 %107 OpLoopMerge %101 %102 None OpBranchConditional %108 %100 %101 %100 = OpLabel OpBranch %110 %110 = OpLabel %959 = OpPhi %37 %960 %100 %1986 %113 %919 = OpPhi %6 %920 %100 %662 %113 %825 = OpPhi %6 %823 %100 %660 %113 %824 = OpPhi %6 %9 %100 %658 %113 %116 = OpSLessThan %37 %824 %36 %118 = OpSLessThan %37 %825 %40 %119 = OpLogicalAnd %37 %116 %118 OpLoopMerge %112 %113 None OpBranchConditional %119 %111 %112 %111 = OpLabel OpBranch %121 %121 = OpLabel %958 = OpPhi %37 %959 %111 %1923 %124 %918 = OpPhi %6 %919 %111 %656 %124 %827 = OpPhi %6 %825 %111 %654 %124 %826 = OpPhi %6 %9 %111 %652 %124 %127 = OpSLessThan %37 %826 %36 %129 = OpSLessThan %37 %827 %40 %130 = OpLogicalAnd %37 %127 %129 OpLoopMerge %123 %124 None OpBranchConditional %130 %122 %123 %122 = OpLabel OpBranch %132 %132 = OpLabel %957 = OpPhi %37 %958 %122 %1862 %135 %917 = OpPhi %6 %918 %122 %650 %135 %829 = OpPhi %6 %827 %122 %648 %135 %828 = OpPhi %6 %9 %122 %646 %135 %138 = OpSLessThan %37 %828 %36 %140 = OpSLessThan %37 %829 %40 %141 = OpLogicalAnd %37 %138 %140 OpLoopMerge %134 %135 None OpBranchConditional %141 %133 %134 %133 = OpLabel OpBranch %143 %143 = OpLabel %956 = OpPhi %37 %957 %133 %1803 %146 %916 = OpPhi %6 %917 %133 %644 %146 %831 = OpPhi %6 %829 %133 %642 %146 %830 = OpPhi %6 %9 %133 %640 %146 %149 = OpSLessThan %37 %830 %36 %151 = OpSLessThan %37 %831 %40 %152 = OpLogicalAnd %37 %149 %151 OpLoopMerge %145 %146 None OpBranchConditional %152 %144 %145 %144 = OpLabel OpBranch %154 %154 = OpLabel %955 = OpPhi %37 %956 %144 %1746 %157 %915 = OpPhi %6 %916 %144 %638 %157 %833 = OpPhi %6 %831 %144 %636 %157 %832 = OpPhi %6 %9 %144 %634 %157 %160 = OpSLessThan %37 %832 %36 %162 = OpSLessThan %37 %833 %40 %163 = OpLogicalAnd %37 %160 %162 OpLoopMerge %156 %157 None OpBranchConditional %163 %155 %156 %155 = OpLabel OpBranch %165 %165 = OpLabel %954 = OpPhi %37 %955 %155 %1691 %168 %914 = OpPhi %6 %915 %155 %632 %168 %835 = OpPhi %6 %833 %155 %630 %168 %834 = OpPhi %6 %9 %155 %628 %168 %171 = OpSLessThan %37 %834 %36 %173 = OpSLessThan %37 %835 %40 %174 = OpLogicalAnd %37 %171 %173 OpLoopMerge %167 %168 None OpBranchConditional %174 %166 %167 %166 = OpLabel OpBranch %176 %176 = OpLabel %953 = OpPhi %37 %954 %166 %1638 %179 %913 = OpPhi %6 %914 %166 %626 %179 %837 = OpPhi %6 %835 %166 %624 %179 %836 = OpPhi %6 %9 %166 %622 %179 %182 = OpSLessThan %37 %836 %36 %184 = OpSLessThan %37 %837 %40 %185 = OpLogicalAnd %37 %182 %184 OpLoopMerge %178 %179 None OpBranchConditional %185 %177 %178 %177 = OpLabel OpBranch %187 %187 = OpLabel %952 = OpPhi %37 %953 %177 %1587 %190 %912 = OpPhi %6 %913 %177 %620 %190 %839 = OpPhi %6 %837 %177 %618 %190 %838 = OpPhi %6 %9 %177 %616 %190 %193 = OpSLessThan %37 %838 %36 %195 = OpSLessThan %37 %839 %40 %196 = OpLogicalAnd %37 %193 %195 OpLoopMerge %189 %190 None OpBranchConditional %196 %188 %189 %188 = OpLabel OpBranch %198 %198 = OpLabel %951 = OpPhi %37 %952 %188 %1538 %201 %911 = OpPhi %6 %912 %188 %614 %201 %841 = OpPhi %6 %839 %188 %612 %201 %840 = OpPhi %6 %9 %188 %610 %201 %204 = OpSLessThan %37 %840 %36 %206 = OpSLessThan %37 %841 %40 %207 = OpLogicalAnd %37 %204 %206 OpLoopMerge %200 %201 None OpBranchConditional %207 %199 %200 %199 = OpLabel OpBranch %209 %209 = OpLabel %950 = OpPhi %37 %951 %199 %1491 %212 %910 = OpPhi %6 %911 %199 %608 %212 %843 = OpPhi %6 %841 %199 %606 %212 %842 = OpPhi %6 %9 %199 %604 %212 %215 = OpSLessThan %37 %842 %36 %217 = OpSLessThan %37 %843 %40 %218 = OpLogicalAnd %37 %215 %217 OpLoopMerge %211 %212 None OpBranchConditional %218 %210 %211 %210 = OpLabel OpBranch %220 %220 = OpLabel %949 = OpPhi %37 %950 %210 %1446 %223 %909 = OpPhi %6 %910 %210 %602 %223 %845 = OpPhi %6 %843 %210 %600 %223 %844 = OpPhi %6 %9 %210 %598 %223 %226 = OpSLessThan %37 %844 %36 %228 = OpSLessThan %37 %845 %40 %229 = OpLogicalAnd %37 %226 %228 OpLoopMerge %222 %223 None OpBranchConditional %229 %221 %222 %221 = OpLabel OpBranch %231 %231 = OpLabel %948 = OpPhi %37 %949 %221 %1403 %234 %908 = OpPhi %6 %909 %221 %596 %234 %847 = OpPhi %6 %845 %221 %594 %234 %846 = OpPhi %6 %9 %221 %592 %234 %237 = OpSLessThan %37 %846 %36 %239 = OpSLessThan %37 %847 %40 %240 = OpLogicalAnd %37 %237 %239 OpLoopMerge %233 %234 None OpBranchConditional %240 %232 %233 %232 = OpLabel OpBranch %242 %242 = OpLabel %947 = OpPhi %37 %948 %232 %1362 %245 %907 = OpPhi %6 %908 %232 %590 %245 %849 = OpPhi %6 %847 %232 %588 %245 %848 = OpPhi %6 %9 %232 %586 %245 %248 = OpSLessThan %37 %848 %36 %250 = OpSLessThan %37 %849 %40 %251 = OpLogicalAnd %37 %248 %250 OpLoopMerge %244 %245 None OpBranchConditional %251 %243 %244 %243 = OpLabel OpBranch %253 %253 = OpLabel %946 = OpPhi %37 %947 %243 %1323 %256 %906 = OpPhi %6 %907 %243 %584 %256 %851 = OpPhi %6 %849 %243 %582 %256 %850 = OpPhi %6 %9 %243 %580 %256 %259 = OpSLessThan %37 %850 %36 %261 = OpSLessThan %37 %851 %40 %262 = OpLogicalAnd %37 %259 %261 OpLoopMerge %255 %256 None OpBranchConditional %262 %254 %255 %254 = OpLabel OpBranch %264 %264 = OpLabel %945 = OpPhi %37 %946 %254 %1286 %267 %905 = OpPhi %6 %906 %254 %578 %267 %853 = OpPhi %6 %851 %254 %576 %267 %852 = OpPhi %6 %9 %254 %574 %267 %270 = OpSLessThan %37 %852 %36 %272 = OpSLessThan %37 %853 %40 %273 = OpLogicalAnd %37 %270 %272 OpLoopMerge %266 %267 None OpBranchConditional %273 %265 %266 %265 = OpLabel OpBranch %275 %275 = OpLabel %944 = OpPhi %37 %945 %265 %1251 %278 %904 = OpPhi %6 %905 %265 %572 %278 %855 = OpPhi %6 %853 %265 %570 %278 %854 = OpPhi %6 %9 %265 %568 %278 %281 = OpSLessThan %37 %854 %36 %283 = OpSLessThan %37 %855 %40 %284 = OpLogicalAnd %37 %281 %283 OpLoopMerge %277 %278 None OpBranchConditional %284 %276 %277 %276 = OpLabel OpBranch %286 %286 = OpLabel %943 = OpPhi %37 %944 %276 %1218 %289 %903 = OpPhi %6 %904 %276 %566 %289 %857 = OpPhi %6 %855 %276 %564 %289 %856 = OpPhi %6 %9 %276 %562 %289 %292 = OpSLessThan %37 %856 %36 %294 = OpSLessThan %37 %857 %40 %295 = OpLogicalAnd %37 %292 %294 OpLoopMerge %288 %289 None OpBranchConditional %295 %287 %288 %287 = OpLabel OpBranch %297 %297 = OpLabel %942 = OpPhi %37 %943 %287 %1187 %300 %902 = OpPhi %6 %903 %287 %560 %300 %859 = OpPhi %6 %857 %287 %558 %300 %858 = OpPhi %6 %9 %287 %556 %300 %303 = OpSLessThan %37 %858 %36 %305 = OpSLessThan %37 %859 %40 %306 = OpLogicalAnd %37 %303 %305 OpLoopMerge %299 %300 None OpBranchConditional %306 %298 %299 %298 = OpLabel OpBranch %308 %308 = OpLabel %941 = OpPhi %37 %942 %298 %1158 %311 %901 = OpPhi %6 %902 %298 %554 %311 %861 = OpPhi %6 %859 %298 %552 %311 %860 = OpPhi %6 %9 %298 %550 %311 %314 = OpSLessThan %37 %860 %36 %316 = OpSLessThan %37 %861 %40 %317 = OpLogicalAnd %37 %314 %316 OpLoopMerge %310 %311 None OpBranchConditional %317 %309 %310 %309 = OpLabel OpBranch %319 %319 = OpLabel %940 = OpPhi %37 %941 %309 %1131 %322 %900 = OpPhi %6 %901 %309 %548 %322 %863 = OpPhi %6 %861 %309 %546 %322 %862 = OpPhi %6 %9 %309 %544 %322 %325 = OpSLessThan %37 %862 %36 %327 = OpSLessThan %37 %863 %40 %328 = OpLogicalAnd %37 %325 %327 OpLoopMerge %321 %322 None OpBranchConditional %328 %320 %321 %320 = OpLabel OpBranch %330 %330 = OpLabel %939 = OpPhi %37 %940 %320 %1106 %333 %899 = OpPhi %6 %900 %320 %542 %333 %865 = OpPhi %6 %863 %320 %540 %333 %864 = OpPhi %6 %9 %320 %538 %333 %336 = OpSLessThan %37 %864 %36 %338 = OpSLessThan %37 %865 %40 %339 = OpLogicalAnd %37 %336 %338 OpLoopMerge %332 %333 None OpBranchConditional %339 %331 %332 %331 = OpLabel OpBranch %341 %341 = OpLabel %938 = OpPhi %37 %939 %331 %1083 %344 %898 = OpPhi %6 %899 %331 %536 %344 %867 = OpPhi %6 %865 %331 %534 %344 %866 = OpPhi %6 %9 %331 %532 %344 %347 = OpSLessThan %37 %866 %36 %349 = OpSLessThan %37 %867 %40 %350 = OpLogicalAnd %37 %347 %349 OpLoopMerge %343 %344 None OpBranchConditional %350 %342 %343 %342 = OpLabel OpBranch %352 %352 = OpLabel %937 = OpPhi %37 %938 %342 %1062 %355 %897 = OpPhi %6 %898 %342 %530 %355 %869 = OpPhi %6 %867 %342 %528 %355 %868 = OpPhi %6 %9 %342 %526 %355 %358 = OpSLessThan %37 %868 %36 %360 = OpSLessThan %37 %869 %40 %361 = OpLogicalAnd %37 %358 %360 OpLoopMerge %354 %355 None OpBranchConditional %361 %353 %354 %353 = OpLabel OpBranch %363 %363 = OpLabel %936 = OpPhi %37 %937 %353 %1043 %366 %896 = OpPhi %6 %897 %353 %524 %366 %871 = OpPhi %6 %869 %353 %522 %366 %870 = OpPhi %6 %9 %353 %520 %366 %369 = OpSLessThan %37 %870 %36 %371 = OpSLessThan %37 %871 %40 %372 = OpLogicalAnd %37 %369 %371 OpLoopMerge %365 %366 None OpBranchConditional %372 %364 %365 %364 = OpLabel OpBranch %374 %374 = OpLabel %935 = OpPhi %37 %936 %364 %1026 %377 %895 = OpPhi %6 %896 %364 %518 %377 %873 = OpPhi %6 %871 %364 %516 %377 %872 = OpPhi %6 %9 %364 %514 %377 %380 = OpSLessThan %37 %872 %36 %382 = OpSLessThan %37 %873 %40 %383 = OpLogicalAnd %37 %380 %382 OpLoopMerge %376 %377 None OpBranchConditional %383 %375 %376 %375 = OpLabel OpBranch %385 %385 = OpLabel %934 = OpPhi %37 %935 %375 %1011 %388 %894 = OpPhi %6 %895 %375 %512 %388 %875 = OpPhi %6 %873 %375 %510 %388 %874 = OpPhi %6 %9 %375 %508 %388 %391 = OpSLessThan %37 %874 %36 %393 = OpSLessThan %37 %875 %40 %394 = OpLogicalAnd %37 %391 %393 OpLoopMerge %387 %388 None OpBranchConditional %394 %386 %387 %386 = OpLabel OpBranch %396 %396 = OpLabel %933 = OpPhi %37 %934 %386 %998 %399 %893 = OpPhi %6 %894 %386 %506 %399 %877 = OpPhi %6 %875 %386 %504 %399 %876 = OpPhi %6 %9 %386 %502 %399 %402 = OpSLessThan %37 %876 %36 %404 = OpSLessThan %37 %877 %40 %405 = OpLogicalAnd %37 %402 %404 OpLoopMerge %398 %399 None OpBranchConditional %405 %397 %398 %397 = OpLabel OpBranch %407 %407 = OpLabel %932 = OpPhi %37 %933 %397 %987 %410 %892 = OpPhi %6 %893 %397 %500 %410 %879 = OpPhi %6 %877 %397 %498 %410 %878 = OpPhi %6 %9 %397 %496 %410 %413 = OpSLessThan %37 %878 %36 %415 = OpSLessThan %37 %879 %40 %416 = OpLogicalAnd %37 %413 %415 OpLoopMerge %409 %410 None OpBranchConditional %416 %408 %409 %408 = OpLabel OpBranch %418 %418 = OpLabel %931 = OpPhi %37 %932 %408 %978 %421 %891 = OpPhi %6 %892 %408 %494 %421 %881 = OpPhi %6 %879 %408 %492 %421 %880 = OpPhi %6 %9 %408 %490 %421 %424 = OpSLessThan %37 %880 %36 %426 = OpSLessThan %37 %881 %40 %427 = OpLogicalAnd %37 %424 %426 OpLoopMerge %420 %421 None OpBranchConditional %427 %419 %420 %419 = OpLabel OpBranch %429 %429 = OpLabel %930 = OpPhi %37 %931 %419 %971 %432 %890 = OpPhi %6 %891 %419 %488 %432 %883 = OpPhi %6 %881 %419 %486 %432 %882 = OpPhi %6 %9 %419 %484 %432 %435 = OpSLessThan %37 %882 %36 %437 = OpSLessThan %37 %883 %40 %438 = OpLogicalAnd %37 %435 %437 OpLoopMerge %431 %432 None OpBranchConditional %438 %430 %431 %430 = OpLabel OpBranch %440 %440 = OpLabel %929 = OpPhi %37 %930 %430 %927 %443 %889 = OpPhi %6 %890 %430 %482 %443 %885 = OpPhi %6 %883 %430 %480 %443 %884 = OpPhi %6 %9 %430 %478 %443 %446 = OpSLessThan %37 %884 %36 %448 = OpSLessThan %37 %885 %40 %449 = OpLogicalAnd %37 %446 %448 OpLoopMerge %442 %443 None OpBranchConditional %449 %441 %442 %441 = OpLabel OpBranch %451 %451 = OpLabel %888 = OpPhi %6 %889 %441 %476 %454 %887 = OpPhi %6 %885 %441 %474 %454 %886 = OpPhi %6 %9 %441 %472 %454 %457 = OpSLessThan %37 %886 %36 %459 = OpSLessThan %37 %887 %40 %460 = OpLogicalAnd %37 %457 %459 OpLoopMerge %453 %454 None OpBranchConditional %460 %452 %453 %452 = OpLabel %464 = OpAccessChain %463 %16 %462 %465 = OpLoad %10 %464 %466 = OpFOrdLessThan %37 %465 %22 OpSelectionMerge %468 None OpBranchConditional %466 %467 %468 %467 = OpLabel OpBranch %453 %468 = OpLabel OpBranch %454 %454 = OpLabel %472 = OpIAdd %6 %886 %471 %474 = OpIAdd %6 %887 %471 %476 = OpIAdd %6 %888 %471 OpBranch %451 %453 = OpLabel %927 = OpPhi %37 %929 %451 %729 %467 OpSelectionMerge %730 None OpBranchConditional %927 %442 %730 %730 = OpLabel OpBranch %443 %443 = OpLabel %478 = OpIAdd %6 %884 %471 %480 = OpIAdd %6 %887 %471 %482 = OpIAdd %6 %888 %471 OpBranch %440 %442 = OpLabel %977 = OpPhi %6 %889 %440 %888 %453 %976 = OpPhi %6 %885 %440 %887 %453 %971 = OpPhi %37 %929 %440 %927 %453 OpSelectionMerge %732 None OpBranchConditional %971 %431 %732 %732 = OpLabel OpBranch %432 %432 = OpLabel %484 = OpIAdd %6 %882 %471 %486 = OpIAdd %6 %976 %471 %488 = OpIAdd %6 %977 %471 OpBranch %429 %431 = OpLabel %986 = OpPhi %6 %890 %429 %977 %442 %985 = OpPhi %6 %883 %429 %976 %442 %978 = OpPhi %37 %930 %429 %971 %442 OpSelectionMerge %734 None OpBranchConditional %978 %420 %734 %734 = OpLabel OpBranch %421 %421 = OpLabel %490 = OpIAdd %6 %880 %471 %492 = OpIAdd %6 %985 %471 %494 = OpIAdd %6 %986 %471 OpBranch %418 %420 = OpLabel %997 = OpPhi %6 %891 %418 %986 %431 %996 = OpPhi %6 %881 %418 %985 %431 %987 = OpPhi %37 %931 %418 %978 %431 OpSelectionMerge %736 None OpBranchConditional %987 %409 %736 %736 = OpLabel OpBranch %410 %410 = OpLabel %496 = OpIAdd %6 %878 %471 %498 = OpIAdd %6 %996 %471 %500 = OpIAdd %6 %997 %471 OpBranch %407 %409 = OpLabel %1010 = OpPhi %6 %892 %407 %997 %420 %1009 = OpPhi %6 %879 %407 %996 %420 %998 = OpPhi %37 %932 %407 %987 %420 OpSelectionMerge %738 None OpBranchConditional %998 %398 %738 %738 = OpLabel OpBranch %399 %399 = OpLabel %502 = OpIAdd %6 %876 %471 %504 = OpIAdd %6 %1009 %471 %506 = OpIAdd %6 %1010 %471 OpBranch %396 %398 = OpLabel %1025 = OpPhi %6 %893 %396 %1010 %409 %1024 = OpPhi %6 %877 %396 %1009 %409 %1011 = OpPhi %37 %933 %396 %998 %409 OpSelectionMerge %740 None OpBranchConditional %1011 %387 %740 %740 = OpLabel OpBranch %388 %388 = OpLabel %508 = OpIAdd %6 %874 %471 %510 = OpIAdd %6 %1024 %471 %512 = OpIAdd %6 %1025 %471 OpBranch %385 %387 = OpLabel %1042 = OpPhi %6 %894 %385 %1025 %398 %1041 = OpPhi %6 %875 %385 %1024 %398 %1026 = OpPhi %37 %934 %385 %1011 %398 OpSelectionMerge %742 None OpBranchConditional %1026 %376 %742 %742 = OpLabel OpBranch %377 %377 = OpLabel %514 = OpIAdd %6 %872 %471 %516 = OpIAdd %6 %1041 %471 %518 = OpIAdd %6 %1042 %471 OpBranch %374 %376 = OpLabel %1061 = OpPhi %6 %895 %374 %1042 %387 %1060 = OpPhi %6 %873 %374 %1041 %387 %1043 = OpPhi %37 %935 %374 %1026 %387 OpSelectionMerge %744 None OpBranchConditional %1043 %365 %744 %744 = OpLabel OpBranch %366 %366 = OpLabel %520 = OpIAdd %6 %870 %471 %522 = OpIAdd %6 %1060 %471 %524 = OpIAdd %6 %1061 %471 OpBranch %363 %365 = OpLabel %1082 = OpPhi %6 %896 %363 %1061 %376 %1081 = OpPhi %6 %871 %363 %1060 %376 %1062 = OpPhi %37 %936 %363 %1043 %376 OpSelectionMerge %746 None OpBranchConditional %1062 %354 %746 %746 = OpLabel OpBranch %355 %355 = OpLabel %526 = OpIAdd %6 %868 %471 %528 = OpIAdd %6 %1081 %471 %530 = OpIAdd %6 %1082 %471 OpBranch %352 %354 = OpLabel %1105 = OpPhi %6 %897 %352 %1082 %365 %1104 = OpPhi %6 %869 %352 %1081 %365 %1083 = OpPhi %37 %937 %352 %1062 %365 OpSelectionMerge %748 None OpBranchConditional %1083 %343 %748 %748 = OpLabel OpBranch %344 %344 = OpLabel %532 = OpIAdd %6 %866 %471 %534 = OpIAdd %6 %1104 %471 %536 = OpIAdd %6 %1105 %471 OpBranch %341 %343 = OpLabel %1130 = OpPhi %6 %898 %341 %1105 %354 %1129 = OpPhi %6 %867 %341 %1104 %354 %1106 = OpPhi %37 %938 %341 %1083 %354 OpSelectionMerge %750 None OpBranchConditional %1106 %332 %750 %750 = OpLabel OpBranch %333 %333 = OpLabel %538 = OpIAdd %6 %864 %471 %540 = OpIAdd %6 %1129 %471 %542 = OpIAdd %6 %1130 %471 OpBranch %330 %332 = OpLabel %1157 = OpPhi %6 %899 %330 %1130 %343 %1156 = OpPhi %6 %865 %330 %1129 %343 %1131 = OpPhi %37 %939 %330 %1106 %343 OpSelectionMerge %752 None OpBranchConditional %1131 %321 %752 %752 = OpLabel OpBranch %322 %322 = OpLabel %544 = OpIAdd %6 %862 %471 %546 = OpIAdd %6 %1156 %471 %548 = OpIAdd %6 %1157 %471 OpBranch %319 %321 = OpLabel %1186 = OpPhi %6 %900 %319 %1157 %332 %1185 = OpPhi %6 %863 %319 %1156 %332 %1158 = OpPhi %37 %940 %319 %1131 %332 OpSelectionMerge %754 None OpBranchConditional %1158 %310 %754 %754 = OpLabel OpBranch %311 %311 = OpLabel %550 = OpIAdd %6 %860 %471 %552 = OpIAdd %6 %1185 %471 %554 = OpIAdd %6 %1186 %471 OpBranch %308 %310 = OpLabel %1217 = OpPhi %6 %901 %308 %1186 %321 %1216 = OpPhi %6 %861 %308 %1185 %321 %1187 = OpPhi %37 %941 %308 %1158 %321 OpSelectionMerge %756 None OpBranchConditional %1187 %299 %756 %756 = OpLabel OpBranch %300 %300 = OpLabel %556 = OpIAdd %6 %858 %471 %558 = OpIAdd %6 %1216 %471 %560 = OpIAdd %6 %1217 %471 OpBranch %297 %299 = OpLabel %1250 = OpPhi %6 %902 %297 %1217 %310 %1249 = OpPhi %6 %859 %297 %1216 %310 %1218 = OpPhi %37 %942 %297 %1187 %310 OpSelectionMerge %758 None OpBranchConditional %1218 %288 %758 %758 = OpLabel OpBranch %289 %289 = OpLabel %562 = OpIAdd %6 %856 %471 %564 = OpIAdd %6 %1249 %471 %566 = OpIAdd %6 %1250 %471 OpBranch %286 %288 = OpLabel %1285 = OpPhi %6 %903 %286 %1250 %299 %1284 = OpPhi %6 %857 %286 %1249 %299 %1251 = OpPhi %37 %943 %286 %1218 %299 OpSelectionMerge %760 None OpBranchConditional %1251 %277 %760 %760 = OpLabel OpBranch %278 %278 = OpLabel %568 = OpIAdd %6 %854 %471 %570 = OpIAdd %6 %1284 %471 %572 = OpIAdd %6 %1285 %471 OpBranch %275 %277 = OpLabel %1322 = OpPhi %6 %904 %275 %1285 %288 %1321 = OpPhi %6 %855 %275 %1284 %288 %1286 = OpPhi %37 %944 %275 %1251 %288 OpSelectionMerge %762 None OpBranchConditional %1286 %266 %762 %762 = OpLabel OpBranch %267 %267 = OpLabel %574 = OpIAdd %6 %852 %471 %576 = OpIAdd %6 %1321 %471 %578 = OpIAdd %6 %1322 %471 OpBranch %264 %266 = OpLabel %1361 = OpPhi %6 %905 %264 %1322 %277 %1360 = OpPhi %6 %853 %264 %1321 %277 %1323 = OpPhi %37 %945 %264 %1286 %277 OpSelectionMerge %764 None OpBranchConditional %1323 %255 %764 %764 = OpLabel OpBranch %256 %256 = OpLabel %580 = OpIAdd %6 %850 %471 %582 = OpIAdd %6 %1360 %471 %584 = OpIAdd %6 %1361 %471 OpBranch %253 %255 = OpLabel %1402 = OpPhi %6 %906 %253 %1361 %266 %1401 = OpPhi %6 %851 %253 %1360 %266 %1362 = OpPhi %37 %946 %253 %1323 %266 OpSelectionMerge %766 None OpBranchConditional %1362 %244 %766 %766 = OpLabel OpBranch %245 %245 = OpLabel %586 = OpIAdd %6 %848 %471 %588 = OpIAdd %6 %1401 %471 %590 = OpIAdd %6 %1402 %471 OpBranch %242 %244 = OpLabel %1445 = OpPhi %6 %907 %242 %1402 %255 %1444 = OpPhi %6 %849 %242 %1401 %255 %1403 = OpPhi %37 %947 %242 %1362 %255 OpSelectionMerge %768 None OpBranchConditional %1403 %233 %768 %768 = OpLabel OpBranch %234 %234 = OpLabel %592 = OpIAdd %6 %846 %471 %594 = OpIAdd %6 %1444 %471 %596 = OpIAdd %6 %1445 %471 OpBranch %231 %233 = OpLabel %1490 = OpPhi %6 %908 %231 %1445 %244 %1489 = OpPhi %6 %847 %231 %1444 %244 %1446 = OpPhi %37 %948 %231 %1403 %244 OpSelectionMerge %770 None OpBranchConditional %1446 %222 %770 %770 = OpLabel OpBranch %223 %223 = OpLabel %598 = OpIAdd %6 %844 %471 %600 = OpIAdd %6 %1489 %471 %602 = OpIAdd %6 %1490 %471 OpBranch %220 %222 = OpLabel %1537 = OpPhi %6 %909 %220 %1490 %233 %1536 = OpPhi %6 %845 %220 %1489 %233 %1491 = OpPhi %37 %949 %220 %1446 %233 OpSelectionMerge %772 None OpBranchConditional %1491 %211 %772 %772 = OpLabel OpBranch %212 %212 = OpLabel %604 = OpIAdd %6 %842 %471 %606 = OpIAdd %6 %1536 %471 %608 = OpIAdd %6 %1537 %471 OpBranch %209 %211 = OpLabel %1586 = OpPhi %6 %910 %209 %1537 %222 %1585 = OpPhi %6 %843 %209 %1536 %222 %1538 = OpPhi %37 %950 %209 %1491 %222 OpSelectionMerge %774 None OpBranchConditional %1538 %200 %774 %774 = OpLabel OpBranch %201 %201 = OpLabel %610 = OpIAdd %6 %840 %471 %612 = OpIAdd %6 %1585 %471 %614 = OpIAdd %6 %1586 %471 OpBranch %198 %200 = OpLabel %1637 = OpPhi %6 %911 %198 %1586 %211 %1636 = OpPhi %6 %841 %198 %1585 %211 %1587 = OpPhi %37 %951 %198 %1538 %211 OpSelectionMerge %776 None OpBranchConditional %1587 %189 %776 %776 = OpLabel OpBranch %190 %190 = OpLabel %616 = OpIAdd %6 %838 %471 %618 = OpIAdd %6 %1636 %471 %620 = OpIAdd %6 %1637 %471 OpBranch %187 %189 = OpLabel %1690 = OpPhi %6 %912 %187 %1637 %200 %1689 = OpPhi %6 %839 %187 %1636 %200 %1638 = OpPhi %37 %952 %187 %1587 %200 OpSelectionMerge %778 None OpBranchConditional %1638 %178 %778 %778 = OpLabel OpBranch %179 %179 = OpLabel %622 = OpIAdd %6 %836 %471 %624 = OpIAdd %6 %1689 %471 %626 = OpIAdd %6 %1690 %471 OpBranch %176 %178 = OpLabel %1745 = OpPhi %6 %913 %176 %1690 %189 %1744 = OpPhi %6 %837 %176 %1689 %189 %1691 = OpPhi %37 %953 %176 %1638 %189 OpSelectionMerge %780 None OpBranchConditional %1691 %167 %780 %780 = OpLabel OpBranch %168 %168 = OpLabel %628 = OpIAdd %6 %834 %471 %630 = OpIAdd %6 %1744 %471 %632 = OpIAdd %6 %1745 %471 OpBranch %165 %167 = OpLabel %1802 = OpPhi %6 %914 %165 %1745 %178 %1801 = OpPhi %6 %835 %165 %1744 %178 %1746 = OpPhi %37 %954 %165 %1691 %178 OpSelectionMerge %782 None OpBranchConditional %1746 %156 %782 %782 = OpLabel OpBranch %157 %157 = OpLabel %634 = OpIAdd %6 %832 %471 %636 = OpIAdd %6 %1801 %471 %638 = OpIAdd %6 %1802 %471 OpBranch %154 %156 = OpLabel %1861 = OpPhi %6 %915 %154 %1802 %167 %1860 = OpPhi %6 %833 %154 %1801 %167 %1803 = OpPhi %37 %955 %154 %1746 %167 OpSelectionMerge %784 None OpBranchConditional %1803 %145 %784 %784 = OpLabel OpBranch %146 %146 = OpLabel %640 = OpIAdd %6 %830 %471 %642 = OpIAdd %6 %1860 %471 %644 = OpIAdd %6 %1861 %471 OpBranch %143 %145 = OpLabel %1922 = OpPhi %6 %916 %143 %1861 %156 %1921 = OpPhi %6 %831 %143 %1860 %156 %1862 = OpPhi %37 %956 %143 %1803 %156 OpSelectionMerge %786 None OpBranchConditional %1862 %134 %786 %786 = OpLabel OpBranch %135 %135 = OpLabel %646 = OpIAdd %6 %828 %471 %648 = OpIAdd %6 %1921 %471 %650 = OpIAdd %6 %1922 %471 OpBranch %132 %134 = OpLabel %1985 = OpPhi %6 %917 %132 %1922 %145 %1984 = OpPhi %6 %829 %132 %1921 %145 %1923 = OpPhi %37 %957 %132 %1862 %145 OpSelectionMerge %788 None OpBranchConditional %1923 %123 %788 %788 = OpLabel OpBranch %124 %124 = OpLabel %652 = OpIAdd %6 %826 %471 %654 = OpIAdd %6 %1984 %471 %656 = OpIAdd %6 %1985 %471 OpBranch %121 %123 = OpLabel %2050 = OpPhi %6 %918 %121 %1985 %134 %2049 = OpPhi %6 %827 %121 %1984 %134 %1986 = OpPhi %37 %958 %121 %1923 %134 OpSelectionMerge %790 None OpBranchConditional %1986 %112 %790 %790 = OpLabel OpBranch %113 %113 = OpLabel %658 = OpIAdd %6 %824 %471 %660 = OpIAdd %6 %2049 %471 %662 = OpIAdd %6 %2050 %471 OpBranch %110 %112 = OpLabel %2117 = OpPhi %6 %919 %110 %2050 %123 %2116 = OpPhi %6 %825 %110 %2049 %123 %2051 = OpPhi %37 %959 %110 %1986 %123 OpSelectionMerge %792 None OpBranchConditional %2051 %101 %792 %792 = OpLabel OpBranch %102 %102 = OpLabel %664 = OpIAdd %6 %822 %471 %666 = OpIAdd %6 %2116 %471 %668 = OpIAdd %6 %2117 %471 OpBranch %99 %101 = OpLabel %2186 = OpPhi %6 %920 %99 %2117 %112 %2185 = OpPhi %6 %823 %99 %2116 %112 %2118 = OpPhi %37 %960 %99 %2051 %112 OpSelectionMerge %794 None OpBranchConditional %2118 %90 %794 %794 = OpLabel OpBranch %91 %91 = OpLabel %670 = OpIAdd %6 %820 %471 %672 = OpIAdd %6 %2185 %471 %674 = OpIAdd %6 %2186 %471 OpBranch %88 %90 = OpLabel %2257 = OpPhi %6 %921 %88 %2186 %101 %2256 = OpPhi %6 %821 %88 %2185 %101 %2187 = OpPhi %37 %961 %88 %2118 %101 OpSelectionMerge %796 None OpBranchConditional %2187 %79 %796 %796 = OpLabel OpBranch %80 %80 = OpLabel %676 = OpIAdd %6 %818 %471 %678 = OpIAdd %6 %2256 %471 %680 = OpIAdd %6 %2257 %471 OpBranch %77 %79 = OpLabel %2330 = OpPhi %6 %922 %77 %2257 %90 %2329 = OpPhi %6 %819 %77 %2256 %90 %2258 = OpPhi %37 %962 %77 %2187 %90 OpSelectionMerge %798 None OpBranchConditional %2258 %68 %798 %798 = OpLabel OpBranch %69 %69 = OpLabel %682 = OpIAdd %6 %816 %471 %684 = OpIAdd %6 %2329 %471 %686 = OpIAdd %6 %2330 %471 OpBranch %66 %68 = OpLabel %2405 = OpPhi %6 %923 %66 %2330 %79 %2404 = OpPhi %6 %817 %66 %2329 %79 %2331 = OpPhi %37 %963 %66 %2258 %79 OpSelectionMerge %800 None OpBranchConditional %2331 %57 %800 %800 = OpLabel OpBranch %58 %58 = OpLabel %688 = OpIAdd %6 %814 %471 %690 = OpIAdd %6 %2404 %471 %692 = OpIAdd %6 %2405 %471 OpBranch %55 %57 = OpLabel %2482 = OpPhi %6 %924 %55 %2405 %68 %2481 = OpPhi %6 %815 %55 %2404 %68 %2406 = OpPhi %37 %964 %55 %2331 %68 OpSelectionMerge %802 None OpBranchConditional %2406 %46 %802 %802 = OpLabel OpBranch %47 %47 = OpLabel %694 = OpIAdd %6 %812 %471 %696 = OpIAdd %6 %2481 %471 %698 = OpIAdd %6 %2482 %471 OpBranch %44 %46 = OpLabel %2561 = OpPhi %6 %925 %44 %2482 %57 %2560 = OpPhi %6 %813 %44 %2481 %57 %2483 = OpPhi %37 %965 %44 %2406 %57 OpSelectionMerge %804 None OpBranchConditional %2483 %32 %804 %804 = OpLabel OpBranch %33 %33 = OpLabel %700 = OpIAdd %6 %810 %471 %702 = OpIAdd %6 %2560 %471 %704 = OpIAdd %6 %2561 %471 OpBranch %30 %32 = OpLabel %2563 = OpPhi %6 %926 %30 %2561 %46 %2562 = OpPhi %37 %966 %30 %2483 %46 OpSelectionMerge %806 None OpBranchConditional %2562 %724 %806 %806 = OpLabel %708 = OpDPdx %10 %24 %712 = OpDPdy %10 %25 %713 = OpFSub %10 %708 %712 %714 = OpFOrdEqual %37 %713 %22 %717 = OpIEqual %37 %2563 %716 %718 = OpLogicalAnd %37 %714 %717 OpSelectionMerge %720 None OpBranchConditional %718 %719 %722 %719 = OpLabel OpStore %20 %721 OpBranch %720 %722 = OpLabel OpStore %20 %723 OpBranch %720 %720 = OpLabel OpBranch %724 %724 = OpLabel OpReturn OpFunctionEnd END # uniforms for variant BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM PIPELINE graphics variant_pipeline ATTACH variant_vertex_shader ATTACH variant_fragment_shader FRAMEBUFFER_SIZE 16 16 BIND BUFFER variant_framebuffer AS color LOCATION 0 END CLEAR_COLOR variant_pipeline 0 0 0 255 CLEAR variant_pipeline RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 16 16 EXPECT variant_framebuffer IDX 0 0 SIZE 16 16 EQ_RGBA 255 0 0 255