blob: 0b4c094fb267f0ef92ab643f9e288ba1c90b89a2 [file] [log] [blame]
; Copyright 2013 The Flutter Authors. All rights reserved.
; Use of this source code is governed by a BSD-style license that can be
; found in the LICENSE file.
;
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 38
; Schema: 0
;
; Block %14 branches unconditionally to a block with no conditional-branch
; despite declaring a LoopMerge.
;
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %oColor
OpExecutionMode %main OriginLowerLeft
OpSource GLSL 450
OpName %main "main"
OpName %oColor "oColor"
OpName %i "i"
OpName %a "a"
OpDecorate %oColor Location 0
OpDecorate %a Location 0
%void = OpTypeVoid
%3 = OpTypeFunction %void
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%oColor = OpVariable %_ptr_Output_v4float Output
%float_0 = OpConstant %float 0
%11 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%_ptr_Function_float = OpTypePointer Function %float
%float_10 = OpConstant %float 10
%bool = OpTypeBool
%_ptr_UniformConstant_float = OpTypePointer UniformConstant %float
%a = OpVariable %_ptr_UniformConstant_float UniformConstant
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Output_float = OpTypePointer Output %float
%float_1 = OpConstant %float 1
%uint_3 = OpConstant %uint 3
%main = OpFunction %void None %3
%5 = OpLabel
%i = OpVariable %_ptr_Function_float Function
OpStore %oColor %11
OpStore %i %float_0
OpBranch %14
%14 = OpLabel
OpLoopMerge %16 %17 None
OpBranch %16
%18 = OpLabel
%19 = OpLoad %float %i
%22 = OpFOrdLessThan %bool %19 %float_10
OpBranchConditional %22 %15 %16
%15 = OpLabel
%25 = OpLoad %float %a
%29 = OpAccessChain %_ptr_Output_float %oColor %uint_0
%30 = OpLoad %float %29
%31 = OpFAdd %float %30 %25
%32 = OpAccessChain %_ptr_Output_float %oColor %uint_0
OpStore %32 %31
OpBranch %17
%17 = OpLabel
%33 = OpLoad %float %i
%35 = OpFAdd %float %33 %float_1
OpStore %i %35
OpBranch %14
%16 = OpLabel
%37 = OpAccessChain %_ptr_Output_float %oColor %uint_3
OpStore %37 %float_1
OpReturn
OpFunctionEnd