[Mesa-dev] [PATCH 09/13] swr/rast: vmask() implementations for KNL
Tim Rowley
timothy.o.rowley at intel.com
Mon Jul 31 19:40:07 UTC 2017
Fixes missing geometry on KNL avx512.
---
.../swr/rasterizer/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 17001be..2ee7639 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.7.4
More information about the mesa-dev
mailing list