Index: src/opts/SkNx_sse.h |
diff --git a/src/opts/SkNx_sse.h b/src/opts/SkNx_sse.h |
index 9751c4db9141246681d8905bbaf2f5220fb293c2..6a64cc86144b826b3d8f3fc20661566b9fa2175f 100644 |
--- a/src/opts/SkNx_sse.h |
+++ b/src/opts/SkNx_sse.h |
@@ -377,4 +377,12 @@ template<> /*static*/ inline Sk4b SkNx_cast<uint8_t, uint16_t>(const Sk4h& src) |
return _mm_packus_epi16(src.fVec, src.fVec); |
} |
+template<> inline Sk4b SkNx_cast<uint8_t, int>(const Sk4i& src) { |
+ return _mm_packus_epi16(_mm_packus_epi16(src.fVec, src.fVec), src.fVec); |
+} |
+ |
+static inline Sk4i Sk4f_round(const Sk4f& x) { |
+ return _mm_cvtps_epi32(x.fVec); |
+} |
+ |
#endif//SkNx_sse_DEFINED |