blob: b34c57907c26adfe5c36f18ec5b12e93eac5a7c2 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 122
; 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_8 "x_8"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %x_50 "x_50"
OpName %x_15 "x_15"
OpName %x_16 "x_16"
OpName %Array "Array"
OpMemberName %Array 0 "values"
OpName %param "param"
OpName %x_19 "x_19"
OpName %x_20_phi "x_20_phi"
OpName %x_19_phi "x_19_phi"
OpName %x_63_phi "x_63_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"
OpName %func_struct_Array_i1_2_1_ "func_struct_Array_i1_2_1_"
OpName %a "a"
OpName %x_70 "x_70"
OpName %x_12 "x_12"
OpName %x_13 "x_13"
OpName %x_72_phi "x_72_phi"
OpName %x_14_phi "x_14_phi"
OpName %x_77 "x_77"
OpName %x_77_phi "x_77_phi"
OpName %x_13_phi "x_13_phi"
OpName %x_87_phi "x_87_phi"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %Array 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%buf0 = OpTypeStruct %int
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_8 = 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
%bool = OpTypeBool
%false = OpConstantFalse %bool
%_ptr_Function_bool = OpTypePointer Function %bool
%20 = OpConstantNull %bool
%_ptr_Function_int = OpTypePointer Function %int
%23 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%Array = OpTypeStruct %_arr_int_uint_2
%_ptr_Function_Array = OpTypePointer Function %Array
%31 = OpConstantNull %Array
%int_0 = OpConstant %int 0
%35 = OpConstantComposite %_arr_int_uint_2 %int_0 %int_0
%36 = OpConstantComposite %Array %35
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%true = OpConstantTrue %bool
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%70 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%71 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%72 = OpTypeFunction %void %main_out
%84 = OpTypeFunction %int %_ptr_Function_Array
%main_1 = OpFunction %void None %12
%15 = OpLabel
%x_50 = OpVariable %_ptr_Function_bool Function %20
%x_15 = OpVariable %_ptr_Function_int Function %23
%x_16 = OpVariable %_ptr_Function_int Function %23
%param = OpVariable %_ptr_Function_Array Function %31
%x_19 = OpVariable %_ptr_Function_int Function %23
%x_20_phi = OpVariable %_ptr_Function_int Function %23
%x_19_phi = OpVariable %_ptr_Function_int Function %23
%x_63_phi = OpVariable %_ptr_Function_bool Function %20
OpStore %x_50 %false
OpStore %param %36
OpStore %x_50 %false
OpBranch %37
%37 = OpLabel
OpLoopMerge %38 %39 None
OpBranch %40
%40 = OpLabel
OpBranch %43
%43 = OpLabel
OpLoopMerge %44 %45 None
OpBranch %46
%46 = OpLabel
%49 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%50 = OpLoad %int %49
%51 = OpAccessChain %_ptr_Function_int %param %uint_0 %50
%52 = OpLoad %int %51
%54 = OpIEqual %bool %52 %int_1
OpSelectionMerge %55 None
OpBranchConditional %54 %56 %55
%56 = OpLabel
OpStore %x_50 %true
OpStore %x_15 %int_1
OpStore %x_19_phi %int_1
OpStore %x_63_phi %true
OpBranch %44
%55 = OpLabel
OpStore %x_19_phi %int_0
OpStore %x_63_phi %false
OpBranch %44
%45 = OpLabel
OpBranch %43
%44 = OpLabel
%58 = OpLoad %int %x_19_phi
OpStore %x_19 %58
%59 = OpLoad %bool %x_63_phi
%60 = OpLoad %int %x_19
OpStore %x_20_phi %60
OpSelectionMerge %61 None
OpBranchConditional %59 %62 %61
%62 = OpLabel
OpBranch %38
%61 = OpLabel
OpStore %x_50 %true
OpStore %x_15 %int_1
OpStore %x_20_phi %int_1
OpBranch %38
%39 = OpLabel
OpBranch %37
%38 = OpLabel
%63 = OpLoad %int %x_20_phi
OpStore %x_16 %63
%64 = OpIEqual %bool %63 %int_1
OpSelectionMerge %65 None
OpBranchConditional %64 %66 %67
%66 = OpLabel
OpStore %x_GLF_color %70
OpBranch %65
%67 = OpLabel
OpStore %x_GLF_color %71
OpBranch %65
%65 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %72
%tint_symbol = OpFunctionParameter %main_out
%76 = OpLabel
%77 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %77
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
%79 = OpLabel
%80 = OpFunctionCall %void %main_1
%82 = OpLoad %v4float %x_GLF_color
%83 = OpCompositeConstruct %main_out %82
%81 = OpFunctionCall %void %tint_symbol_2 %83
OpReturn
OpFunctionEnd
%func_struct_Array_i1_2_1_ = OpFunction %int None %84
%a = OpFunctionParameter %_ptr_Function_Array
%87 = OpLabel
%x_70 = OpVariable %_ptr_Function_bool Function %20
%x_12 = OpVariable %_ptr_Function_int Function %23
%x_13 = OpVariable %_ptr_Function_int Function %23
%x_72_phi = OpVariable %_ptr_Function_bool Function %20
%x_14_phi = OpVariable %_ptr_Function_int Function %23
%x_77 = OpVariable %_ptr_Function_bool Function %20
%x_77_phi = OpVariable %_ptr_Function_bool Function %20
%x_13_phi = OpVariable %_ptr_Function_int Function %23
%x_87_phi = OpVariable %_ptr_Function_bool Function %20
OpStore %x_70 %false
OpStore %x_72_phi %false
OpBranch %93
%93 = OpLabel
OpLoopMerge %94 %95 None
OpBranch %96
%96 = OpLabel
%101 = OpLoad %bool %x_72_phi
OpStore %x_77_phi %101
OpBranch %102
%102 = OpLabel
OpLoopMerge %103 %104 None
OpBranch %105
%105 = OpLabel
%106 = OpLoad %bool %x_77_phi
OpStore %x_77 %106
%107 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%108 = OpLoad %int %107
%110 = OpAccessChain %_ptr_Function_int %a %uint_0 %108
%111 = OpLoad %int %110
%112 = OpIEqual %bool %111 %int_1
OpSelectionMerge %113 None
OpBranchConditional %112 %114 %113
%114 = OpLabel
OpStore %x_70 %true
OpStore %x_12 %int_1
OpStore %x_13_phi %int_1
OpStore %x_87_phi %true
OpBranch %103
%113 = OpLabel
OpStore %x_13_phi %int_0
%115 = OpLoad %bool %x_77
OpStore %x_87_phi %115
OpBranch %103
%104 = OpLabel
OpStore %x_77_phi %false
OpBranch %102
%103 = OpLabel
%116 = OpLoad %int %x_13_phi
OpStore %x_13 %116
%117 = OpLoad %bool %x_87_phi
%118 = OpLoad %int %x_13
OpStore %x_14_phi %118
OpSelectionMerge %119 None
OpBranchConditional %117 %120 %119
%120 = OpLabel
OpBranch %94
%119 = OpLabel
OpStore %x_70 %true
OpStore %x_12 %int_1
OpStore %x_14_phi %int_1
OpBranch %94
%95 = OpLabel
OpStore %x_72_phi %false
OpBranch %93
%94 = OpLabel
%121 = OpLoad %int %x_14_phi
OpReturnValue %121
OpFunctionEnd