[Mesa-dev] [PATCH 1/2] mesa: add runtime support for SSSE3

Matt Turner mattst88 at gmail.com
Thu Nov 6 09:59:09 PST 2014


On Thu, Nov 6, 2014 at 4:18 AM, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
> ---
>  configure.ac                       | 6 ++++++
>  src/mesa/x86/common_x86.c          | 4 ++++
>  src/mesa/x86/common_x86_features.h | 4 +++-
>  3 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 03f1bca..cc0a661 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -258,6 +258,12 @@ if test "x$SSE41_SUPPORTED" = x1; then
>  fi
>  AM_CONDITIONAL([SSE41_SUPPORTED], [test x$SSE41_SUPPORTED = x1])
>
> +AX_CHECK_COMPILE_FLAG([-mssse3], [SSSE3_SUPPORTED=1], [SSSE3_SUPPORTED=0])
> +if test "x$SSSE3_SUPPORTED" = x1; then
> +    DEFINES="$DEFINES -DUSE_SSSE3"
> +fi
> +AM_CONDITIONAL([SSSE3_SUPPORTED], [test x$SSSE3_SUPPORTED = x1])
> +
>  dnl Can't have static and shared libraries, default to static if user
>  dnl explicitly requested. If both disabled, set to static since shared
>  dnl was explicitly requested.
> diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c
> index 25f5c40..ad0648a 100644
> --- a/src/mesa/x86/common_x86.c
> +++ b/src/mesa/x86/common_x86.c
> @@ -352,6 +352,10 @@ _mesa_get_x86_features(void)
>
>        __get_cpuid(1, &eax, &ebx, &ecx, &edx);
>
> +#ifdef bit_SSSE3

Why did you put this in an #ifdef bit_SSSE3? That's defined everywhere.


More information about the mesa-dev mailing list