blob: 6ec6c518451f28ca9d8c30deba7cfeaf4ff7adee [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 61
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %x_GLF_color "x_GLF_color"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_7 "x_7"
OpName %computeColor_ "computeColor_"
OpName %x_injected_loop_counter "x_injected_loop_counter"
OpName %main_1 "main_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %main "main"
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%v3float = OpTypeVector %float 3
%12 = OpTypeFunction %v3float
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%19 = OpConstantNull %int
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%22 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%int_1 = OpConstant %int 1
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%bool = OpTypeBool
%43 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%44 = OpConstantComposite %v3float %float_0 %float_0 %float_0
%void = OpTypeVoid
%45 = OpTypeFunction %void
%main_out = OpTypeStruct %v4float
%50 = OpTypeFunction %main_out
%computeColor_ = OpFunction %v3float None %12
%15 = OpLabel
%x_injected_loop_counter = OpVariable %_ptr_Function_int Function %19
OpStore %x_GLF_color %22
OpStore %x_injected_loop_counter %int_1
OpBranch %24
%24 = OpLabel
OpLoopMerge %25 %26 None
OpBranch %27
%27 = OpLabel
%31 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %uint_0
%32 = OpLoad %float %31
%33 = OpFOrdGreaterThan %bool %32 %float_1
OpSelectionMerge %35 None
OpBranchConditional %33 %36 %35
%36 = OpLabel
%37 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %uint_0
%38 = OpLoad %float %37
%39 = OpFOrdGreaterThan %bool %38 %float_1
OpSelectionMerge %40 None
OpBranchConditional %39 %41 %42
%41 = OpLabel
OpBranch %26
%42 = OpLabel
OpBranch %26
%40 = OpLabel
OpBranch %26
%35 = OpLabel
OpReturnValue %43
%26 = OpLabel
OpBranch %24
%25 = OpLabel
OpReturnValue %44
OpFunctionEnd
%main_1 = OpFunction %void None %45
%48 = OpLabel
%49 = OpFunctionCall %v3float %computeColor_
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %50
%53 = OpLabel
%54 = OpFunctionCall %void %main_1
%55 = OpLoad %v4float %x_GLF_color
%56 = OpCompositeConstruct %main_out %55
OpReturnValue %56
OpFunctionEnd
%main = OpFunction %void None %45
%58 = OpLabel
%59 = OpFunctionCall %main_out %main_inner
%60 = OpCompositeExtract %v4float %59 0
OpStore %x_GLF_color_1_1 %60
OpReturn
OpFunctionEnd