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

Side by Side Diff: src/opts/opts_check_x86.cpp

Issue 331193004: Temporarily limit x86 SIMD to SSE2 only, to see effect on all benches and bots. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009 The Android Open Source Project 2 * Copyright 2009 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmapFilter_opts_SSE2.h" 8 #include "SkBitmapFilter_opts_SSE2.h"
9 #include "SkBitmapProcState_opts_SSE2.h" 9 #include "SkBitmapProcState_opts_SSE2.h"
10 #include "SkBitmapProcState_opts_SSSE3.h" 10 #include "SkBitmapProcState_opts_SSSE3.h"
11 #include "SkBlitMask.h" 11 #include "SkBlitMask.h"
12 #include "SkBlitRect_opts_SSE2.h" 12 #include "SkBlitRect_opts_SSE2.h"
13 #include "SkBlitRow.h" 13 #include "SkBlitRow.h"
14 #include "SkBlitRow_opts_SSE2.h" 14 #include "SkBlitRow_opts_SSE2.h"
15 #include "SkBlurImage_opts_SSE2.h" 15 #include "SkBlurImage_opts_SSE2.h"
16 #include "SkMorphology_opts.h" 16 #include "SkMorphology_opts.h"
17 #include "SkMorphology_opts_SSE2.h" 17 #include "SkMorphology_opts_SSE2.h"
18 #include "SkRTConf.h" 18 #include "SkRTConf.h"
19 #include "SkUtils.h" 19 #include "SkUtils.h"
20 #include "SkUtils_opts_SSE2.h" 20 #include "SkUtils_opts_SSE2.h"
21 #include "SkXfermode.h" 21 #include "SkXfermode.h"
22 #include "SkXfermode_proccoeff.h" 22 #include "SkXfermode_proccoeff.h"
23 23
24 // Temporarily disable everything but SSE2: crbug.com/372232.
25 #if 1
26 static inline bool supports_simd(int minLevel) {
27 SkASSERT(SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2);
28 return minLevel <= SK_CPU_SSE_LEVEL_SSE2;
29 }
30 #else
31
24 #if defined(_MSC_VER) && defined(_WIN64) 32 #if defined(_MSC_VER) && defined(_WIN64)
25 #include <intrin.h> 33 #include <intrin.h>
26 #endif 34 #endif
27 35
28 /* This file must *not* be compiled with -msse or any other optional SIMD 36 /* This file must *not* be compiled with -msse or any other optional SIMD
29 extension, otherwise gcc may generate SIMD instructions even for scalar ops 37 extension, otherwise gcc may generate SIMD instructions even for scalar ops
30 (and thus give an invalid instruction on Pentium3 on the code below). 38 (and thus give an invalid instruction on Pentium3 on the code below).
31 For example, only files named *_SSE2.cpp in this directory should be 39 For example, only files named *_SSE2.cpp in this directory should be
32 compiled with -msse2 or higher. */ 40 compiled with -msse2 or higher. */
33 41
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 * instructions. So for that particular case we disable our SSSE3 option s. 117 * instructions. So for that particular case we disable our SSSE3 option s.
110 */ 118 */
111 return false; 119 return false;
112 #else 120 #else
113 static int gSIMDLevel = get_SIMD_level(); 121 static int gSIMDLevel = get_SIMD_level();
114 return (minLevel <= gSIMDLevel); 122 return (minLevel <= gSIMDLevel);
115 #endif 123 #endif
116 } 124 }
117 } 125 }
118 126
127 #endif // Temporarily disable everything but SSE2: crbug.com/372232.
128
119 //////////////////////////////////////////////////////////////////////////////// 129 ////////////////////////////////////////////////////////////////////////////////
120 130
121 SK_CONF_DECLARE( bool, c_hqfilter_sse, "bitmap.filter.highQualitySSE", false, "U se SSE optimized version of high quality image filters"); 131 SK_CONF_DECLARE( bool, c_hqfilter_sse, "bitmap.filter.highQualitySSE", false, "U se SSE optimized version of high quality image filters");
122 132
123 void SkBitmapProcState::platformConvolutionProcs(SkConvolutionProcs* procs) { 133 void SkBitmapProcState::platformConvolutionProcs(SkConvolutionProcs* procs) {
124 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { 134 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
125 procs->fExtraHorizontalReads = 3; 135 procs->fExtraHorizontalReads = 3;
126 procs->fConvolveVertically = &convolveVertically_SSE2; 136 procs->fConvolveVertically = &convolveVertically_SSE2;
127 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_SSE2; 137 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_SSE2;
128 procs->fConvolveHorizontally = &convolveHorizontally_SSE2; 138 procs->fConvolveHorizontally = &convolveHorizontally_SSE2;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 } else { 380 } else {
371 return SkPlatformXfermodeFactory_impl(rec, mode); 381 return SkPlatformXfermodeFactory_impl(rec, mode);
372 } 382 }
373 } 383 }
374 384
375 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode); 385 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode);
376 386
377 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) { 387 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) {
378 return NULL; 388 return NULL;
379 } 389 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698