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

Issue 2145663003: Expand _01 half<->float limitation to _finite. Simplify. (Closed)

Created:
4 years, 5 months ago by mtklein_C
Modified:
4 years, 5 months ago
Reviewers:
msarett, mtklein
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Expand _01 half<->float limitation to _finite. Simplify. It's become clear we need to sometimes deal with values <0 or >1. I'm not yet convinced we care about NaN or +-inf. We had some fairly clever tricks and optimizations here for NEON and SSE. I've thrown them out in favor of a single implementation. If we find the specializations mattered, we can certainly figure out how to extend them to this new range/domain. This happens to add a vectorized float -> half for ARMv7, which was missing from the _01 version. (The SSE strategy was not portable to platforms that flush denorm floats to zero.) I've tested the full float range for FloatToHalf on my desktop and a 5x. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2145663003 CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Fast-Trybot Committed: https://skia.googlesource.com/skia/+/3296bee70d074bb8094b3229dbe12fa016657e90 Committed: https://skia.googlesource.com/skia/+/58e389b0518b46bbe58ba01c23443cf23c18435c

Patch Set 1 #

Patch Set 2 : working #

Patch Set 3 : that feels better #

Patch Set 4 : comments and tweaks #

Patch Set 5 : NEON #

Patch Set 6 : typo #

Total comments: 13

Patch Set 7 : clarify #

Patch Set 8 : drop _mm_packus_epi32 for now. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -108 lines) Patch
M src/core/SkBitmap.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/core/SkHalf.h View 1 2 3 4 5 6 4 chunks +41 lines, -66 lines 0 comments Download
M src/core/SkLinearBitmapPipeline_sample.h View 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkMipMap.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M src/core/SkSpanProcs.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkXfermodeF16.cpp View 7 chunks +21 lines, -21 lines 0 comments Download
M src/effects/gradients/Sk4fGradientPriv.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/opts/SkNx_neon.h View 1 2 3 4 2 chunks +23 lines, -0 lines 0 comments Download
M src/opts/SkNx_sse.h View 1 2 3 4 5 6 7 2 chunks +27 lines, -1 line 0 comments Download
M tests/Float16Test.cpp View 1 2 3 4 5 6 2 chunks +12 lines, -12 lines 0 comments Download
M tests/SkNxTest.cpp View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (29 generated)
mtklein_C
4 years, 5 months ago (2016-07-13 19:26:52 UTC) #12
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names without "master." prefix is ...
4 years, 5 months ago (2016-07-13 19:31:00 UTC) #14
msarett
https://codereview.chromium.org/2145663003/diff/100001/src/core/SkHalf.h File src/core/SkHalf.h (right): https://codereview.chromium.org/2145663003/diff/100001/src/core/SkHalf.h#newcode49 src/core/SkHalf.h:49: Sk4i positive = SkNx_cast<int>(Sk4h::Load(&hs)), nit: I found this code ...
4 years, 5 months ago (2016-07-13 22:07:05 UTC) #17
msarett
https://codereview.chromium.org/2145663003/diff/100001/src/core/SkHalf.h File src/core/SkHalf.h (right): https://codereview.chromium.org/2145663003/diff/100001/src/core/SkHalf.h#newcode56 src/core/SkHalf.h:56: // For denorm half floats, mask in a value ...
4 years, 5 months ago (2016-07-14 12:39:24 UTC) #18
msarett
Alright I finally understand the code. Had to wait until my brain was working a ...
4 years, 5 months ago (2016-07-14 12:59:51 UTC) #19
mtklein_C
I agree... I'll try to make things more understandable and ping the thread later today.
4 years, 5 months ago (2016-07-14 13:41:46 UTC) #20
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-14 16:32:41 UTC) #24
mtklein_C
On 2016/07/14 at 13:41:46, mtklein_C wrote: > I agree... I'll try to make things more ...
4 years, 5 months ago (2016-07-14 16:32:43 UTC) #25
msarett
LGTM
4 years, 5 months ago (2016-07-14 17:18:29 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2145663003/120001
4 years, 5 months ago (2016-07-14 18:01:10 UTC) #30
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-14 18:01:13 UTC) #31
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://skia.googlesource.com/skia/+/3296bee70d074bb8094b3229dbe12fa016657e90
4 years, 5 months ago (2016-07-14 18:02:14 UTC) #33
mtklein
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/2151023003/ by mtklein@google.com. ...
4 years, 5 months ago (2016-07-14 19:02:51 UTC) #35
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-15 13:41:45 UTC) #38
mtklein_C
Don't know why yet, but it looks like the problem with the -Fast- bot was ...
4 years, 5 months ago (2016-07-15 13:58:39 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2145663003/140001
4 years, 5 months ago (2016-07-15 13:58:54 UTC) #44
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-15 13:58:56 UTC) #45
commit-bot: I haz the power
Committed patchset #8 (id:140001) as https://skia.googlesource.com/skia/+/58e389b0518b46bbe58ba01c23443cf23c18435c
4 years, 5 months ago (2016-07-15 14:00:15 UTC) #47
commit-bot: I haz the power
4 years, 5 months ago (2016-07-15 14:00:17 UTC) #48
Message was sent while issue was closed.
CQ bit was unchecked.

Powered by Google App Engine
This is Rietveld 408576698