diff options
author | Emil Velikov <[email protected]> | 2014-08-01 17:06:10 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-08-13 00:46:55 +0100 |
commit | b3121bfd413973f460e2cc9a9f852bdfa1265fcf (patch) | |
tree | 9f08d6c5df15cfcd3629c6a83f1a8bc952ff1b7e /configure.ac | |
parent | 07f583186dd4c5a92f6382c4c232a6a96bd049a6 (diff) |
mesa: guard better when building with sse4.1 optimisations
When the compiler is not capable/does not accept -msse4.1 while the target
has the instruction set we'll blow up as _mesa_streaming_load_memcpy is
going to be undefined.
To make sure that never happens, wrap the runtime cpu check+caller in an
ifdef thus do not compile that hunk of the code.
Fix the android build by enabling the optimisation and adding the define
where applicable.
v2: autoconf conditionals end with "fi" rather than endif.
v3: Wrap the definition and call to intel_miptree_{un,}map_movntdqa in
if defined(USE_SSE41). Spotted by Matt.
Cc: Matt Turner <[email protected]>
Cc: Adrian Negreanu <[email protected]>
Cc: "10.1 10.2" <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 9aeebdf148e..4ff87ebaa9d 100644 --- a/configure.ac +++ b/configure.ac @@ -235,6 +235,9 @@ dnl dnl Optional flags, check for compiler support dnl AX_CHECK_COMPILE_FLAG([-msse4.1], [SSE41_SUPPORTED=1], [SSE41_SUPPORTED=0]) +if test "x$SSE41_SUPPORTED" = x1; then + DEFINES="$DEFINES -DUSE_SSE41" +fi AM_CONDITIONAL([SSE41_SUPPORTED], [test x$SSE41_SUPPORTED = x1]) dnl |