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

Issue 289473009: Add SSE4 optimization of S32A_Opaque_Blitrow (Closed)

Created:
6 years, 7 months ago by henrik.smiding
Modified:
6 years, 5 months ago
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Add SSE4 optimization of S32A_Opaque_Blitrow Adds optimization of Skia S32A_Opaque_Blitrow blitter using SSE4.2 SIMD instruction set. Special case for when alpha is zero or opaque. Performance increase of 10%-400% compared to the existing SSE2 optimization (measured on Silvermont architecture). Noticeable in ~25 different skia bench subtests, especially in bitmap_8888_*, repeatTile_*, and morph_*. bitmap_8888_A - 100% faster bitmap_8888_A_source_transparent - 250% faster bitmap_8888_A_source_opaque - 25% faster bitmap_8888_A_scale_bicubic - 75% faster Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>; Committed: https://skia.googlesource.com/skia/+/e2527b147679b0c43019fae7d59cc3777d2d097e Committed: https://skia.googlesource.com/skia/+/b5c281e1e06af3be804309877de1dac6145686b9 Committed: https://skia.googlesource.com/skia/+/3bb195ef0d9691384027d7b61b0b8ef8379aaf5d

Patch Set 1 #

Total comments: 15

Patch Set 2 : Fixed review comments #

Patch Set 3 : Fixed section type #

Patch Set 4 : Another section fix... #

Patch Set 5 : Fix section, again #

Patch Set 6 : Trying to please clang #

Patch Set 7 : And again... #

Patch Set 8 : Clang is being difficult #

Patch Set 9 : Linker fix(?) #

Patch Set 10 : Excluded clang #

Patch Set 11 : More Clang syntax fixes #

Patch Set 12 : Change from exclude to include check #

Patch Set 13 : Exclude gcc-llvm-combo #

Patch Set 14 : exclude Mac10.6 #

Patch Set 15 : llvm section fix #

Patch Set 16 : llvm really doesn't support gcc/gas... #

Total comments: 2

Patch Set 17 : Added comment and flag #

Patch Set 18 : Fixed Valgrind errors in blitter #

Patch Set 19 : Test to find which clang version wants which label prefix #

Patch Set 20 : Test of label fix #

Patch Set 21 : Fix for double label #

Patch Set 22 : Fix symbols V2 #

