# in the first entry.
LIBDRM_REQUIRED=2.4.75
LIBDRM_RADEON_REQUIRED=2.4.71
-LIBDRM_AMDGPU_REQUIRED=2.4.81
+LIBDRM_AMDGPU_REQUIRED=2.4.82
LIBDRM_INTEL_REQUIRED=2.4.75
LIBDRM_NVVIEUX_REQUIRED=2.4.66
LIBDRM_NOUVEAU_REQUIRED=2.4.66
[D3D_DRIVER_INSTALL_DIR="${libdir}/d3d"])
AC_SUBST([D3D_DRIVER_INSTALL_DIR])
+dnl Architectures to build SWR library for
+
+AC_ARG_WITH([swr-archs],
+ [AS_HELP_STRING([--with-swr-archs@<:@=DIRS...@:>@],
+ [comma delimited swr architectures list, e.g.
+ "avx,avx2,knl,skx" @<:@default="avx,avx2"@:>@])],
+ [with_swr_archs="$withval"],
+ [with_swr_archs="avx,avx2"])
+
dnl
dnl r300 doesn't strictly require LLVM, but for performance reasons we
dnl highly recommend LLVM usage. So require it at least on x86 and x86_64
SWR_AVX_CXXFLAGS
AC_SUBST([SWR_AVX_CXXFLAGS])
- swr_require_cxx_feature_flags "AVX2" "defined(__AVX2__)" \
- ",-mavx2 -mfma -mbmi2 -mf16c,-march=core-avx2" \
- SWR_AVX2_CXXFLAGS
- AC_SUBST([SWR_AVX2_CXXFLAGS])
+ swr_archs=`IFS=', '; echo $with_swr_archs`
+ for arch in $swr_archs; do
+ case "x$arch" in
+ xavx)
+ HAVE_SWR_AVX=yes
+ ;;
+ xavx2)
+ swr_require_cxx_feature_flags "AVX2" "defined(__AVX2__)" \
+ ",-mavx2 -mfma -mbmi2 -mf16c,-march=core-avx2" \
+ SWR_AVX2_CXXFLAGS
+ 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'])
+ ;;
+ esac
+ done
+
+ if test "x$HAVE_SWR_AVX" != xyes -a \
+ "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
HAVE_GALLIUM_SWR=yes
;;
llvm_add_default_components "gallium"
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.
if test "x$HAVE_GALLIUM_ETNAVIV" != xyes -a "x$HAVE_GALLIUM_IMX" = xyes ; then
echo " HUD lmsensors: yes"
fi
+echo ""
+if test "x$HAVE_GALLIUM_SWR" != x; then
+ echo " SWR archs: $swr_archs"
+fi
+
dnl Libraries
echo ""
echo " Shared libs: $enable_shared"