From 39ed8e297cf75bc924db2f81798e18b80502bca7 Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Thu, 27 Jul 2017 14:56:46 -0500 Subject: [PATCH] swr/rast: vmask() implementations for KNL Reviewed-by: Bruce Cherniak --- .../common/simdlib_512_avx512_knights.inl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gallium/drivers/swr/rasterizer/common/simdlib_512_avx512_knights.inl b/src/gallium/drivers/swr/rasterizer/common/simdlib_512_avx512_knights.inl index 17001be0674..2ee7639ccfa 100644 --- a/src/gallium/drivers/swr/rasterizer/common/simdlib_512_avx512_knights.inl +++ b/src/gallium/drivers/swr/rasterizer/common/simdlib_512_avx512_knights.inl @@ -132,6 +132,20 @@ } #define SIMD_IWRAPPER_2I(op) SIMD_IWRAPPER_2I_(op, op) +private: + static SIMDINLINE Integer vmask(__mmask8 m) + { + return _mm512_mask_set1_epi64(_mm512_setzero_si512(), m, -1LL); + } + static SIMDINLINE Integer vmask(__mmask32 m) + { + return _mm512_mask_set1_epi16(_mm512_setzero_si512(), m, -1); + } + static SIMDINLINE Integer vmask(__mmask64 m) + { + return _mm512_mask_set1_epi8(_mm512_setzero_si512(), m, -1); + } + public: SIMD_WRAPPERI_2_(and_ps, and_epi32); // return a & b (float treated as int) SIMD_WRAPPERI_2_(andnot_ps, andnot_epi32); // return (~a) & b (float treated as int) -- 2.30.2