blob: 98c20bdf5e881206c4b384e66241733d56971291 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 141
; 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 %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %m43 "m43"
OpName %ll1 "ll1"
OpName %rows "rows"
OpName %ll4 "ll4"
OpName %ll2 "ll2"
OpName %c "c"
OpName %tempm43 "tempm43"
OpName %ll3 "ll3"
OpName %d "d"
OpName %r "r"
OpName %sums "sums"
OpName %idx "idx"
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 %tint_symbol_1 Location 0
OpDecorate %_arr_float_uint_9 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
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%mat4v3float = OpTypeMatrix %v3float 4
%_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float
%16 = OpConstantNull %mat4v3float
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_9 = OpConstant %uint 9
%_arr_float_uint_9 = OpTypeArray %float %uint_9
%_ptr_Function__arr_float_uint_9 = OpTypePointer Function %_arr_float_uint_9
%34 = OpConstantNull %_arr_float_uint_9
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%38 = OpConstantComposite %v3float %float_1 %float_0 %float_0
%39 = OpConstantComposite %v3float %float_0 %float_1 %float_0
%40 = OpConstantComposite %v3float %float_0 %float_0 %float_1
%41 = OpConstantComposite %v3float %float_0 %float_0 %float_0
%42 = OpConstantComposite %mat4v3float %38 %39 %40 %41
%int_0 = OpConstant %int 0
%int_2 = OpConstant %int 2
%bool = OpTypeBool
%true = OpConstantTrue %bool
%54 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%int_5 = OpConstant %int 5
%int_1 = OpConstant %int 1
%int_10 = OpConstant %int 10
%int_4 = OpConstant %int 4
%int_3 = OpConstant %int 3
%_ptr_Function_float = OpTypePointer Function %float
%int_9 = OpConstant %int 9
%uint_1 = OpConstant %uint 1
%main_out = OpTypeStruct %v4float
%129 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8
%11 = OpLabel
%m43 = OpVariable %_ptr_Function_mat4v3float Function %16
%ll1 = OpVariable %_ptr_Function_int Function %20
%rows = OpVariable %_ptr_Function_int Function %20
%ll4 = OpVariable %_ptr_Function_int Function %20
%ll2 = OpVariable %_ptr_Function_int Function %20
%c = OpVariable %_ptr_Function_int Function %20
%tempm43 = OpVariable %_ptr_Function_mat4v3float Function %16
%ll3 = OpVariable %_ptr_Function_int Function %20
%d = OpVariable %_ptr_Function_int Function %20
%r = OpVariable %_ptr_Function_int Function %20
%sums = OpVariable %_ptr_Function__arr_float_uint_9 Function %34
%idx = OpVariable %_ptr_Function_int Function %20
OpStore %m43 %42
OpStore %ll1 %int_0
OpStore %rows %int_2
OpBranch %45
%45 = OpLabel
OpLoopMerge %46 %47 None
OpBranch %48
%48 = OpLabel
OpSelectionMerge %51 None
OpBranchConditional %true %52 %53
%52 = OpLabel
OpBranch %51
%53 = OpLabel
OpBranch %46
%51 = OpLabel
OpStore %x_GLF_color %54
%55 = OpLoad %int %ll1
%57 = OpSGreaterThanEqual %bool %55 %int_5
OpSelectionMerge %58 None
OpBranchConditional %57 %59 %58
%59 = OpLabel
OpBranch %46
%58 = OpLabel
%60 = OpLoad %int %ll1
%62 = OpIAdd %int %60 %int_1
OpStore %ll1 %62
OpStore %ll4 %int_10
OpStore %ll2 %int_0
OpStore %c %int_0
OpBranch %64
%64 = OpLabel
OpLoopMerge %65 %66 None
OpBranch %67
%67 = OpLabel
%68 = OpLoad %int %c
%69 = OpSLessThan %bool %68 %int_1
OpSelectionMerge %70 None
OpBranchConditional %69 %71 %72
%71 = OpLabel
OpBranch %70
%72 = OpLabel
OpBranch %65
%70 = OpLabel
%73 = OpLoad %int %ll2
%74 = OpSGreaterThanEqual %bool %73 %int_0
OpSelectionMerge %75 None
OpBranchConditional %74 %76 %75
%76 = OpLabel
OpBranch %65
%75 = OpLabel
%77 = OpLoad %int %ll2
%78 = OpIAdd %int %77 %int_1
OpStore %ll2 %78
%79 = OpLoad %mat4v3float %m43
OpStore %tempm43 %79
OpStore %ll3 %int_0
OpStore %d %int_0
OpBranch %80
%80 = OpLabel
OpLoopMerge %81 %82 None
OpBranch %83
%83 = OpLabel
%84 = OpLoad %int %ll4
%85 = OpSLessThan %bool %int_1 %84
OpSelectionMerge %86 None
OpBranchConditional %85 %87 %88
%87 = OpLabel
OpBranch %86
%88 = OpLabel
OpBranch %81
%86 = OpLabel
%89 = OpLoad %int %d
%90 = OpLoad %int %d
%91 = OpLoad %int %d
%92 = OpLoad %int %r
%93 = OpLoad %int %r
%94 = OpLoad %int %r
%96 = OpSGreaterThanEqual %bool %89 %int_0
%98 = OpSLessThan %bool %90 %int_4
%99 = OpLogicalAnd %bool %96 %98
%95 = OpSelect %int %99 %91 %int_0
%101 = OpSGreaterThanEqual %bool %92 %int_0
%103 = OpSLessThan %bool %93 %int_3
%104 = OpLogicalAnd %bool %101 %103
%100 = OpSelect %int %104 %94 %int_0
%106 = OpAccessChain %_ptr_Function_float %tempm43 %95 %100
OpStore %106 %float_1
OpBranch %82
%82 = OpLabel
%107 = OpLoad %int %d
%108 = OpIAdd %int %107 %int_1
OpStore %d %108
OpBranch %80
%81 = OpLabel
%109 = OpLoad %int %idx
%110 = OpLoad %int %idx
%111 = OpLoad %int %idx
%113 = OpSGreaterThanEqual %bool %109 %int_0
%115 = OpSLessThan %bool %110 %int_9
%116 = OpLogicalAnd %bool %113 %115
%112 = OpSelect %int %116 %111 %int_0
%117 = OpLoad %int %c
%119 = OpAccessChain %_ptr_Function_float %m43 %117 %uint_1
%120 = OpLoad %float %119
%121 = OpAccessChain %_ptr_Function_float %sums %112
%122 = OpLoad %float %121
%123 = OpAccessChain %_ptr_Function_float %sums %112
%124 = OpFAdd %float %122 %120
OpStore %123 %124
OpBranch %66
%66 = OpLabel
%125 = OpLoad %int %c
%126 = OpIAdd %int %125 %int_1
OpStore %c %126
OpBranch %64
%65 = OpLabel
%127 = OpLoad %int %idx
%128 = OpIAdd %int %127 %int_1
OpStore %idx %128
OpBranch %47
%47 = OpLabel
OpBranch %45
%46 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %129
%tint_symbol = OpFunctionParameter %main_out
%133 = OpLabel
%134 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %134
OpReturn
OpFunctionEnd
%main = OpFunction %void None %8
%136 = OpLabel
%137 = OpFunctionCall %void %main_1
%139 = OpLoad %v4float %x_GLF_color
%140 = OpCompositeConstruct %main_out %139
%138 = OpFunctionCall %void %tint_symbol_2 %140
OpReturn
OpFunctionEnd