mesa: guard better when building with sse4.1 optimisations
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 1 Aug 2014 16:06:10 +0000 (17:06 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 12 Aug 2014 23:46:55 +0000 (00:46 +0100)
commitb3121bfd413973f460e2cc9a9f852bdfa1265fcf
tree9f08d6c5df15cfcd3629c6a83f1a8bc952ff1b7e
parent07f583186dd4c5a92f6382c4c232a6a96bd049a6
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 <mattst88@gmail.com>
Cc: Adrian Negreanu <adrian.m.negreanu@intel.com>
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
configure.ac
src/mesa/Android.libmesa_dricore.mk
src/mesa/drivers/dri/i965/Android.mk
src/mesa/drivers/dri/i965/intel_mipmap_tree.c