Mesa (master): swr/rast: disable AVX512 optimization of SSE / AVX code

Tim Rowley torowley at kemper.freedesktop.org
Wed Aug 2 16:40:38 UTC 2017


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

Author: Tim Rowley <timothy.o.rowley at intel.com>
Date:   Wed Jul 19 16:16:57 2017 -0500

swr/rast: disable AVX512 optimization of SSE / AVX code

Disable an optimization which implemented sse/avx operations on avx512
using avx512 intrinsics (to avoid switching between lane widths).

Compile with SIMD_OPT_128_AVX512 / SIMD_OPT_256_AVX512 defined to enable
these optimizations.

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

---

 src/gallium/drivers/swr/rasterizer/common/simdlib.hpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/swr/rasterizer/common/simdlib.hpp b/src/gallium/drivers/swr/rasterizer/common/simdlib.hpp
index 0c79cdd660..a4b5854d00 100644
--- a/src/gallium/drivers/swr/rasterizer/common/simdlib.hpp
+++ b/src/gallium/drivers/swr/rasterizer/common/simdlib.hpp
@@ -53,6 +53,7 @@ namespace SIMDImpl
 #if SIMD_ARCH >= SIMD_ARCH_AVX512
         struct AVX512Impl : AVX2Impl
         {
+#if defined(SIMD_OPT_128_AVX512)
 #define __SIMD_LIB_AVX512_HPP__
 #include "simdlib_128_avx512.inl"
 #if defined(SIMD_ARCH_KNIGHTS)
@@ -61,6 +62,7 @@ namespace SIMDImpl
 #include "simdlib_128_avx512_core.inl"
 #endif // defined(SIMD_ARCH_KNIGHTS)
 #undef __SIMD_LIB_AVX512_HPP__
+#endif // SIMD_OPT_128_AVX512
         }; // struct AVX2Impl
 #endif // #if SIMD_ARCH >= SIMD_ARCH_AVX512
 
@@ -108,6 +110,7 @@ namespace SIMDImpl
 #if SIMD_ARCH >= SIMD_ARCH_AVX512
         struct AVX512Impl : AVX2Impl
         {
+#if defined(SIMD_OPT_256_AVX512)
 #define __SIMD_LIB_AVX512_HPP__
 #include "simdlib_256_avx512.inl"
 #if defined(SIMD_ARCH_KNIGHTS)
@@ -116,6 +119,7 @@ namespace SIMDImpl
 #include "simdlib_256_avx512_core.inl"
 #endif // defined(SIMD_ARCH_KNIGHTS)
 #undef __SIMD_LIB_AVX512_HPP__
+#endif // SIMD_OPT_256_AVX512
         }; // struct AVX2Impl
 #endif // #if SIMD_ARCH >= SIMD_ARCH_AVX512
 




More information about the mesa-commit mailing list