blob: 16fa1d72c32eb582f862454449564ecf78e10e56 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 174
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "one"
OpName %x_10 "x_10"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %x_43 "x_43"
OpName %x_44 "x_44"
OpName %S "S"
OpMemberName %S 0 "a"
OpMemberName %S 1 "b"
OpMemberName %S 2 "c"
OpName %arr "arr"
OpName %param "param"
OpName %param_1 "param_1"
OpName %x_50 "x_50"
OpName %x_64_1 "x_64_1"
OpName %x_71_1 "x_71_1"
OpName %x_76_1 "x_76_1"
OpName %x_81_1 "x_81_1"
OpName %x_88_1 "x_88_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"
OpName %func_struct_S_i1_i1_i11_i1_ "func_struct_S_i1_i1_i11_i1_"
OpName %s "s"
OpName %x "x"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 4
OpMemberDecorate %S 2 Offset 8
OpDecorate %_arr_S_uint_2 ArrayStride 12
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%buf0 = OpTypeStruct %int
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_10 = 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
%_ptr_Function_int = OpTypePointer Function %int
%18 = OpConstantNull %int
%bool = OpTypeBool
%false = OpConstantFalse %bool
%_ptr_Function_bool = OpTypePointer Function %bool
%23 = OpConstantNull %bool
%S = OpTypeStruct %int %int %int
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_S_uint_2 = OpTypeArray %S %uint_2
%_ptr_Function__arr_S_uint_2 = OpTypePointer Function %_arr_S_uint_2
%30 = OpConstantNull %_arr_S_uint_2
%_ptr_Function_S = OpTypePointer Function %S
%33 = OpConstantNull %S
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_2 = OpConstant %int 2
%int_1 = OpConstant %int 1
%float_0 = OpConstant %float 0
%55 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%true = OpConstantTrue %bool
%int_9 = OpConstant %int 9
%uint_1 = OpConstant %uint 1
%int_7 = OpConstant %int 7
%int_12 = OpConstant %int 12
%float_1 = OpConstant %float 1
%115 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%116 = OpTypeFunction %void %main_out
%128 = OpTypeFunction %int %_ptr_Function_S %_ptr_Function_int
%main_1 = OpFunction %void None %12
%15 = OpLabel
%x_43 = OpVariable %_ptr_Function_int Function %18
%x_44 = OpVariable %_ptr_Function_bool Function %23
%arr = OpVariable %_ptr_Function__arr_S_uint_2 Function %30
%param = OpVariable %_ptr_Function_S Function %33
%param_1 = OpVariable %_ptr_Function_int Function %18
%x_50 = OpVariable %_ptr_Function_int Function %18
%x_64_1 = OpVariable %_ptr_Function_S Function %33
%x_71_1 = OpVariable %_ptr_Function_S Function %33
%x_76_1 = OpVariable %_ptr_Function_S Function %33
%x_81_1 = OpVariable %_ptr_Function_S Function %33
%x_88_1 = OpVariable %_ptr_Function_S Function %33
OpStore %x_44 %false
OpBranch %35
%35 = OpLabel
OpLoopMerge %36 %37 None
OpBranch %38
%38 = OpLabel
%42 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0
%43 = OpLoad %int %42
OpStore %x_50 %43
%44 = OpLoad %int %x_50
%45 = OpAccessChain %_ptr_Function_int %arr %44 %uint_0
OpStore %45 %int_2
%48 = OpAccessChain %_ptr_Function_int %arr %int_1 %uint_0
%49 = OpLoad %int %48
%50 = OpSLessThan %bool %49 %int_1
OpSelectionMerge %51 None
OpBranchConditional %50 %52 %53
%52 = OpLabel
OpStore %x_GLF_color %55
OpStore %x_44 %true
OpBranch %36
%53 = OpLabel
%57 = OpAccessChain %_ptr_Function_S %arr %int_1
%58 = OpLoad %S %57
OpStore %param %58
%60 = OpLoad %int %x_50
%59 = OpCopyObject %int %60
%61 = OpIAdd %int %int_2 %59
OpStore %param_1 %61
%62 = OpLoad %int %param_1
%63 = OpLoad %S %param
OpStore %x_64_1 %63
%65 = OpAccessChain %_ptr_Function_int %x_64_1 %uint_0
OpStore %65 %62
%66 = OpLoad %S %x_64_1
OpStore %param %66
%67 = OpLoad %S %param
%68 = OpCompositeExtract %int %67 0
%69 = OpIEqual %bool %68 %int_2
OpSelectionMerge %70 None
OpBranchConditional %69 %71 %70
%71 = OpLabel
%72 = OpLoad %S %param
OpStore %x_71_1 %72
%74 = OpAccessChain %_ptr_Function_int %x_71_1 %uint_0
OpStore %74 %int_9
%76 = OpLoad %S %x_71_1
OpStore %param %76
OpBranch %70
%70 = OpLabel
%77 = OpLoad %int %param_1
%78 = OpLoad %S %param
OpStore %x_76_1 %78
%81 = OpAccessChain %_ptr_Function_int %x_76_1 %uint_1
%82 = OpIAdd %int %77 %int_1
OpStore %81 %82
%83 = OpLoad %S %x_76_1
OpStore %param %83
%84 = OpLoad %int %param_1
%85 = OpLoad %S %param
OpStore %x_81_1 %85
%87 = OpAccessChain %_ptr_Function_int %x_81_1 %uint_2
%88 = OpIAdd %int %84 %int_2
OpStore %87 %88
%89 = OpLoad %S %x_81_1
OpStore %param %89
%90 = OpLoad %S %param
%91 = OpCompositeExtract %int %90 1
%92 = OpIEqual %bool %91 %int_2
OpSelectionMerge %93 None
OpBranchConditional %92 %94 %93
%94 = OpLabel
%95 = OpLoad %S %param
OpStore %x_88_1 %95
%97 = OpAccessChain %_ptr_Function_int %x_88_1 %uint_1
OpStore %97 %int_7
%99 = OpLoad %S %x_88_1
OpStore %param %99
OpBranch %93
%93 = OpLabel
%100 = OpLoad %S %param
%101 = OpLoad %S %param
%102 = OpLoad %S %param
%103 = OpCompositeExtract %int %100 0
%104 = OpCompositeExtract %int %101 1
%105 = OpIAdd %int %103 %104
%106 = OpCompositeExtract %int %102 2
%107 = OpIAdd %int %105 %106
OpStore %x_43 %107
%108 = OpLoad %int %x_43
%110 = OpIEqual %bool %108 %int_12
OpSelectionMerge %111 None
OpBranchConditional %110 %112 %113
%112 = OpLabel
OpStore %x_GLF_color %115
OpBranch %111
%113 = OpLabel
OpStore %x_GLF_color %55
OpBranch %111
%111 = OpLabel
OpBranch %51
%51 = OpLabel
OpStore %x_44 %true
OpBranch %36
%37 = OpLabel
OpBranch %35
%36 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %116
%tint_symbol = OpFunctionParameter %main_out
%120 = OpLabel
%121 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %121
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
%123 = OpLabel
%124 = OpFunctionCall %void %main_1
%126 = OpLoad %v4float %x_GLF_color
%127 = OpCompositeConstruct %main_out %126
%125 = OpFunctionCall %void %tint_symbol_2 %127
OpReturn
OpFunctionEnd
%func_struct_S_i1_i1_i11_i1_ = OpFunction %int None %128
%s = OpFunctionParameter %_ptr_Function_S
%x = OpFunctionParameter %_ptr_Function_int
%132 = OpLabel
%134 = OpLoad %int %x
%136 = OpAccessChain %_ptr_Function_int %s %uint_0
OpStore %136 %134
%138 = OpAccessChain %_ptr_Function_int %s %uint_0
%139 = OpLoad %int %138
%140 = OpIEqual %bool %139 %int_2
OpSelectionMerge %141 None
OpBranchConditional %140 %142 %141
%142 = OpLabel
%144 = OpAccessChain %_ptr_Function_int %s %uint_0
OpStore %144 %int_9
OpBranch %141
%141 = OpLabel
%146 = OpLoad %int %x
%148 = OpAccessChain %_ptr_Function_int %s %uint_1
%149 = OpIAdd %int %146 %int_1
OpStore %148 %149
%151 = OpLoad %int %x
%153 = OpAccessChain %_ptr_Function_int %s %uint_2
%154 = OpIAdd %int %151 %int_2
OpStore %153 %154
%156 = OpAccessChain %_ptr_Function_int %s %uint_1
%157 = OpLoad %int %156
%158 = OpIEqual %bool %157 %int_2
OpSelectionMerge %159 None
OpBranchConditional %158 %160 %159
%160 = OpLabel
%162 = OpAccessChain %_ptr_Function_int %s %uint_1
OpStore %162 %int_7
OpBranch %159
%159 = OpLabel
%164 = OpAccessChain %_ptr_Function_int %s %uint_0
%165 = OpLoad %int %164
%167 = OpAccessChain %_ptr_Function_int %s %uint_1
%168 = OpLoad %int %167
%170 = OpAccessChain %_ptr_Function_int %s %uint_2
%171 = OpLoad %int %170
%172 = OpIAdd %int %165 %168
%173 = OpIAdd %int %172 %171
OpReturnValue %173
OpFunctionEnd