Re: [Mesa-dev] [PATCH] swr: switch from overriding -march to selecting features

2016-06-17 Thread Emil Velikov
On 17 June 2016 at 14:06, Chuck Atkins  wrote:
> Using these adjusted flags, I can verify SWR running on Intel SandyBridge,
> Intel Haswell, and AMD Interlagos.
>
Not only building but running as well (on AMD hardware) - nice :-) If
any issues arise one could tweak things up a bit - but until then this
looks great.

Thanks guys !
Emil
P.S. Tim, please keep the Cc: mesa-stable ... line within the commit summary.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] swr: switch from overriding -march to selecting features

2016-06-17 Thread Chuck Atkins
Using these adjusted flags, I can verify SWR running on Intel SandyBridge,
Intel Haswell, and AMD Interlagos.

Acked-by: Chuck Atkins 
Tested-by: Chuck Atkins 

- Chuck

On Thu, Jun 16, 2016 at 4:07 PM, Tim Rowley 
wrote:

> ---
>  configure.ac| 11 +++
>  src/gallium/drivers/swr/Makefile.am |  4 ++--
>  2 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index c492e15..cc9bc47 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2400,8 +2400,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"
> @@ -2411,18 +2411,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)
> diff --git a/src/gallium/drivers/swr/Makefile.am
> b/src/gallium/drivers/swr/Makefile.am
> index 8151e4a..d896154 100644
> --- a/src/gallium/drivers/swr/Makefile.am
> +++ b/src/gallium/drivers/swr/Makefile.am
> @@ -125,7 +125,7 @@ COMMON_LDFLAGS = \
>  lib_LTLIBRARIES = libswrAVX.la libswrAVX2.la
>
>  libswrAVX_la_CXXFLAGS = \
> -   -march=core-avx-i \
> +   $(SWR_AVX_CXXFLAGS) \
> -DKNOB_ARCH=KNOB_ARCH_AVX \
> $(COMMON_CXXFLAGS)
>
> @@ -139,7 +139,7 @@ libswrAVX_la_LDFLAGS = \
> $(COMMON_LDFLAGS)
>
>  libswrAVX2_la_CXXFLAGS = \
> -   -march=core-avx2 \
> +   $(SWR_AVX2_CXXFLAGS) \
> -DKNOB_ARCH=KNOB_ARCH_AVX2 \
> $(COMMON_CXXFLAGS)
>
> --
> 1.9.1
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] swr: switch from overriding -march to selecting features

2016-06-16 Thread Tim Rowley
---
 configure.ac| 11 +++
 src/gallium/drivers/swr/Makefile.am |  4 ++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index c492e15..cc9bc47 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2400,8 +2400,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"
@@ -2411,18 +2411,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)
diff --git a/src/gallium/drivers/swr/Makefile.am 
b/src/gallium/drivers/swr/Makefile.am
index 8151e4a..d896154 100644
--- a/src/gallium/drivers/swr/Makefile.am
+++ b/src/gallium/drivers/swr/Makefile.am
@@ -125,7 +125,7 @@ COMMON_LDFLAGS = \
 lib_LTLIBRARIES = libswrAVX.la libswrAVX2.la
 
 libswrAVX_la_CXXFLAGS = \
-   -march=core-avx-i \
+   $(SWR_AVX_CXXFLAGS) \
-DKNOB_ARCH=KNOB_ARCH_AVX \
$(COMMON_CXXFLAGS)
 
@@ -139,7 +139,7 @@ libswrAVX_la_LDFLAGS = \
$(COMMON_LDFLAGS)
 
 libswrAVX2_la_CXXFLAGS = \
-   -march=core-avx2 \
+   $(SWR_AVX2_CXXFLAGS) \
-DKNOB_ARCH=KNOB_ARCH_AVX2 \
$(COMMON_CXXFLAGS)
 
-- 
1.9.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev