diff options
author | Tim Rowley <[email protected]> | 2017-05-04 18:40:35 -0500 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2017-05-30 17:20:51 -0500 |
commit | cbd33e71f73842ef80bcd32e9c0e26a4989a532c (patch) | |
tree | 3f652dd453ac64a83bab00a5d24819a7a8943e56 /src/gallium/drivers | |
parent | 9fd68be13333140767822c5f5149956333b726e0 (diff) |
swr/rast: fix _simd16_movemask_(ps,pd) native AVX512 intrinsics
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/common/simd16intrin.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/common/simd16intrin.h b/src/gallium/drivers/swr/rasterizer/common/simd16intrin.h index aa4757428fa..2fe18f28282 100644 --- a/src/gallium/drivers/swr/rasterizer/common/simd16intrin.h +++ b/src/gallium/drivers/swr/rasterizer/common/simd16intrin.h @@ -539,8 +539,6 @@ INLINE int SIMDAPI _simd16_testz_ps(simd16scalar a, simd16scalar b) return lo & hi; } -#define _simd16_cmplt_epi32(a, b) _simd16_cmpgt_epi32(b, a) - SIMD16_EMU_AVX512_2(simd16scalar, _simd16_unpacklo_ps, _simd_unpacklo_ps) SIMD16_EMU_AVX512_2(simd16scalar, _simd16_unpackhi_ps, _simd_unpackhi_ps) SIMD16_EMU_AVX512_2(simd16scalard, _simd16_unpacklo_pd, _simd_unpacklo_pd) @@ -898,12 +896,14 @@ INLINE simd16scalari SIMDAPI _simd16_blendv_epi32(simd16scalari a, simd16scalari INLINE simd16mask SIMDAPI _simd16_movemask_ps(simd16scalar a) { - return _simd16_scalari2mask(_mm512_castps_si512(a)); + // movemask_ps only checks the top bit of the float single elements + return _simd16_scalari2mask(_mm512_and_si512(_mm512_castps_si512(a), _mm512_set1_epi32(0x80000000))); } INLINE simd16mask SIMDAPI _simd16_movemask_pd(simd16scalard a) { - return _simd16_scalard2mask(a); + // movemask_pd only checks the top bit of the float double elements + return _simd16_scalard2mask(_mm512_castsi512_pd(_mm512_and_si512(_mm512_castpd_si512(a), _mm512_set1_epi64(0x8000000000000000)))); } #if 0 |