summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-07-20 17:06:14 -0500
committerTim Rowley <[email protected]>2017-08-02 11:39:33 -0500
commiteddbd781af15f655a1dba6949e7c6b214f47e2f8 (patch)
tree52952d881fb85204dc2fad4300a09968d556575d /src/gallium/drivers/swr
parentf253798205a3ce7f577867a96ce487bf20e10909 (diff)
swr/rast: fix movemask_ps / movemask_pd on AVX512
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
-rw-r--r--src/gallium/drivers/swr/rasterizer/common/simdlib_512_avx512.inl9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/common/simdlib_512_avx512.inl b/src/gallium/drivers/swr/rasterizer/common/simdlib_512_avx512.inl
index 1001417704d..1dbfff8c9c1 100644
--- a/src/gallium/drivers/swr/rasterizer/common/simdlib_512_avx512.inl
+++ b/src/gallium/drivers/swr/rasterizer/common/simdlib_512_avx512.inl
@@ -554,15 +554,20 @@ static SIMDINLINE uint64_t SIMDCALL movemask_epi8(Integer a)
static SIMDINLINE uint32_t SIMDCALL movemask_pd(Double a)
{
- __mmask8 m = _mm512_test_epi64_mask(castpd_si(a), set1_epi32(-1));
+ __mmask8 m = _mm512_test_epi64_mask(castpd_si(a), set1_epi64(0x8000000000000000LL));
return static_cast<uint32_t>(m);
}
static SIMDINLINE uint32_t SIMDCALL movemask_ps(Float a)
{
- __mmask16 m = _mm512_test_epi32_mask(castps_si(a), set1_epi32(-1));
+ __mmask16 m = _mm512_test_epi32_mask(castps_si(a), set1_epi32(0x8000000));
return static_cast<uint32_t>(m);
}
+static SIMDINLINE Integer SIMDCALL set1_epi64(long long i) // return i (all elements are same value)
+{
+ return _mm512_set1_epi64(i);
+}
+
static SIMDINLINE Integer SIMDCALL set1_epi32(int i) // return i (all elements are same value)
{
return _mm512_set1_epi32(i);