blob: e24ad6d14a40ab58bfe07509363649982967f4ec [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 68
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color "x_GLF_color"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "zero"
OpName %x_5 "x_5"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %x_9 "x_9"
OpName %x_10_phi "x_10_phi"
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_5 NonWritable
OpDecorate %x_5 DescriptorSet 0
OpDecorate %x_5 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpDecorate %_arr_int_uint_1 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%5 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%int = OpTypeInt 32 1
%buf0 = OpTypeStruct %int
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_5 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
%void = OpTypeVoid
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_arr_int_uint_1 = OpTypeArray %int %uint_1
%_ptr_Function__arr_int_uint_1 = OpTypePointer Function %_arr_int_uint_1
%21 = OpConstantNull %_arr_int_uint_1
%_ptr_Function_int = OpTypePointer Function %int
%24 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%float_0 = OpConstant %float 0
%33 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%float_1 = OpConstant %float 1
%55 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%56 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%x_9 = OpVariable %_ptr_Function__arr_int_uint_1 Function %21
%x_10_phi = OpVariable %_ptr_Function_int Function %24
%25 = OpLoad %_arr_int_uint_1 %x_9
%27 = OpCompositeExtract %int %25 0
OpBranch %28
%28 = OpLabel
OpLoopMerge %29 %30 None
OpBranch %31
%31 = OpLabel
OpStore %x_GLF_color %33
%35 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0
%36 = OpLoad %int %35
%37 = OpAccessChain %_ptr_Function_int %x_9 %36
%38 = OpLoad %int %37
%39 = OpIEqual %bool %38 %27
OpSelectionMerge %41 None
OpBranchConditional %39 %42 %41
%42 = OpLabel
OpStore %x_10_phi %int_1
OpBranch %29
%41 = OpLabel
OpStore %x_10_phi %int_2
OpBranch %29
%30 = OpLabel
OpBranch %28
%29 = OpLabel
%45 = OpLoad %int %x_10_phi
%46 = OpIEqual %bool %45 %int_1
OpSelectionMerge %47 None
OpBranchConditional %46 %47 %48
%48 = OpLabel
%49 = OpIEqual %bool %45 %int_2
OpBranch %47
%47 = OpLabel
%50 = OpPhi %bool %46 %29 %49 %48
OpSelectionMerge %51 None
OpBranchConditional %50 %52 %53
%52 = OpLabel
OpStore %x_GLF_color %55
OpBranch %51
%53 = OpLabel
OpStore %x_GLF_color %33
OpBranch %51
%51 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %56
%tint_symbol = OpFunctionParameter %main_out
%60 = OpLabel
%61 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %61
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
%63 = OpLabel
%64 = OpFunctionCall %void %main_1
%66 = OpLoad %v4float %x_GLF_color
%67 = OpCompositeConstruct %main_out %66
%65 = OpFunctionCall %void %tint_symbol_2 %67
OpReturn
OpFunctionEnd