Patch Set 23 : Fix deferred test case for Valgrind #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1021 lines, -3 lines) Patch
M gyp/opts.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +37 lines, -1 line 0 comments Download
M gyp/skia_lib.gyp View 1 chunk +1 line, -0 lines 0 comments Download
A src/opts/SkBlitRow_opts_SSE4.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +25 lines, -0 lines 0 comments Download
A src/opts/SkBlitRow_opts_SSE4_asm.S View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +469 lines, -0 lines 0 comments Download
A src/opts/SkBlitRow_opts_SSE4_x64_asm.S View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +466 lines, -0 lines 0 comments Download
M src/opts/opts_check_x86.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +19 lines, -2 lines 0 comments Download
M tests/DeferredCanvasTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 66 (0 generated)
henrik.smiding
6 years, 7 months ago (2014-05-14 16:42:54 UTC) #1
mtklein
Is it possible to write these SSE4 blits in intrinsics without major performance loss? Skia's ...
6 years, 7 months ago (2014-05-14 17:12:43 UTC) #2
henrik.smiding
On 2014/05/14 17:12:43, mtklein wrote: > Is it possible to write these SSE4 blits in ...
6 years, 7 months ago (2014-05-15 17:06:15 UTC) #3
mtklein
https://codereview.chromium.org/289473009/diff/1/gyp/skia_lib.gyp File gyp/skia_lib.gyp (right): https://codereview.chromium.org/289473009/diff/1/gyp/skia_lib.gyp#newcode18 gyp/skia_lib.gyp:18: 'opts.gyp:opts_sse4', Derek, how come we exclude ssse3 and sse4 ...
6 years, 7 months ago (2014-05-16 18:06:39 UTC) #4
henrik.smiding
https://codereview.chromium.org/289473009/diff/1/src/opts/SkBlitRow_opts_SSE4.h File src/opts/SkBlitRow_opts_SSE4.h (right): https://codereview.chromium.org/289473009/diff/1/src/opts/SkBlitRow_opts_SSE4.h#newcode18 src/opts/SkBlitRow_opts_SSE4.h:18: extern "C" void S32A_Blend_BlitRow32_SSE4_asm(SkPMColor* SK_RESTRICT dst, On 2014/05/16 18:06:38, ...
6 years, 7 months ago (2014-05-20 15:10:29 UTC) #5
mtklein
Thanks for your explanations, changes, and patience. This LGTM.
6 years, 6 months ago (2014-06-03 17:03:04 UTC) #6
henrik.smiding
The CQ bit was checked by henrik.smiding@intel.com
6 years, 6 months ago (2014-06-04 10:52:47 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/henrik.smiding@intel.com/289473009/20001
6 years, 6 months ago (2014-06-04 10:53:16 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.chromium ...
6 years, 6 months ago (2014-06-04 11:08:46 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-04 11:21:36 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.chromium (http://108.170.220.76:10117/builders/Build-Mac10.8-Clang-x86-Release-Trybot/builds/1265)
6 years, 6 months ago (2014-06-04 11:21:37 UTC) #11
henrik.smiding
The CQ bit was checked by henrik.smiding@intel.com
6 years, 6 months ago (2014-06-04 12:17:19 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/henrik.smiding@intel.com/289473009/40001
6 years, 6 months ago (2014-06-04 12:18:00 UTC) #13
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.chromium ...
6 years, 6 months ago (2014-06-04 12:44:42 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-04 12:56:34 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.chromium (http://108.170.220.76:10117/builders/Build-Mac10.8-Clang-x86-Release-Trybot/builds/1268)
6 years, 6 months ago (2014-06-04 12:56:35 UTC) #16
henrik.smiding
The CQ bit was checked by henrik.smiding@intel.com
6 years, 6 months ago (2014-06-04 13:50:59 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/henrik.smiding@intel.com/289473009/60001
6 years, 6 months ago (2014-06-04 13:51:50 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.chromium ...
6 years, 6 months ago (2014-06-04 15:15:49 UTC) #19
henrik.smiding
The CQ bit was checked by henrik.smiding@intel.com
6 years, 6 months ago (2014-06-04 15:24:08 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/henrik.smiding@intel.com/289473009/80001
6 years, 6 months ago (2014-06-04 15:24:39 UTC) #21
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.chromium ...
6 years, 6 months ago (2014-06-04 15:51:09 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-04 15:56:39 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.chromium (http://108.170.220.76:10117/builders/Build-Mac10.8-Clang-x86-Release-Trybot/builds/1280)
6 years, 6 months ago (2014-06-04 15:56:39 UTC) #24
henrik.smiding
The CQ bit was checked by henrik.smiding@intel.com
6 years, 6 months ago (2014-06-04 16:28:28 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/henrik.smiding@intel.com/289473009/100001
6 years, 6 months ago (2014-06-04 16:28:59 UTC) #26
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.chromium ...
6 years, 6 months ago (2014-06-04 16:38:39 UTC) #27
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-04 16:41:47 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.chromium (http://108.170.220.76:10117/builders/Build-Mac10.8-Clang-x86-Release-Trybot/builds/1282)
6 years, 6 months ago (2014-06-04 16:41:47 UTC) #29
henrik.smiding
The CQ bit was checked by henrik.smiding@intel.com
6 years, 6 months ago (2014-06-05 07:33:58 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/henrik.smiding@intel.com/289473009/120001
6 years, 6 months ago (2014-06-05 07:34:09 UTC) #31
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.chromium ...
6 years, 6 months ago (2014-06-05 07:43:40 UTC) #32
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-05 07:46:30 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.chromium (http://108.170.220.76:10117/builders/Build-Mac10.8-Clang-x86-Release-Trybot/builds/1298)
6 years, 6 months ago (2014-06-05 07:46:31 UTC) #34
henrik.smiding
The CQ bit was checked by henrik.smiding@intel.com
6 years, 6 months ago (2014-06-05 11:04:51 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/henrik.smiding@intel.com/289473009/140001
6 years, 6 months ago (2014-06-05 11:05:20 UTC) #36
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.chromium ...
6 years, 6 months ago (2014-06-05 11:16:40 UTC) #37
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-05 11:20:04 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.chromium (http://108.170.220.76:10117/builders/Build-Mac10.8-Clang-x86-Release-Trybot/builds/1300)
6 years, 6 months ago (2014-06-05 11:20:05 UTC) #39
henrik.smiding
The CQ bit was checked by henrik.smiding@intel.com
6 years, 6 months ago (2014-06-05 12:45:13 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/henrik.smiding@intel.com/289473009/160001
6 years, 6 months ago (2014-06-05 12:46:15 UTC) #41
commit-bot: I haz the power
Change committed as e2527b147679b0c43019fae7d59cc3777d2d097e
6 years, 6 months ago (2014-06-05 14:50:58 UTC) #42
jvanverth1
A revert of this CL has been created in https://codereview.chromium.org/311053009/ by jvanverth@google.com. The reason for ...
6 years, 6 months ago (2014-06-05 15:15:34 UTC) #43
mtklein
On 2014/06/05 15:15:34, jvanverth1 wrote: > A revert of this CL has been created in ...
6 years, 6 months ago (2014-06-05 15:22:12 UTC) #44
mtklein
On 2014/06/05 15:22:12, mtklein wrote: > On 2014/06/05 15:15:34, jvanverth1 wrote: > > A revert ...
6 years, 6 months ago (2014-06-05 15:29:39 UTC) #45
henrik.smiding
On 2014/06/05 15:29:39, mtklein wrote: > On 2014/06/05 15:22:12, mtklein wrote: > > On 2014/06/05 ...
6 years, 6 months ago (2014-06-09 14:14:34 UTC) #46
mtklein
On 2014/06/09 14:14:34, henrik.smiding wrote: > On 2014/06/05 15:29:39, mtklein wrote: > > On 2014/06/05 ...
6 years, 6 months ago (2014-06-09 14:22:28 UTC) #47
henrik.smiding
On 2014/06/09 14:22:28, mtklein wrote: > On 2014/06/09 14:14:34, henrik.smiding wrote: > > On 2014/06/05 ...
6 years, 6 months ago (2014-06-09 15:16:00 UTC) #48
mtklein
LGTM Checked out those bots. The IntelRHB bot is just an incredibly slow bot, so ...
6 years, 6 months ago (2014-06-17 15:14:30 UTC) #49
henrik.smiding
https://codereview.chromium.org/289473009/diff/300001/src/opts/SkBlitRow_opts_SSE4.h File src/opts/SkBlitRow_opts_SSE4.h (right): https://codereview.chromium.org/289473009/diff/300001/src/opts/SkBlitRow_opts_SSE4.h#newcode13 src/opts/SkBlitRow_opts_SSE4.h:13: #if defined(__clang__) || (defined(__GNUC__) && !defined(SK_BUILD_FOR_MAC)) On 2014/06/17 15:14:29, ...
6 years, 6 months ago (2014-06-17 18:16:38 UTC) #50
henrik.smiding
The CQ bit was checked by henrik.smiding@intel.com
6 years, 6 months ago (2014-06-17 18:17:58 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/henrik.smiding@intel.com/289473009/320001
6 years, 6 months ago (2014-06-17 18:18:43 UTC) #52
commit-bot: I haz the power
Change committed as b5c281e1e06af3be804309877de1dac6145686b9
6 years, 6 months ago (2014-06-17 18:32:51 UTC) #53
Stephen White
I'm seeing a lot of valgrind errors popping up after this commit: % valgrind out/Debug/tests ...
6 years, 6 months ago (2014-06-17 22:38:59 UTC) #54
Stephen White
(As a side note, it would be really nice if these functions used intrinsics instead. ...
6 years, 6 months ago (2014-06-17 22:43:35 UTC) #55
mtklein
On 2014/06/17 22:43:35, Stephen White wrote: > (As a side note, it would be really ...
6 years, 6 months ago (2014-06-17 23:04:22 UTC) #56
Stephen White
On 2014/06/17 23:04:22, mtklein wrote: > On 2014/06/17 22:43:35, Stephen White wrote: > > (As ...
6 years, 6 months ago (2014-06-17 23:10:46 UTC) #57
mtklein
On 2014/06/17 23:10:46, Stephen White wrote: > On 2014/06/17 23:04:22, mtklein wrote: > > On ...
6 years, 6 months ago (2014-06-17 23:12:30 UTC) #58
mtklein
A revert of this CL has been created in https://codereview.chromium.org/336413007/ by mtklein@google.com. The reason for ...
6 years, 6 months ago (2014-06-18 00:33:13 UTC) #59
henrik.smiding
Remaining valgrind errors comes from the 'DeferredCanvas_CPU' test. They seem to come from the 'TestDeferredCanvasBitmapShaderNoLeak' ...
6 years, 6 months ago (2014-06-24 12:54:21 UTC) #60
mtklein
Thanks for fixing the test. Everything LGTM. We're still going to have the problem of ...
6 years, 5 months ago (2014-06-27 13:53:44 UTC) #61
henrik.smiding
On 2014/06/27 13:53:44, mtklein wrote: > Thanks for fixing the test. Everything LGTM. > > ...
6 years, 5 months ago (2014-06-27 14:46:11 UTC) #62
mtklein
On 2014/06/27 14:46:11, henrik.smiding wrote: > On 2014/06/27 13:53:44, mtklein wrote: > > Thanks for ...
6 years, 5 months ago (2014-06-27 14:48:04 UTC) #63
henrik.smiding
The CQ bit was checked by henrik.smiding@intel.com
6 years, 5 months ago (2014-06-27 14:52:18 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/henrik.smiding@intel.com/289473009/430001
6 years, 5 months ago (2014-06-27 14:52:43 UTC) #65
commit-bot: I haz the power
6 years, 5 months ago (2014-06-27 15:03:22 UTC) #66
Message was sent while issue was closed.
Change committed as 3bb195ef0d9691384027d7b61b0b8ef8379aaf5d

Powered by Google App Engine
This is Rietveld 408576698