Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / skia / tests / sksl / intrinsics / Normalize.asm.frag
1 OpCapability Shader
2 %1 = OpExtInstImport "GLSL.std.450"
3 OpMemoryModel Logical GLSL450
4 OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor %sk_Clockwise
5 OpExecutionMode %_entrypoint_v OriginUpperLeft
6 OpName %sk_FragColor "sk_FragColor"
7 OpName %sk_Clockwise "sk_Clockwise"
8 OpName %_UniformBuffer "_UniformBuffer"
9 OpMemberName %_UniformBuffer 0 "inputVal"
10 OpMemberName %_UniformBuffer 1 "colorGreen"
11 OpMemberName %_UniformBuffer 2 "colorRed"
12 OpName %_entrypoint_v "_entrypoint_v"
13 OpName %main "main"
14 OpName %expectedVec "expectedVec"
15 OpDecorate %sk_FragColor RelaxedPrecision
16 OpDecorate %sk_FragColor Location 0
17 OpDecorate %sk_FragColor Index 0
18 OpDecorate %sk_Clockwise BuiltIn FrontFacing
19 OpMemberDecorate %_UniformBuffer 0 Offset 0
20 OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
21 OpMemberDecorate %_UniformBuffer 1 Offset 16
22 OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
23 OpMemberDecorate %_UniformBuffer 2 Offset 32
24 OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
25 OpDecorate %_UniformBuffer Block
26 OpDecorate %10 Binding 0
27 OpDecorate %10 DescriptorSet 0
28 OpDecorate %expectedVec RelaxedPrecision
29 OpDecorate %31 RelaxedPrecision
30 OpDecorate %36 RelaxedPrecision
31 OpDecorate %37 RelaxedPrecision
32 OpDecorate %41 RelaxedPrecision
33 OpDecorate %43 RelaxedPrecision
34 OpDecorate %44 RelaxedPrecision
35 OpDecorate %45 RelaxedPrecision
36 OpDecorate %52 RelaxedPrecision
37 OpDecorate %54 RelaxedPrecision
38 OpDecorate %55 RelaxedPrecision
39 OpDecorate %57 RelaxedPrecision
40 OpDecorate %64 RelaxedPrecision
41 OpDecorate %66 RelaxedPrecision
42 OpDecorate %78 RelaxedPrecision
43 OpDecorate %85 RelaxedPrecision
44 OpDecorate %98 RelaxedPrecision
45 OpDecorate %101 RelaxedPrecision
46 OpDecorate %102 RelaxedPrecision
47 %float = OpTypeFloat 32
48 %v4float = OpTypeVector %float 4
49 %_ptr_Output_v4float = OpTypePointer Output %v4float
50 %sk_FragColor = OpVariable %_ptr_Output_v4float Output
51 %bool = OpTypeBool
52 %_ptr_Input_bool = OpTypePointer Input %bool
53 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
54 %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float
55 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
56 %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
57 %void = OpTypeVoid
58 %15 = OpTypeFunction %void
59 %float_0 = OpConstant %float 0
60 %v2float = OpTypeVector %float 2
61 %19 = OpConstantComposite %v2float %float_0 %float_0
62 %_ptr_Function_v2float = OpTypePointer Function %v2float
63 %23 = OpTypeFunction %v4float %_ptr_Function_v2float
64 %_ptr_Function_v4float = OpTypePointer Function %v4float
65 %float_1 = OpConstant %float 1
66 %29 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_0
67 %false = OpConstantFalse %bool
68 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
69 %int = OpTypeInt 32 1
70 %int_0 = OpConstant %int 0
71 %v2bool = OpTypeVector %bool 2
72 %v3float = OpTypeVector %float 3
73 %v3bool = OpTypeVector %bool 3
74 %v4bool = OpTypeVector %bool 4
75 %true = OpConstantTrue %bool
76 %77 = OpConstantComposite %v2float %float_0 %float_1
77 %84 = OpConstantComposite %v3float %float_0 %float_1 %float_0
78 %int_1 = OpConstant %int 1
79 %int_2 = OpConstant %int 2
80 %_entrypoint_v = OpFunction %void None %15
81 %16 = OpLabel
82 %20 = OpVariable %_ptr_Function_v2float Function
83 OpStore %20 %19
84 %22 = OpFunctionCall %v4float %main %20
85 OpStore %sk_FragColor %22
86 OpReturn
87 OpFunctionEnd
88 %main = OpFunction %v4float None %23
89 %24 = OpFunctionParameter %_ptr_Function_v2float
90 %25 = OpLabel
91 %expectedVec = OpVariable %_ptr_Function_v4float Function
92 %92 = OpVariable %_ptr_Function_v4float Function
93 OpStore %expectedVec %29
94 %32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
95 %36 = OpLoad %v4float %32
96 %37 = OpCompositeExtract %float %36 0
97 %31 = OpExtInst %float %1 Normalize %37
98 %38 = OpFOrdEqual %bool %31 %float_1
99 OpSelectionMerge %40 None
100 OpBranchConditional %38 %39 %40
101 %39 = OpLabel
102 %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
103 %43 = OpLoad %v4float %42
104 %44 = OpVectorShuffle %v2float %43 %43 0 1
105 %41 = OpExtInst %v2float %1 Normalize %44
106 %45 = OpVectorShuffle %v2float %29 %29 0 1
107 %46 = OpFOrdEqual %v2bool %41 %45
108 %48 = OpAll %bool %46
109 OpBranch %40
110 %40 = OpLabel
111 %49 = OpPhi %bool %false %25 %48 %39
112 OpSelectionMerge %51 None
113 OpBranchConditional %49 %50 %51
114 %50 = OpLabel
115 %53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
116 %54 = OpLoad %v4float %53
117 %55 = OpVectorShuffle %v3float %54 %54 0 1 2
118 %52 = OpExtInst %v3float %1 Normalize %55
119 %57 = OpVectorShuffle %v3float %29 %29 0 1 2
120 %58 = OpFOrdEqual %v3bool %52 %57
121 %60 = OpAll %bool %58
122 OpBranch %51
123 %51 = OpLabel
124 %61 = OpPhi %bool %false %40 %60 %50
125 OpSelectionMerge %63 None
126 OpBranchConditional %61 %62 %63
127 %62 = OpLabel
128 %65 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
129 %66 = OpLoad %v4float %65
130 %64 = OpExtInst %v4float %1 Normalize %66
131 %67 = OpFOrdEqual %v4bool %64 %29
132 %69 = OpAll %bool %67
133 OpBranch %63
134 %63 = OpLabel
135 %70 = OpPhi %bool %false %51 %69 %62
136 OpSelectionMerge %72 None
137 OpBranchConditional %70 %71 %72
138 %71 = OpLabel
139 OpBranch %72
140 %72 = OpLabel
141 %74 = OpPhi %bool %false %63 %true %71
142 OpSelectionMerge %76 None
143 OpBranchConditional %74 %75 %76
144 %75 = OpLabel
145 %78 = OpVectorShuffle %v2float %29 %29 1 0
146 %79 = OpFOrdEqual %v2bool %77 %78
147 %80 = OpAll %bool %79
148 OpBranch %76
149 %76 = OpLabel
150 %81 = OpPhi %bool %false %72 %80 %75
151 OpSelectionMerge %83 None
152 OpBranchConditional %81 %82 %83
153 %82 = OpLabel
154 %85 = OpVectorShuffle %v3float %29 %29 2 0 1
155 %86 = OpFOrdEqual %v3bool %84 %85
156 %87 = OpAll %bool %86
157 OpBranch %83
158 %83 = OpLabel
159 %88 = OpPhi %bool %false %76 %87 %82
160 OpSelectionMerge %90 None
161 OpBranchConditional %88 %89 %90
162 %89 = OpLabel
163 OpBranch %90
164 %90 = OpLabel
165 %91 = OpPhi %bool %false %83 %true %89
166 OpSelectionMerge %95 None
167 OpBranchConditional %91 %93 %94
168 %93 = OpLabel
169 %96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
170 %98 = OpLoad %v4float %96
171 OpStore %92 %98
172 OpBranch %95
173 %94 = OpLabel
174 %99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
175 %101 = OpLoad %v4float %99
176 OpStore %92 %101
177 OpBranch %95
178 %95 = OpLabel
179 %102 = OpLoad %v4float %92
180 OpReturnValue %102
181 OpFunctionEnd