blob: c63ce320cc9f2ef6e0fb27d7f208c25d01e7bfb5 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 152
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
OpName %x_6 "x_6"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
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 %m43 "m43"
OpName %sums "sums"
OpName %i "i"
OpName %a "a"
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"
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_float_uint_3 ArrayStride 16
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_4 ArrayStride 16
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%uint_3 = OpConstant %uint 3
%_arr_float_uint_3 = OpTypeArray %float %uint_3
%buf1 = OpTypeStruct %_arr_float_uint_3
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_6 = OpVariable %_ptr_Uniform_buf1 Uniform
%int = OpTypeInt 32 1
%uint_4 = OpConstant %uint 4
%_arr_int_uint_4 = OpTypeArray %int %uint_4
%buf0 = OpTypeStruct %_arr_int_uint_4
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_8 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%17 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %17
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %17
%void = OpTypeVoid
%20 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%mat4v3float = OpTypeMatrix %v3float 4
%_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float
%28 = OpConstantNull %mat4v3float
%_ptr_Function__arr_float_uint_3 = OpTypePointer Function %_arr_float_uint_3
%31 = OpConstantNull %_arr_float_uint_3
%_ptr_Function_int = OpTypePointer Function %int
%34 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_0 = OpConstant %float 0
%43 = OpConstantComposite %v3float %float_0 %float_0 %float_0
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%_ptr_Function_float = OpTypePointer Function %float
%int_3 = OpConstant %int 3
%bool = OpTypeBool
%int_4 = OpConstant %int 4
%int_2 = OpConstant %int 2
%main_out = OpTypeStruct %v4float
%140 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%m43 = OpVariable %_ptr_Function_mat4v3float Function %28
%sums = OpVariable %_ptr_Function__arr_float_uint_3 Function %31
%i = OpVariable %_ptr_Function_int Function %34
%a = OpVariable %_ptr_Function_int Function %34
%x_67_phi = OpVariable %_ptr_Function_int Function %34
%40 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%41 = OpLoad %float %40
%44 = OpCompositeConstruct %v3float %41 %float_0 %float_0
%45 = OpCompositeConstruct %v3float %float_0 %41 %float_0
%46 = OpCompositeConstruct %v3float %float_0 %float_0 %41
%47 = OpCompositeConstruct %mat4v3float %44 %45 %46 %43
OpStore %m43 %47
%50 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%51 = OpLoad %int %50
%52 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%53 = OpLoad %int %52
%54 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%55 = OpLoad %float %54
%57 = OpAccessChain %_ptr_Function_float %m43 %51 %53
OpStore %57 %55
%58 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%59 = OpLoad %float %58
%60 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%61 = OpLoad %float %60
%62 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%63 = OpLoad %float %62
%64 = OpCompositeConstruct %_arr_float_uint_3 %59 %61 %63
OpStore %sums %64
%65 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%66 = OpLoad %int %65
OpStore %i %66
OpStore %x_67_phi %66
OpBranch %67
%67 = OpLabel
OpLoopMerge %68 %69 None
OpBranch %70
%70 = OpLabel
%71 = OpLoad %int %x_67_phi
%73 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_3
%74 = OpLoad %int %73
%75 = OpSLessThan %bool %71 %74
OpSelectionMerge %77 None
OpBranchConditional %75 %78 %79
%78 = OpLabel
OpBranch %77
%79 = OpLabel
OpBranch %68
%77 = OpLabel
%80 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%81 = OpLoad %int %80
%82 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%83 = OpLoad %int %82
%84 = OpAccessChain %_ptr_Function_float %m43 %71 %83
%85 = OpLoad %float %84
%86 = OpAccessChain %_ptr_Function_float %sums %81
%87 = OpLoad %float %86
%88 = OpAccessChain %_ptr_Function_float %sums %81
%89 = OpFAdd %float %87 %85
OpStore %88 %89
OpBranch %69
%69 = OpLabel
%90 = OpIAdd %int %71 %int_1
OpStore %i %90
OpStore %x_67_phi %90
OpBranch %67
%68 = OpLabel
%91 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%92 = OpLoad %int %91
%93 = OpIEqual %bool %92 %int_1
OpSelectionMerge %94 None
OpBranchConditional %93 %95 %94
%95 = OpLabel
OpStore %a %int_4
%98 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_2
%99 = OpLoad %int %98
%100 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%101 = OpLoad %int %100
%102 = OpAccessChain %_ptr_Function_float %m43 %int_4 %101
%103 = OpLoad %float %102
%104 = OpAccessChain %_ptr_Function_float %sums %99
%105 = OpLoad %float %104
%106 = OpAccessChain %_ptr_Function_float %sums %99
%107 = OpFAdd %float %105 %103
OpStore %106 %107
OpBranch %94
%94 = OpLabel
%108 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%109 = OpLoad %int %108
%110 = OpAccessChain %_ptr_Function_float %sums %109
%111 = OpLoad %float %110
%112 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%113 = OpLoad %int %112
%114 = OpAccessChain %_ptr_Function_float %sums %113
%115 = OpLoad %float %114
%116 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_2
%117 = OpLoad %float %116
%118 = OpFAdd %float %111 %115
%119 = OpFOrdEqual %bool %118 %117
OpSelectionMerge %120 None
OpBranchConditional %119 %121 %122
%121 = OpLabel
%123 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%124 = OpLoad %int %123
%125 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%126 = OpLoad %int %125
%127 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%128 = OpLoad %int %127
%129 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%130 = OpLoad %int %129
%131 = OpConvertSToF %float %124
%132 = OpConvertSToF %float %126
%133 = OpConvertSToF %float %128
%134 = OpConvertSToF %float %130
%135 = OpCompositeConstruct %v4float %131 %132 %133 %134
OpStore %x_GLF_color %135
OpBranch %120
%122 = OpLabel
%136 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%137 = OpLoad %int %136
%138 = OpConvertSToF %float %137
%139 = OpCompositeConstruct %v4float %138 %138 %138 %138
OpStore %x_GLF_color %139
OpBranch %120
%120 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %140
%tint_symbol = OpFunctionParameter %main_out
%144 = OpLabel
%145 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %145
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%147 = OpLabel
%148 = OpFunctionCall %void %main_1
%150 = OpLoad %v4float %x_GLF_color
%151 = OpCompositeConstruct %main_out %150
%149 = OpFunctionCall %void %tint_symbol_2 %151
OpReturn
OpFunctionEnd