[Mesa-dev] [PATCH 1/5] android: libmesa_st_mesa: use SSE4.1 optimizations

Mauro Rossi issor.oruam at gmail.com
Mon Feb 1 22:37:40 UTC 2016


The new building rules for x86_64 target in marshallow
have by default ARCH_X86_HAVE_SSE4_1 := true

This triggered a linking issue when building gallium_dri,
because libmesa_st_mesa is used as static library,
but the SSE4.1 optimizations are only built with libmesa_dricore.

This solution allows to avoid the linking issue and
to optimize libmesa_st_mesa with SSE4.1 functions,
when applicable for x86_86 target of marshmallow.
---
 src/mesa/Android.libmesa_st_mesa.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/Android.libmesa_st_mesa.mk b/src/mesa/Android.libmesa_st_mesa.mk
index ee8887b..49e81a5 100644
--- a/src/mesa/Android.libmesa_st_mesa.mk
+++ b/src/mesa/Android.libmesa_st_mesa.mk
@@ -47,7 +47,11 @@ endif # x86
 endif # MESA_ENABLE_ASM
 
 ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
+LOCAL_SRC_FILES += \
+	main/streaming-load-memcpy.c \
+	main/sse_minmax.c
 LOCAL_CFLAGS := \
+	-msse4.1 \
        -DUSE_SSE41
 endif
 
-- 
2.5.0



More information about the mesa-dev mailing list