blob: a8b0d8ccfc495a785d045bfa6e3b00250800d3bd [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 70
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "zero"
OpName %x_6 "x_6"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %a "a"
OpName %b "b"
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_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%buf0 = OpTypeStruct %int
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%float = OpTypeFloat 32
%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
%void = OpTypeVoid
%12 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
%_ptr_Function_v2float = OpTypePointer Function %v2float
%19 = OpConstantNull %v2float
%float_1 = OpConstant %float 1
%22 = OpConstantComposite %v2float %float_1 %float_1
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%_ptr_Function_float = OpTypePointer Function %float
%uint_1 = OpConstant %uint 1
%float_2 = OpConstant %float 2
%float_3 = OpConstant %float 3
%44 = OpConstantComposite %v2float %float_2 %float_3
%float_4 = OpConstant %float 4
%49 = OpConstantComposite %v2float %float_3 %float_4
%v2bool = OpTypeVector %bool 2
%float_0 = OpConstant %float 0
%56 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%57 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%58 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%a = OpVariable %_ptr_Function_v2float Function %19
%b = OpVariable %_ptr_Function_v2float Function %19
OpStore %a %22
%26 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0
%27 = OpLoad %int %26
%29 = OpIEqual %bool %27 %int_1
OpSelectionMerge %31 None
OpBranchConditional %29 %32 %31
%32 = OpLabel
%34 = OpAccessChain %_ptr_Function_float %a %uint_0
%35 = OpLoad %float %34
%36 = OpAccessChain %_ptr_Function_float %a %uint_0
%37 = OpFAdd %float %35 %float_1
OpStore %36 %37
OpBranch %31
%31 = OpLabel
%39 = OpAccessChain %_ptr_Function_float %a %uint_1
%40 = OpLoad %float %39
%41 = OpCompositeConstruct %v2float %40 %40
%45 = OpFAdd %v2float %41 %44
OpStore %b %45
%46 = OpLoad %v2float %b
%50 = OpFOrdEqual %v2bool %46 %49
%47 = OpAll %bool %50
OpSelectionMerge %52 None
OpBranchConditional %47 %53 %54
%53 = OpLabel
OpStore %x_GLF_color %56
OpBranch %52
%54 = OpLabel
OpStore %x_GLF_color %57
OpBranch %52
%52 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %58
%tint_symbol = OpFunctionParameter %main_out
%62 = OpLabel
%63 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %63
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
%65 = OpLabel
%66 = OpFunctionCall %void %main_1
%68 = OpLoad %v4float %x_GLF_color
%69 = OpCompositeConstruct %main_out %68
%67 = OpFunctionCall %void %tint_symbol_2 %69
OpReturn
OpFunctionEnd