mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 21:30:09 +01:00
swr: switch from overriding -march to selecting features
Acked-by: Chuck Atkins <chuck.atkins@kitware.com>
Tested-by: Chuck Atkins <chuck.atkins@kitware.com>
(cherry picked from commit 5a64549f54)
This commit is contained in:
parent
3b4c74963a
commit
cd10b86026
2 changed files with 9 additions and 6 deletions
11
configure.ac
11
configure.ac
|
|
@ -2402,8 +2402,8 @@ if test -n "$with_gallium_drivers"; then
|
|||
swr_llvm_check "swr"
|
||||
|
||||
AC_MSG_CHECKING([whether $CXX supports c++11/AVX/AVX2])
|
||||
AVX_CXXFLAGS="-march=core-avx-i"
|
||||
AVX2_CXXFLAGS="-march=core-avx2"
|
||||
SWR_AVX_CXXFLAGS="-mavx"
|
||||
SWR_AVX2_CXXFLAGS="-mavx2 -mfma -mbmi2 -mf16c"
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
|
|
@ -2413,18 +2413,21 @@ if test -n "$with_gallium_drivers"; then
|
|||
CXXFLAGS="$save_CXXFLAGS"
|
||||
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$AVX_CXXFLAGS $CXXFLAGS"
|
||||
CXXFLAGS="$SWR_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"
|
||||
CXXFLAGS="$SWR_AVX2_CXXFLAGS $CXXFLAGS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],[],
|
||||
[AC_MSG_ERROR([AVX2 compiler support not detected])])
|
||||
CXXFLAGS="$save_CXXFLAGS"
|
||||
AC_LANG_POP([C++])
|
||||
|
||||
AC_SUBST([SWR_AVX_CXXFLAGS])
|
||||
AC_SUBST([SWR_AVX2_CXXFLAGS])
|
||||
|
||||
HAVE_GALLIUM_SWR=yes
|
||||
;;
|
||||
xvc4)
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ distclean-local:
|
|||
lib_LTLIBRARIES = libswrAVX.la libswrAVX2.la
|
||||
|
||||
libswrAVX_la_CXXFLAGS = \
|
||||
-march=core-avx-i \
|
||||
$(SWR_AVX_CXXFLAGS) \
|
||||
-DKNOB_ARCH=KNOB_ARCH_AVX \
|
||||
$(COMMON_CXXFLAGS)
|
||||
|
||||
|
|
@ -171,7 +171,7 @@ libswrAVX_la_LDFLAGS = \
|
|||
$(COMMON_LDFLAGS)
|
||||
|
||||
libswrAVX2_la_CXXFLAGS = \
|
||||
-march=core-avx2 \
|
||||
$(SWR_AVX2_CXXFLAGS) \
|
||||
-DKNOB_ARCH=KNOB_ARCH_AVX2 \
|
||||
$(COMMON_CXXFLAGS)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue