summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac38
1 files changed, 38 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d4ce99a813b..3b7703088fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2191,6 +2191,16 @@ radeon_llvm_check() {
fi
}
+swr_llvm_check() {
+ gallium_require_llvm $1
+ if test ${LLVM_VERSION_INT} -lt 306; then
+ AC_MSG_ERROR([LLVM version 3.6 or later required when building $1])
+ fi
+ if test "x$enable_gallium_llvm" != "xyes"; then
+ AC_MSG_ERROR([--enable-gallium-llvm is required when building $1])
+ fi
+}
+
dnl Duplicates in GALLIUM_DRIVERS_DIRS are removed by sorting it after this block
if test -n "$with_gallium_drivers"; then
gallium_drivers=`IFS=', '; echo $with_gallium_drivers`
@@ -2263,6 +2273,30 @@ if test -n "$with_gallium_drivers"; then
HAVE_GALLIUM_LLVMPIPE=yes
fi
;;
+ xswr)
+ AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
+ swr_llvm_check "swr"
+
+ AC_MSG_CHECKING([whether $CXX supports AVX/AVX2])
+ AVX_CXXFLAGS="-march=core-avx-i"
+ AVX2_CXXFLAGS="-march=core-avx2"
+
+ AC_LANG_PUSH([C++])
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$AVX_CXXFLAGS $CXXFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],[],
+ [AC_MSG_ERROR([AVX compiler support not detected])])
+ CXXFLAGS="$save_CXXFLAGS"
+
+ save_CFLAGS="$CXXFLAGS"
+ CXXFLAGS="$AVX2_CXXFLAGS $CXXFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],[],
+ [AC_MSG_ERROR([AVX2 compiler support not detected])])
+ CXXFLAGS="$save_CXXFLAGS"
+ AC_LANG_POP([C++])
+
+ HAVE_GALLIUM_SWR=yes
+ ;;
xvc4)
HAVE_GALLIUM_VC4=yes
gallium_require_drm "vc4"
@@ -2352,6 +2386,7 @@ AM_CONDITIONAL(HAVE_GALLIUM_NOUVEAU, test "x$HAVE_GALLIUM_NOUVEAU" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_FREEDRENO, test "x$HAVE_GALLIUM_FREEDRENO" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_LLVMPIPE, test "x$HAVE_GALLIUM_LLVMPIPE" = xyes)
+AM_CONDITIONAL(HAVE_GALLIUM_SWR, test "x$HAVE_GALLIUM_SWR" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_VC4, test "x$HAVE_GALLIUM_VC4" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_VIRGL, test "x$HAVE_GALLIUM_VIRGL" = xyes)
@@ -2461,6 +2496,9 @@ AC_CONFIG_FILES([Makefile
src/gallium/drivers/rbug/Makefile
src/gallium/drivers/softpipe/Makefile
src/gallium/drivers/svga/Makefile
+ src/gallium/drivers/swr/Makefile
+ src/gallium/drivers/swr/avx/Makefile
+ src/gallium/drivers/swr/avx2/Makefile
src/gallium/drivers/trace/Makefile
src/gallium/drivers/vc4/Makefile
src/gallium/drivers/virgl/Makefile