[Mesa-dev] [PATCH 27/31] swr/rast: Fix SRL call with a non-immediate

George Kyriazis george.kyriazis at intel.com
Tue Feb 13 22:42:45 UTC 2018


Don't count on the compiler automagically converting an srli call to
srl if the shift count isn't an immediate.
---
 src/gallium/drivers/swr/rasterizer/common/simdlib_128_avx.inl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/swr/rasterizer/common/simdlib_128_avx.inl b/src/gallium/drivers/swr/rasterizer/common/simdlib_128_avx.inl
index 56f60a8..b1511c6 100644
--- a/src/gallium/drivers/swr/rasterizer/common/simdlib_128_avx.inl
+++ b/src/gallium/drivers/swr/rasterizer/common/simdlib_128_avx.inl
@@ -206,9 +206,9 @@ SIMD_IWRAPPER_1I(srai_epi32);               // return a >> ImmT   (int32)
 SIMD_IWRAPPER_1I(srli_epi32);               // return a >> ImmT   (uint32)
 SIMD_IWRAPPER_1I_(srli_si, _mm_srli_si128); // return a >> (ImmT*8) (uint)
 
-static SIMDINLINE Integer SIMDCALL srli_epi64(Integer a, uint32_t n)
+static SIMDINLINE Integer SIMDCALL srl_epi64(Integer a, Integer n)
 {
-    return _mm_srli_epi64(a, n);
+    return _mm_srl_epi64(a, n);
 }
 
 template<int ImmT>                              // same as srli_si, but with Float cast to int
-- 
2.7.4



More information about the mesa-dev mailing list