Mesa (master): swr/rast: don't use _mm256_fmsub_ps in AVX code

Tim Rowley torowley at kemper.freedesktop.org
Thu Jul 6 21:39:45 UTC 2017


Module: Mesa
Branch: master
Commit: d50ef7332c956785934336d757815196c48ac1d6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d50ef7332c956785934336d757815196c48ac1d6

Author: Tim Rowley <timothy.o.rowley at intel.com>
Date:   Thu Jul  6 10:29:38 2017 -0500

swr/rast: don't use _mm256_fmsub_ps in AVX code

Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>

---

 src/gallium/drivers/swr/rasterizer/common/simdlib_256_avx.inl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/swr/rasterizer/common/simdlib_256_avx.inl b/src/gallium/drivers/swr/rasterizer/common/simdlib_256_avx.inl
index aec79e3159..16eb5217cb 100644
--- a/src/gallium/drivers/swr/rasterizer/common/simdlib_256_avx.inl
+++ b/src/gallium/drivers/swr/rasterizer/common/simdlib_256_avx.inl
@@ -182,7 +182,11 @@ static SIMDINLINE Float SIMDCALL fmadd_ps(Float a, Float b, Float c) // return (
     return add_ps(mul_ps(a, b), c);
 }
 
-SIMD_WRAPPER_3(fmsub_ps);   // return (a * b) - c
+static SIMDINLINE Float SIMDCALL fmsub_ps(Float a, Float b, Float c) // return (a * b) - c
+{
+    return sub_ps(mul_ps(a, b), c);
+}
+
 SIMD_WRAPPER_2(max_ps);     // return (a > b) ? a : b
 SIMD_WRAPPER_2(min_ps);     // return (a < b) ? a : b
 SIMD_WRAPPER_2(mul_ps);     // return a * b




More information about the mesa-commit mailing list