swr/rast: fix invalid sign masks in avx512 simdlib code
authorTim Rowley <timothy.o.rowley@intel.com>
Thu, 4 Jan 2018 16:08:48 +0000 (10:08 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Thu, 4 Jan 2018 19:35:17 +0000 (13:35 -0600)
Should be 0x80000000 instead of 0x8000000.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/common/simdlib_128_avx512.inl
src/gallium/drivers/swr/rasterizer/common/simdlib_256_avx512.inl
src/gallium/drivers/swr/rasterizer/common/simdlib_512_avx512.inl

index 66e830961043b97dfac93ef11151ad4afe282f78..b70a7691e2b734f5fdf858b69b520525b16376a5 100644 (file)
@@ -270,7 +270,7 @@ static SIMDINLINE Float SIMDCALL mask_i32gather_ps(Float old, float const* p, In
 {
     __mmask16 m = 0xf;
     m = _mm512_mask_test_epi32_mask(m, _mm512_castps_si512(__conv(mask)),
-                                _mm512_set1_epi32(0x8000000));
+                                _mm512_set1_epi32(0x80000000));
     return __conv(_mm512_mask_i32gather_ps(
                     __conv(old),
                     m,
index 3f93cfbd7f12cf8899fa98fedce70e0e6190c789..3fcfd250f918028fc917f1f0a70ad41e6c631bc1 100644 (file)
@@ -271,7 +271,7 @@ static SIMDINLINE Float SIMDCALL mask_i32gather_ps(Float old, float const* p, In
 {
     __mmask16 m = 0xff;
     m = _mm512_mask_test_epi32_mask(m, _mm512_castps_si512(__conv(mask)),
-                                _mm512_set1_epi32(0x8000000));
+                                _mm512_set1_epi32(0x80000000));
     return __conv(_mm512_mask_i32gather_ps(
                     __conv(old),
                     m,
index c13b9f616aa08590a9c660b04e2fb4e4e9802380..8de62f2a7e451c0a1266de270290966705c0d78d 100644 (file)
@@ -540,7 +540,7 @@ static SIMDINLINE uint32_t SIMDCALL movemask_pd(Double a)
 }
 static SIMDINLINE uint32_t SIMDCALL movemask_ps(Float a)
 {
-    __mmask16 m = _mm512_test_epi32_mask(castps_si(a), set1_epi32(0x8000000));
+    __mmask16 m = _mm512_test_epi32_mask(castps_si(a), set1_epi32(0x80000000));
     return static_cast<uint32_t>(m);
 }