blob: c421db83b713d04382038ca056f18e779564d1f8 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 164
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
OpName %x_7 "x_7"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_10 "x_10"
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %main_1 "main_1"
OpName %m23 "m23"
OpName %i "i"
OpName %x_80 "x_80"
OpName %x_81_phi "x_81_phi"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main "main"
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_float_uint_2 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_4 ArrayStride 16
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%buf1 = OpTypeStruct %_arr_float_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_7 = 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_10 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%17 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %17
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %17
%_ptr_Input_v4float = OpTypePointer Input %v4float
%tint_symbol = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %17
%void = OpTypeVoid
%23 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%mat2v3float = OpTypeMatrix %v3float 2
%_ptr_Function_mat2v3float = OpTypePointer Function %mat2v3float
%31 = OpConstantNull %mat2v3float
%_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
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%51 = OpConstantNull %bool
%int_3 = OpConstant %int 3
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_0 = OpConstant %int 0
%int_2 = OpConstant %int 2
%_ptr_Function_float = OpTypePointer Function %float
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%true = OpConstantTrue %bool
%v3bool = OpTypeVector %bool 3
%main_out = OpTypeStruct %v4float
%151 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %23
%26 = OpLabel
%m23 = OpVariable %_ptr_Function_mat2v3float Function %31
%i = OpVariable %_ptr_Function_int Function %34
%x_80 = OpVariable %_ptr_Function_bool Function %51
%x_81_phi = OpVariable %_ptr_Function_bool Function %51
%38 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
%39 = OpLoad %float %38
%41 = OpCompositeConstruct %v3float %39 %float_0 %float_0
%42 = OpCompositeConstruct %v3float %float_0 %39 %float_0
%43 = OpCompositeConstruct %mat2v3float %41 %42
OpStore %m23 %43
OpStore %i %int_1
OpBranch %44
%44 = OpLabel
OpLoopMerge %45 %46 None
OpBranch %47
%47 = OpLabel
%53 = OpLoad %int %i
%56 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%57 = OpLoad %int %56
%58 = OpSLessThan %bool %53 %57
OpSelectionMerge %59 None
OpBranchConditional %58 %60 %61
%60 = OpLabel
OpBranch %59
%61 = OpLabel
OpBranch %45
%59 = OpLabel
%63 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%64 = OpLoad %int %63
%66 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%67 = OpLoad %int %66
%68 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%69 = OpLoad %float %68
%71 = OpAccessChain %_ptr_Function_float %m23 %64 %67
%72 = OpLoad %float %71
%73 = OpAccessChain %_ptr_Function_float %m23 %64 %67
%74 = OpFAdd %float %72 %69
OpStore %73 %74
%77 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%78 = OpLoad %float %77
%79 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%80 = OpLoad %float %79
%81 = OpFOrdLessThan %bool %78 %80
OpSelectionMerge %82 None
OpBranchConditional %81 %83 %82
%83 = OpLabel
OpBranch %82
%82 = OpLabel
OpStore %x_81_phi %true
OpSelectionMerge %85 None
OpBranchConditional %true %86 %85
%86 = OpLabel
%87 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%88 = OpLoad %float %87
%89 = OpFOrdLessThan %bool %88 %float_0
OpStore %x_80 %89
%90 = OpLoad %bool %x_80
OpStore %x_81_phi %90
OpBranch %85
%85 = OpLabel
%91 = OpLoad %bool %x_81_phi
%92 = OpLogicalNot %bool %91
OpSelectionMerge %93 None
OpBranchConditional %92 %94 %93
%94 = OpLabel
OpBranch %45
%93 = OpLabel
OpBranch %46
%46 = OpLabel
%95 = OpLoad %int %i
%96 = OpIAdd %int %95 %int_1
OpStore %i %96
OpBranch %44
%45 = OpLabel
%97 = OpLoad %mat2v3float %m23
%98 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%99 = OpLoad %int %98
%100 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%101 = OpLoad %int %100
%102 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%103 = OpLoad %int %102
%104 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%105 = OpLoad %int %104
%106 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%107 = OpLoad %int %106
%108 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%109 = OpLoad %int %108
%110 = OpConvertSToF %float %99
%111 = OpConvertSToF %float %101
%112 = OpConvertSToF %float %103
%113 = OpCompositeConstruct %v3float %110 %111 %112
%114 = OpConvertSToF %float %105
%115 = OpConvertSToF %float %107
%116 = OpConvertSToF %float %109
%117 = OpCompositeConstruct %v3float %114 %115 %116
%118 = OpCompositeConstruct %mat2v3float %113 %117
%120 = OpCompositeExtract %v3float %97 0
%121 = OpCompositeExtract %v3float %118 0
%122 = OpFOrdEqual %v3bool %120 %121
%119 = OpAll %bool %122
OpSelectionMerge %124 None
OpBranchConditional %119 %125 %124
%125 = OpLabel
%127 = OpCompositeExtract %v3float %97 1
%128 = OpCompositeExtract %v3float %118 1
%129 = OpFOrdEqual %v3bool %127 %128
%126 = OpAll %bool %129
OpBranch %124
%124 = OpLabel
%130 = OpPhi %bool %119 %45 %126 %125
OpSelectionMerge %131 None
OpBranchConditional %130 %132 %133
%132 = OpLabel
%134 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%135 = OpLoad %int %134
%136 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%137 = OpLoad %int %136
%138 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%139 = OpLoad %int %138
%140 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%141 = OpLoad %int %140
%142 = OpConvertSToF %float %135
%143 = OpConvertSToF %float %137
%144 = OpConvertSToF %float %139
%145 = OpConvertSToF %float %141
%146 = OpCompositeConstruct %v4float %142 %143 %144 %145
OpStore %x_GLF_color %146
OpBranch %131
%133 = OpLabel
%147 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%148 = OpLoad %int %147
%149 = OpConvertSToF %float %148
%150 = OpCompositeConstruct %v4float %149 %149 %149 %149
OpStore %x_GLF_color %150
OpBranch %131
%131 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %151
%tint_symbol_1 = OpFunctionParameter %main_out
%155 = OpLabel
%156 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %156
OpReturn
OpFunctionEnd
%main = OpFunction %void None %23
%158 = OpLabel
%159 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %159
%160 = OpFunctionCall %void %main_1
%162 = OpLoad %v4float %x_GLF_color
%163 = OpCompositeConstruct %main_out %162
%161 = OpFunctionCall %void %tint_symbol_3 %163
OpReturn
OpFunctionEnd