blob: 8b3fe7b30b12aa667acc46c5caf13eb8f8fa5620 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 88
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_7 "x_7"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %func_ "func_"
OpName %loop_count "loop_count"
OpName %x_38_phi "x_38_phi"
OpName %x_39 "x_39"
OpName %x_45_phi "x_45_phi"
OpName %main_1 "main_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %tint_symbol "tint_symbol"
OpName %main "main"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%9 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %9
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %9
%int = OpTypeInt 32 1
%12 = OpTypeFunction %int
%_ptr_Function_int = OpTypePointer Function %int
%18 = OpConstantNull %int
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%uint_1 = OpConstant %uint 1
%bool = OpTypeBool
%int_100 = OpConstant %int 100
%void = OpTypeVoid
%63 = OpTypeFunction %void
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%74 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%75 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%main_out = OpTypeStruct %v4float
%76 = OpTypeFunction %void %main_out
%func_ = OpFunction %int None %12
%15 = OpLabel
%loop_count = OpVariable %_ptr_Function_int Function %18
%x_38_phi = OpVariable %_ptr_Function_int Function %18
%x_39 = OpVariable %_ptr_Function_int Function %18
%x_45_phi = OpVariable %_ptr_Function_int Function %18
OpStore %loop_count %int_0
OpStore %x_38_phi %int_0
OpBranch %21
%21 = OpLabel
OpLoopMerge %22 %23 None
OpBranch %24
%24 = OpLabel
%27 = OpLoad %int %x_38_phi
%29 = OpIAdd %int %27 %int_1
OpStore %loop_count %29
OpStore %x_45_phi %29
OpBranch %30
%30 = OpLabel
OpLoopMerge %31 %32 None
OpBranch %33
%33 = OpLabel
%34 = OpLoad %int %x_45_phi
%35 = OpIAdd %int %34 %int_1
OpStore %x_39 %35
%36 = OpLoad %int %x_39
OpStore %loop_count %36
%40 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %uint_0
%41 = OpLoad %float %40
%43 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %uint_1
%44 = OpLoad %float %43
%45 = OpFOrdLessThan %bool %41 %44
OpSelectionMerge %47 None
OpBranchConditional %45 %48 %47
%48 = OpLabel
OpReturnValue %int_1
%47 = OpLabel
%49 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %uint_0
%50 = OpLoad %float %49
%51 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %uint_1
%52 = OpLoad %float %51
%53 = OpFOrdLessThan %bool %50 %52
OpSelectionMerge %54 None
OpBranchConditional %53 %55 %54
%55 = OpLabel
OpBranch %31
%54 = OpLabel
OpBranch %32
%32 = OpLabel
%56 = OpLoad %int %x_39
OpStore %x_45_phi %56
%57 = OpLoad %int %x_39
%59 = OpSLessThan %bool %57 %int_100
OpBranchConditional %59 %30 %31
%31 = OpLabel
OpBranch %23
%23 = OpLabel
%60 = OpLoad %int %x_39
OpStore %x_38_phi %60
%61 = OpLoad %int %x_39
%62 = OpSLessThan %bool %61 %int_100
OpBranchConditional %62 %21 %22
%22 = OpLabel
OpReturnValue %int_0
OpFunctionEnd
%main_1 = OpFunction %void None %63
%66 = OpLabel
%67 = OpFunctionCall %int %func_
%68 = OpIEqual %bool %67 %int_1
OpSelectionMerge %69 None
OpBranchConditional %68 %70 %71
%70 = OpLabel
OpStore %x_GLF_color %74
OpBranch %69
%71 = OpLabel
OpStore %x_GLF_color %75
OpBranch %69
%69 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %76
%tint_symbol = OpFunctionParameter %main_out
%80 = OpLabel
%81 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %81
OpReturn
OpFunctionEnd
%main = OpFunction %void None %63
%83 = OpLabel
%84 = OpFunctionCall %void %main_1
%86 = OpLoad %v4float %x_GLF_color
%87 = OpCompositeConstruct %main_out %86
%85 = OpFunctionCall %void %tint_symbol_2 %87
OpReturn
OpFunctionEnd