blob: 83f6e268ae37a7abe6efdafd902c72ccf1bfc5c9 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 129
; 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_52 "x_52"
OpName %x_17 "x_17"
OpName %x_18 "x_18"
OpName %x_16 "x_16"
OpName %Array "Array"
OpMemberName %Array 0 "values"
OpName %param "param"
OpName %x_20 "x_20"
OpName %x_21_phi "x_21_phi"
OpName %x_23_1 "x_23_1"
OpName %x_20_phi "x_20_phi"
OpName %x_67_phi "x_67_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_74 "x_74"
OpName %x_13 "x_13"
OpName %x_14 "x_14"
OpName %x_76_phi "x_76_phi"
OpName %x_15_phi "x_15_phi"
OpName %x_81 "x_81"
OpName %x_81_phi "x_81_phi"
OpName %x_14_phi "x_14_phi"
OpName %x_91_phi "x_91_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
OpDecorate %_arr_int_uint_2 ArrayStride 4
OpMemberDecorate %Array 0 Offset 0
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
%_ptr_Function__arr_int_uint_2 = OpTypePointer Function %_arr_int_uint_2
%30 = OpConstantNull %_arr_int_uint_2
%Array = OpTypeStruct %_arr_int_uint_2
%_ptr_Function_Array = OpTypePointer Function %Array
%34 = OpConstantNull %Array
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_0 = OpConstant %int 0
%true = OpConstantTrue %bool
%int_42 = OpConstant %int 42
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%77 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%78 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%79 = OpTypeFunction %void %main_out
%91 = OpTypeFunction %int %_ptr_Function_Array
%main_1 = OpFunction %void None %12
%15 = OpLabel
%x_52 = OpVariable %_ptr_Function_bool Function %20
%x_17 = OpVariable %_ptr_Function_int Function %23
%x_18 = OpVariable %_ptr_Function_int Function %23
%x_16 = OpVariable %_ptr_Function__arr_int_uint_2 Function %30
%param = OpVariable %_ptr_Function_Array Function %34
%x_20 = OpVariable %_ptr_Function_int Function %23
%x_21_phi = OpVariable %_ptr_Function_int Function %23
%x_23_1 = OpVariable %_ptr_Function__arr_int_uint_2 Function %30
%x_20_phi = OpVariable %_ptr_Function_int Function %23
%x_67_phi = OpVariable %_ptr_Function_bool Function %20
OpStore %x_52 %false
%39 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%40 = OpLoad %int %39
%41 = OpLoad %_arr_int_uint_2 %x_16
OpStore %x_23_1 %41
%43 = OpAccessChain %_ptr_Function_int %x_23_1 %uint_0
OpStore %43 %40
%44 = OpLoad %_arr_int_uint_2 %x_23_1
OpStore %x_16 %44
%45 = OpLoad %_arr_int_uint_2 %x_16
%46 = OpCompositeConstruct %Array %45
OpStore %param %46
OpStore %x_52 %false
OpBranch %47
%47 = OpLabel
OpLoopMerge %48 %49 None
OpBranch %50
%50 = OpLabel
OpBranch %53
%53 = OpLabel
OpLoopMerge %54 %55 None
OpBranch %56
%56 = OpLabel
%57 = OpAccessChain %_ptr_Function_int %param %uint_0 %40
%58 = OpLoad %int %57
%60 = OpIEqual %bool %58 %int_0
OpSelectionMerge %61 None
OpBranchConditional %60 %62 %61
%62 = OpLabel
OpStore %x_52 %true
OpStore %x_17 %int_42
OpStore %x_20_phi %int_42
OpStore %x_67_phi %true
OpBranch %54
%61 = OpLabel
OpStore %x_20_phi %int_0
OpStore %x_67_phi %false
OpBranch %54
%55 = OpLabel
OpBranch %53
%54 = OpLabel
%65 = OpLoad %int %x_20_phi
OpStore %x_20 %65
%66 = OpLoad %bool %x_67_phi
%67 = OpLoad %int %x_20
OpStore %x_21_phi %67
OpSelectionMerge %68 None
OpBranchConditional %66 %69 %68
%69 = OpLabel
OpBranch %48
%68 = OpLabel
OpStore %x_52 %true
OpStore %x_17 %int_42
OpStore %x_21_phi %int_42
OpBranch %48
%49 = OpLabel
OpBranch %47
%48 = OpLabel
%70 = OpLoad %int %x_21_phi
OpStore %x_18 %70
%71 = OpIEqual %bool %70 %int_42
OpSelectionMerge %72 None
OpBranchConditional %71 %73 %74
%73 = OpLabel
OpStore %x_GLF_color %77
OpBranch %72
%74 = OpLabel
OpStore %x_GLF_color %78
OpBranch %72
%72 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %79
%tint_symbol = OpFunctionParameter %main_out
%83 = OpLabel
%84 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %84
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
%86 = OpLabel
%87 = OpFunctionCall %void %main_1
%89 = OpLoad %v4float %x_GLF_color
%90 = OpCompositeConstruct %main_out %89
%88 = OpFunctionCall %void %tint_symbol_2 %90
OpReturn
OpFunctionEnd
%func_struct_Array_i1_2_1_ = OpFunction %int None %91
%a = OpFunctionParameter %_ptr_Function_Array
%94 = OpLabel
%x_74 = OpVariable %_ptr_Function_bool Function %20
%x_13 = OpVariable %_ptr_Function_int Function %23
%x_14 = OpVariable %_ptr_Function_int Function %23
%x_76_phi = OpVariable %_ptr_Function_bool Function %20
%x_15_phi = OpVariable %_ptr_Function_int Function %23
%x_81 = OpVariable %_ptr_Function_bool Function %20
%x_81_phi = OpVariable %_ptr_Function_bool Function %20
%x_14_phi = OpVariable %_ptr_Function_int Function %23
%x_91_phi = OpVariable %_ptr_Function_bool Function %20
OpStore %x_74 %false
OpStore %x_76_phi %false
OpBranch %100
%100 = OpLabel
OpLoopMerge %101 %102 None
OpBranch %103
%103 = OpLabel
%108 = OpLoad %bool %x_76_phi
OpStore %x_81_phi %108
OpBranch %109
%109 = OpLabel
OpLoopMerge %110 %111 None
OpBranch %112
%112 = OpLabel
%113 = OpLoad %bool %x_81_phi
OpStore %x_81 %113
%114 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%115 = OpLoad %int %114
%117 = OpAccessChain %_ptr_Function_int %a %uint_0 %115
%118 = OpLoad %int %117
%119 = OpIEqual %bool %118 %int_0
OpSelectionMerge %120 None
OpBranchConditional %119 %121 %120
%121 = OpLabel
OpStore %x_74 %true
OpStore %x_13 %int_42
OpStore %x_14_phi %int_42
OpStore %x_91_phi %true
OpBranch %110
%120 = OpLabel
OpStore %x_14_phi %int_0
%122 = OpLoad %bool %x_81
OpStore %x_91_phi %122
OpBranch %110
%111 = OpLabel
OpStore %x_81_phi %false
OpBranch %109
%110 = OpLabel
%123 = OpLoad %int %x_14_phi
OpStore %x_14 %123
%124 = OpLoad %bool %x_91_phi
%125 = OpLoad %int %x_14
OpStore %x_15_phi %125
OpSelectionMerge %126 None
OpBranchConditional %124 %127 %126
%127 = OpLabel
OpBranch %101
%126 = OpLabel
OpStore %x_74 %true
OpStore %x_13 %int_42
OpStore %x_15_phi %int_42
OpBranch %101
%102 = OpLabel
OpStore %x_76_phi %false
OpBranch %100
%101 = OpLabel
%128 = OpLoad %int %x_15_phi
OpReturnValue %128
OpFunctionEnd