DescriptionReplace _mm_cvtps_epi32(x) with _mm_cvttps_epi32(_mm_add_ps(0.5f), x).
We don't have control over which way _mm_cvtps_epi32 rounds.
- This makes the SSE SkPMFloat rounding consistent with _neon and _none.
- Sk4f::cast<Sk4i>() is closer to (int)float's behavior. (Correct when >=0).
Add tests that would fail at head.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/92d04da38f03dfabd8cd9a7244588a49be9a2f41
Patch Set 1 #Patch Set 2 : explicit limitation #Patch Set 3 : tweak test #
Messages
Total messages: 6 (2 generated)
|