aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-07-27 14:56:46 -0500
committerTim Rowley <[email protected]>2017-08-02 11:39:33 -0500
commit39ed8e297cf75bc924db2f81798e18b80502bca7 (patch)
treefb2a749c0a6325a89fc80adefbffcabaf36b1ff6 /src
parentc18d91ca9aa4911a258fb164cab1ed92e781baea (diff)
swr/rast: vmask() implementations for KNL
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/swr/rasterizer/common/simdlib_512_avx512_knights.inl14
1 files changed, 14 insertions, 0 deletions
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)