AC_ARG_WITH([swr-archs],
[AS_HELP_STRING([--with-swr-archs@<:@=DIRS...@:>@],
[comma delimited swr architectures list, e.g.
- "avx,avx2" @<:@default="avx,avx2"@:>@])],
+ "avx,avx2,knl,skx" @<:@default="avx,avx2"@:>@])],
[with_swr_archs="$withval"],
[with_swr_archs="avx,avx2"])
AC_SUBST([SWR_AVX2_CXXFLAGS])
HAVE_SWR_AVX2=yes
;;
+ xknl)
+ swr_require_cxx_feature_flags "KNL" "defined(__AVX512F__) && defined(__AVX512ER__)" \
+ ",-march=knl,-xMIC-AVX512" \
+ SWR_KNL_CXXFLAGS
+ AC_SUBST([SWR_KNL_CXXFLAGS])
+ HAVE_SWR_KNL=yes
+ ;;
+ xskx)
+ swr_require_cxx_feature_flags "SKX" "defined(__AVX512F__) && defined(__AVX512BW__)" \
+ ",-march=skylake-avx512,-xCORE-AVX512" \
+ SWR_SKX_CXXFLAGS
+ AC_SUBST([SWR_SKX_CXXFLAGS])
+ HAVE_SWR_SKX=yes
+ ;;
*)
AC_MSG_ERROR([unknown SWR build architecture '$arch'])
;;
done
if test "x$HAVE_SWR_AVX" != xyes -a \
- "x$HAVE_SWR_AVX2" != xyes; then
+ "x$HAVE_SWR_AVX2" != xyes -a \
+ "x$HAVE_SWR_KNL" != xyes -a \
+ "x$HAVE_SWR_SKX" != xyes -a; then
AC_MSG_ERROR([swr enabled but no swr architectures selected])
fi
AM_CONDITIONAL(HAVE_SWR_AVX, test "x$HAVE_SWR_AVX" = xyes)
AM_CONDITIONAL(HAVE_SWR_AVX2, test "x$HAVE_SWR_AVX2" = xyes)
+AM_CONDITIONAL(HAVE_SWR_KNL, test "x$HAVE_SWR_KNL" = xyes)
+AM_CONDITIONAL(HAVE_SWR_SKX, test "x$HAVE_SWR_SKX" = xyes)
dnl We need to validate some needed dependencies for renderonly drivers.
libmesaswr_la_CXXFLAGS += -DHAVE_SWR_AVX2
endif
+if HAVE_SWR_KNL
+libmesaswr_la_CXXFLAGS += -DHAVE_SWR_KNL
+endif
+
+if HAVE_SWR_SKX
+libmesaswr_la_CXXFLAGS += -DHAVE_SWR_SKX
+endif
+
COMMON_SOURCES = \
$(ARCHRAST_CXX_SOURCES) \
$(COMMON_CXX_SOURCES) \
$(COMMON_LDFLAGS)
endif
+if HAVE_SWR_KNL
+lib_LTLIBRARIES += libswrKNL.la
+
+libswrKNL_la_CXXFLAGS = \
+ $(SWR_KNL_CXXFLAGS) \
+ -DKNOB_ARCH=KNOB_ARCH_AVX512 -DAVX512F_STRICT \
+ $(COMMON_CXXFLAGS)
+
+libswrKNL_la_SOURCES = \
+ $(COMMON_SOURCES)
+
+libswrKNL_la_LDFLAGS = \
+ $(COMMON_LDFLAGS)
+endif
+
+if HAVE_SWR_SKX
+lib_LTLIBRARIES += libswrSKX.la
+
+libswrSKX_la_CXXFLAGS = \
+ $(SWR_SKX_CXXFLAGS) \
+ -DKNOB_ARCH=KNOB_ARCH_AVX512 \
+ $(COMMON_CXXFLAGS)
+
+libswrSKX_la_SOURCES = \
+ $(COMMON_SOURCES)
+
+libswrSKX_la_LDFLAGS = \
+ $(COMMON_LDFLAGS)
+endif
+
include $(top_srcdir)/install-gallium-links.mk
# Generated gen_builder.hpp is not backwards compatible. So ship only one
util_cpu_detect();
+ if (!strlen(filename) &&
+ util_cpu_caps.has_avx512f && util_cpu_caps.has_avx512er) {
+#if HAVE_SWR_KNL
+ fprintf(stderr, "KNL ");
+ sprintf(filename, "%s%s%s", UTIL_DL_PREFIX, "swrKNL", UTIL_DL_EXT);
+#else
+ fprintf(stderr, "KNL (not built) ");
+#endif
+ }
+
+ if (!strlen(filename) &&
+ util_cpu_caps.has_avx512f && util_cpu_caps.has_avx512bw) {
+#if HAVE_SWR_SKX
+ fprintf(stderr, "SKX ");
+ sprintf(filename, "%s%s%s", UTIL_DL_PREFIX, "swrSKX", UTIL_DL_EXT);
+#else
+ fprintf(stderr, "SKX (not built) ");
+#endif
+ }
+
if (!strlen(filename) && util_cpu_caps.has_avx2) {
#if HAVE_SWR_AVX2
fprintf(stderr, "AVX2 ");