Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: gyp/opts.gyp

Issue 390453002: Add support for NEON intrinsics to speed up texture compression. We can (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gyp/utils.gyp » ('j') | src/opts/SkTextureCompression_opts_neon.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Gyp file for opts projects 1 # Gyp file for opts projects
2 { 2 {
3 'targets': [ 3 'targets': [
4 # Due to an unfortunate intersection of lameness between gcc and gyp, 4 # Due to an unfortunate intersection of lameness between gcc and gyp,
5 # we have to build the *_SSE2.cpp files in a separate target. The 5 # we have to build the *_SSE2.cpp files in a separate target. The
6 # gcc lameness is that, in order to compile SSE2 intrinsics code, it 6 # gcc lameness is that, in order to compile SSE2 intrinsics code, it
7 # must be passed the -msse2 flag. However, with this flag, it may 7 # must be passed the -msse2 flag. However, with this flag, it may
8 # emit SSE2 instructions even for scalar code, such as the CPUID 8 # emit SSE2 instructions even for scalar code, such as the CPUID
9 # test used to test for the presence of SSE2. So that, and all other 9 # test used to test for the presence of SSE2. So that, and all other
10 # code must be compiled *without* -msse2. The gyp lameness is that it 10 # code must be compiled *without* -msse2. The gyp lameness is that it
(...skipping 13 matching lines...) Expand all
24 'product_name': 'skia_opts', 24 'product_name': 'skia_opts',
25 'type': 'static_library', 25 'type': 'static_library',
26 'standalone_static_library': 1, 26 'standalone_static_library': 1,
27 'dependencies': [ 27 'dependencies': [
28 'core.gyp:*', 28 'core.gyp:*',
29 'effects.gyp:*' 29 'effects.gyp:*'
30 ], 30 ],
31 'include_dirs': [ 31 'include_dirs': [
32 '../src/core', 32 '../src/core',
33 '../src/opts', 33 '../src/opts',
34 '../src/utils',
34 ], 35 ],
35 'conditions': [ 36 'conditions': [
36 [ 'skia_arch_type == "x86" and skia_os != "ios"', { 37 [ 'skia_arch_type == "x86" and skia_os != "ios"', {
37 'conditions': [ 38 'conditions': [
38 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "ch romeos", "android"]', { 39 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "ch romeos", "android"]', {
39 'cflags': [ 40 'cflags': [
40 '-msse2', 41 '-msse2',
41 ], 42 ],
42 }], 43 }],
43 ], 44 ],
44 'include_dirs': [ 45 'include_dirs': [
45 '../include/utils', 46 '../include/utils',
46 ], 47 ],
47 'dependencies': [ 48 'dependencies': [
48 'opts_ssse3', 49 'opts_ssse3',
49 'opts_sse4', 50 'opts_sse4',
50 ], 51 ],
51 'sources': [ 52 'sources': [
52 '../src/opts/opts_check_x86.cpp', 53 '../src/opts/opts_check_x86.cpp',
53 '../src/opts/SkBitmapProcState_opts_SSE2.cpp', 54 '../src/opts/SkBitmapProcState_opts_SSE2.cpp',
54 '../src/opts/SkBitmapFilter_opts_SSE2.cpp', 55 '../src/opts/SkBitmapFilter_opts_SSE2.cpp',
55 '../src/opts/SkBlitRow_opts_SSE2.cpp', 56 '../src/opts/SkBlitRow_opts_SSE2.cpp',
56 '../src/opts/SkBlitRect_opts_SSE2.cpp', 57 '../src/opts/SkBlitRect_opts_SSE2.cpp',
57 '../src/opts/SkBlurImage_opts_SSE2.cpp', 58 '../src/opts/SkBlurImage_opts_SSE2.cpp',
58 '../src/opts/SkMorphology_opts_SSE2.cpp', 59 '../src/opts/SkMorphology_opts_SSE2.cpp',
60 '../src/opts/SkTextureCompression_opts_none.cpp',
59 '../src/opts/SkUtils_opts_SSE2.cpp', 61 '../src/opts/SkUtils_opts_SSE2.cpp',
60 '../src/opts/SkXfermode_opts_SSE2.cpp', 62 '../src/opts/SkXfermode_opts_SSE2.cpp',
61 ], 63 ],
62 }], 64 }],
63 [ 'skia_arch_type == "arm" and arm_version >= 7', { 65 [ 'skia_arch_type == "arm" and arm_version >= 7', {
64 # The assembly uses the frame pointer register (r7 in Thumb/r11 in 66 # The assembly uses the frame pointer register (r7 in Thumb/r11 in
65 # ARM), the compiler doesn't like that. 67 # ARM), the compiler doesn't like that.
66 'cflags!': [ 68 'cflags!': [
67 '-fno-omit-frame-pointer', 69 '-fno-omit-frame-pointer',
68 '-mapcs-frame', 70 '-mapcs-frame',
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 ], 102 ],
101 }], 103 }],
102 ], 104 ],
103 }], 105 }],
104 [ 'skia_arch_type == "mips"', { 106 [ 'skia_arch_type == "mips"', {
105 'sources': [ 107 'sources': [
106 '../src/opts/SkBlitMask_opts_none.cpp', 108 '../src/opts/SkBlitMask_opts_none.cpp',
107 '../src/opts/SkBlurImage_opts_none.cpp', 109 '../src/opts/SkBlurImage_opts_none.cpp',
108 '../src/opts/SkMorphology_opts_none.cpp', 110 '../src/opts/SkMorphology_opts_none.cpp',
109 '../src/opts/SkUtils_opts_none.cpp', 111 '../src/opts/SkUtils_opts_none.cpp',
112 '../src/opts/SkTextureCompression_opts_none.cpp',
110 '../src/opts/SkXfermode_opts_none.cpp', 113 '../src/opts/SkXfermode_opts_none.cpp',
111 ], 114 ],
112 'conditions': [ 115 'conditions': [
113 [ '(mips_arch_variant == "mips32r2") \ 116 [ '(mips_arch_variant == "mips32r2") \
114 and (mips_dsp == 1 or mips_dsp == 2)', { 117 and (mips_dsp == 1 or mips_dsp == 2)', {
115 'sources': [ 118 'sources': [
116 '../src/opts/SkBitmapProcState_opts_mips_dsp.cpp', 119 '../src/opts/SkBitmapProcState_opts_mips_dsp.cpp',
117 '../src/opts/SkBlitRow_opts_mips_dsp.cpp', 120 '../src/opts/SkBlitRow_opts_mips_dsp.cpp',
118 ], 121 ],
119 }, { 122 }, {
120 'sources': [ 123 'sources': [
121 '../src/opts/SkBitmapProcState_opts_none.cpp', 124 '../src/opts/SkBitmapProcState_opts_none.cpp',
122 '../src/opts/SkBlitRow_opts_none.cpp', 125 '../src/opts/SkBlitRow_opts_none.cpp',
123 ], 126 ],
124 }], 127 }],
125 ], 128 ],
126 }], 129 }],
127 [ '(skia_arch_type == "arm" and arm_version < 7) \ 130 [ '(skia_arch_type == "arm" and arm_version < 7) \
128 or (skia_os == "ios") \ 131 or (skia_os == "ios") \
129 or (skia_os == "android" and skia_arch_type not in ["x86", "arm", "m ips", "arm64"])', { 132 or (skia_os == "android" and skia_arch_type not in ["x86", "arm", "m ips", "arm64"])', {
130 'sources': [ 133 'sources': [
131 '../src/opts/SkBitmapProcState_opts_none.cpp', 134 '../src/opts/SkBitmapProcState_opts_none.cpp',
132 '../src/opts/SkBlitMask_opts_none.cpp', 135 '../src/opts/SkBlitMask_opts_none.cpp',
133 '../src/opts/SkBlitRow_opts_none.cpp', 136 '../src/opts/SkBlitRow_opts_none.cpp',
134 '../src/opts/SkBlurImage_opts_none.cpp', 137 '../src/opts/SkBlurImage_opts_none.cpp',
135 '../src/opts/SkMorphology_opts_none.cpp', 138 '../src/opts/SkMorphology_opts_none.cpp',
136 '../src/opts/SkUtils_opts_none.cpp', 139 '../src/opts/SkUtils_opts_none.cpp',
140 '../src/opts/SkTextureCompression_opts_none.cpp',
137 '../src/opts/SkXfermode_opts_none.cpp', 141 '../src/opts/SkXfermode_opts_none.cpp',
138 ], 142 ],
139 }], 143 }],
140 [ 'skia_android_framework', { 144 [ 'skia_android_framework', {
141 'cflags!': [ 145 'cflags!': [
142 '-msse2', 146 '-msse2',
143 '-mfpu=neon', 147 '-mfpu=neon',
144 '-fomit-frame-pointer', 148 '-fomit-frame-pointer',
145 '-mno-apcs-frame', 149 '-mno-apcs-frame',
146 ] 150 ]
147 }], 151 }],
148 [ 'skia_arch_type == "arm64"', { 152 [ 'skia_arch_type == "arm64"', {
149 'sources': [ 153 'sources': [
150 '../src/opts/SkBitmapProcState_arm_neon.cpp', 154 '../src/opts/SkBitmapProcState_arm_neon.cpp',
151 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp', 155 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp',
152 '../src/opts/SkBitmapProcState_opts_arm.cpp', 156 '../src/opts/SkBitmapProcState_opts_arm.cpp',
153 '../src/opts/SkBlitMask_opts_arm.cpp', 157 '../src/opts/SkBlitMask_opts_arm.cpp',
154 '../src/opts/SkBlitMask_opts_arm_neon.cpp', 158 '../src/opts/SkBlitMask_opts_arm_neon.cpp',
155 '../src/opts/SkBlitRow_opts_arm.cpp', 159 '../src/opts/SkBlitRow_opts_arm.cpp',
156 '../src/opts/SkBlitRow_opts_arm_neon.cpp', 160 '../src/opts/SkBlitRow_opts_arm_neon.cpp',
157 '../src/opts/SkBlurImage_opts_arm.cpp', 161 '../src/opts/SkBlurImage_opts_arm.cpp',
158 '../src/opts/SkBlurImage_opts_neon.cpp', 162 '../src/opts/SkBlurImage_opts_neon.cpp',
159 '../src/opts/SkMorphology_opts_arm.cpp', 163 '../src/opts/SkMorphology_opts_arm.cpp',
160 '../src/opts/SkMorphology_opts_neon.cpp', 164 '../src/opts/SkMorphology_opts_neon.cpp',
165 '../src/opts/SkTextureCompression_opts_none.cpp',
161 '../src/opts/SkUtils_opts_none.cpp', 166 '../src/opts/SkUtils_opts_none.cpp',
162 '../src/opts/SkXfermode_opts_arm.cpp', 167 '../src/opts/SkXfermode_opts_arm.cpp',
163 '../src/opts/SkXfermode_opts_arm_neon.cpp', 168 '../src/opts/SkXfermode_opts_arm_neon.cpp',
164 ], 169 ],
165 }], 170 }],
166 ], 171 ],
167 }, 172 },
168 # For the same lame reasons as what is done for skia_opts, we have to 173 # For the same lame reasons as what is done for skia_opts, we have to
169 # create another target specifically for SSSE3 code as we would not want 174 # create another target specifically for SSSE3 code as we would not want
170 # to compile the SSE2 code with -mssse3 which would potentially allow 175 # to compile the SSE2 code with -mssse3 which would potentially allow
171 # gcc to generate SSSE3 code. 176 # gcc to generate SSSE3 code.
172 { 177 {
173 'target_name': 'opts_ssse3', 178 'target_name': 'opts_ssse3',
174 'product_name': 'skia_opts_ssse3', 179 'product_name': 'skia_opts_ssse3',
175 'type': 'static_library', 180 'type': 'static_library',
176 'standalone_static_library': 1, 181 'standalone_static_library': 1,
177 'dependencies': [ 182 'dependencies': [
178 'core.gyp:*', 183 'core.gyp:*',
179 'effects.gyp:*' 184 'effects.gyp:*'
180 ], 185 ],
181 'include_dirs': [ 186 'include_dirs': [
182 '../src/core', 187 '../src/core',
188 '../src/utils',
183 ], 189 ],
184 'conditions': [ 190 'conditions': [
185 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome os", "android"] \ 191 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome os", "android"] \
186 and not skia_android_framework', { 192 and not skia_android_framework', {
187 'cflags': [ 193 'cflags': [
188 '-mssse3', 194 '-mssse3',
189 ], 195 ],
190 }], 196 }],
191 # (Mac has -mssse3 globally.) 197 # (Mac has -mssse3 globally.)
192 [ 'skia_arch_type == "x86"', { 198 [ 'skia_arch_type == "x86"', {
(...skipping 11 matching lines...) Expand all
204 'target_name': 'opts_sse4', 210 'target_name': 'opts_sse4',
205 'product_name': 'skia_opts_sse4', 211 'product_name': 'skia_opts_sse4',
206 'type': 'static_library', 212 'type': 'static_library',
207 'standalone_static_library': 1, 213 'standalone_static_library': 1,
208 'dependencies': [ 214 'dependencies': [
209 'core.gyp:*', 215 'core.gyp:*',
210 'effects.gyp:*' 216 'effects.gyp:*'
211 ], 217 ],
212 'include_dirs': [ 218 'include_dirs': [
213 '../src/core', 219 '../src/core',
220 '../src/utils',
214 ], 221 ],
215 'conditions': [ 222 'conditions': [
216 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome os", "android"] \ 223 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome os", "android"] \
217 and not skia_android_framework', { 224 and not skia_android_framework', {
218 'cflags': [ 225 'cflags': [
219 '-msse4', 226 '-msse4',
220 ], 227 ],
221 }], 228 }],
222 [ 'skia_os == "mac"', { 229 [ 'skia_os == "mac"', {
223 'xcode_settings': { 230 'xcode_settings': {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 'product_name': 'skia_opts_neon', 264 'product_name': 'skia_opts_neon',
258 'type': 'static_library', 265 'type': 'static_library',
259 'standalone_static_library': 1, 266 'standalone_static_library': 1,
260 'dependencies': [ 267 'dependencies': [
261 'core.gyp:*', 268 'core.gyp:*',
262 'effects.gyp:*' 269 'effects.gyp:*'
263 ], 270 ],
264 'include_dirs': [ 271 'include_dirs': [
265 '../src/core', 272 '../src/core',
266 '../src/opts', 273 '../src/opts',
274 '../src/utils',
267 ], 275 ],
268 'cflags!': [ 276 'cflags!': [
269 '-fno-omit-frame-pointer', 277 '-fno-omit-frame-pointer',
270 '-mfpu=vfp', # remove them all, just in case. 278 '-mfpu=vfp', # remove them all, just in case.
271 '-mfpu=vfpv3', 279 '-mfpu=vfpv3',
272 '-mfpu=vfpv3-d16', 280 '-mfpu=vfpv3-d16',
273 ], 281 ],
274 'conditions': [ 282 'conditions': [
275 [ 'not skia_android_framework', { 283 [ 'not skia_android_framework', {
276 'cflags': [ 284 'cflags': [
277 '-mfpu=neon', 285 '-mfpu=neon',
278 '-fomit-frame-pointer', 286 '-fomit-frame-pointer',
279 ], 287 ],
280 }], 288 }],
281 ], 289 ],
282 'ldflags': [ 290 'ldflags': [
283 '-march=armv7-a', 291 '-march=armv7-a',
284 '-Wl,--fix-cortex-a8', 292 '-Wl,--fix-cortex-a8',
285 ], 293 ],
286 'sources': [ 294 'sources': [
287 '../src/opts/memset16_neon.S', 295 '../src/opts/memset16_neon.S',
288 '../src/opts/memset32_neon.S', 296 '../src/opts/memset32_neon.S',
289 '../src/opts/SkBitmapProcState_arm_neon.cpp', 297 '../src/opts/SkBitmapProcState_arm_neon.cpp',
290 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp', 298 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp',
291 '../src/opts/SkBitmapProcState_matrix_neon.h', 299 '../src/opts/SkBitmapProcState_matrix_neon.h',
292 '../src/opts/SkBlitMask_opts_arm_neon.cpp', 300 '../src/opts/SkBlitMask_opts_arm_neon.cpp',
293 '../src/opts/SkBlitRow_opts_arm_neon.cpp', 301 '../src/opts/SkBlitRow_opts_arm_neon.cpp',
294 '../src/opts/SkBlurImage_opts_neon.cpp', 302 '../src/opts/SkBlurImage_opts_neon.cpp',
295 '../src/opts/SkMorphology_opts_neon.cpp', 303 '../src/opts/SkMorphology_opts_neon.cpp',
304 '../src/opts/SkTextureCompression_opts_neon.cpp',
296 '../src/opts/SkXfermode_opts_arm_neon.cpp', 305 '../src/opts/SkXfermode_opts_arm_neon.cpp',
297 ], 306 ],
298 }, 307 },
299 ], 308 ],
300 } 309 }
OLDNEW
« no previous file with comments | « no previous file | gyp/utils.gyp » ('j') | src/opts/SkTextureCompression_opts_neon.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698