summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2018-01-18 14:57:57 -0500
committerGeorge Kyriazis <george.kyriazis@intel.com>2018-01-19 13:15:54 -0600
commit2ed8b6f82704081a8992b3c30995ac8873b0c711 (patch)
tree3f3cd912651ad23cfa32ef4ef4f7a248d2db85cc /configure.ac
parent8ff8c82630ccef75c13c84b5b32b45dda976f4ec (diff)
swr: (autoconf) allow a single swr architecture to be builtin
Part 1 of 2 (part 1 is autoconf changes, part 2 is C++ changes) When only a single SWR architecture is being used, this allows that architecture to be builtin rather than as a separate libswrARCH.so that gets loaded via dlopen. Since there are now several different code paths for each detected CPU architecture, the log output is also adjusted to convey where the backend is getting loaded from. This allows SWR to be used for static mesa builds which are still important for large HPC environments where shared libraries can impose unacceptable application startup times as hundreds of thousands of copies of the libs are loaded from a shared parallel filesystem. Based on an initial implementation by Tim Rowley. v2: Fix comment placement pointed out by Bruce C. Signed-off-by: Chuck Atkins <chuck.atkins@kitware.com> Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com> CC: Tim Rowley <timothy.o.rowley@intel.com> Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index e236a3c54f..7c1fbe0ed1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2640,6 +2640,11 @@ if test -n "$with_gallium_drivers"; then
AC_MSG_ERROR([swr enabled but no swr architectures selected])
fi
+ # test if more than one swr arch configured
+ if test `echo $swr_archs | wc -w` -eq 1; then
+ HAVE_SWR_BUILTIN=yes
+ fi
+
HAVE_GALLIUM_SWR=yes
;;
xvc4)
@@ -2689,6 +2694,7 @@ 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)
+AM_CONDITIONAL(HAVE_SWR_BUILTIN, test "x$HAVE_SWR_BUILTIN" = xyes)
dnl We need to validate some needed dependencies for renderonly drivers.
@@ -3153,7 +3159,11 @@ fi
echo ""
if test "x$HAVE_GALLIUM_SWR" != x; then
- echo " SWR archs: $swr_archs"
+ if test "x$HAVE_SWR_BUILTIN" = xyes; then
+ echo " SWR archs: $swr_archs (builtin)"
+ else
+ echo " SWR archs: $swr_archs"
+ fi
fi
dnl Libraries