[Mesa-dev] [PATCH] android: i965/tiled_memcpy: fix build for x86 generic target
Mauro Rossi
issor.oruam at gmail.com
Mon Oct 29 11:59:56 UTC 2018
x86 32 bit generic target does not enable ARCH_X86_HAVE_SSE4_1
for this reason all Android library modules using SSE4_1 in mesa
are built conditionally to ARCH_X86_HAVE_SSE4_1
The same approach is now applied to libmesa_intel_tiled_memcpy_sse41
in order to avoid the following building errors:
external/mesa/src/mesa/drivers/dri/i965/intel_tiled_memcpy.c:574:15:
error: initializing '__m128i' (vector of 2 'long long' values) with an expression of incompatible type 'int'
__m128i val = _mm_stream_load_si128((__m128i *)src);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/mesa/src/mesa/drivers/dri/i965/intel_tiled_memcpy.c:578:15:
error: initializing '__m128i' (vector of 2 'long long' values) with an expression of incompatible type 'int'
__m128i val0 = _mm_stream_load_si128(((__m128i *)src) + 0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/mesa/src/mesa/drivers/dri/i965/intel_tiled_memcpy.c:579:15:
error: initializing '__m128i' (vector of 2 'long long' values) with an expression of incompatible type 'int'
__m128i val1 = _mm_stream_load_si128(((__m128i *)src) + 1);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/mesa/src/mesa/drivers/dri/i965/intel_tiled_memcpy.c:580:15:
error: initializing '__m128i' (vector of 2 'long long' values) with an expression of incompatible type 'int'
__m128i val2 = _mm_stream_load_si128(((__m128i *)src) + 2);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/mesa/src/mesa/drivers/dri/i965/intel_tiled_memcpy.c:581:15: error: initializing '__m128i' (vector of 2 'long long' values) with an expression of incompatible type 'int'
__m128i val3 = _mm_stream_load_si128(((__m128i *)src) + 3);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 errors generated.
Fixes: 11b1afdc92 ("i965/tiled_memcpy: inline movntdqa loads in tiled_to_linear")
Signed-off-by: Mauro Rossi <issor.oruam at gmail.com>
---
src/mesa/drivers/dri/i965/Android.mk | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk
index e1401ae813..0e9ef48999 100644
--- a/src/mesa/drivers/dri/i965/Android.mk
+++ b/src/mesa/drivers/dri/i965/Android.mk
@@ -71,6 +71,7 @@ include $(BUILD_STATIC_LIBRARY)
# Build libmesa_intel_tiled_memcpy_sse41
# ---------------------------------------
+ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
include $(CLEAR_VARS)
LOCAL_MODULE := libmesa_intel_tiled_memcpy_sse41
@@ -79,13 +80,12 @@ LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES)
LOCAL_SRC_FILES := $(intel_tiled_memcpy_sse41_FILES)
-ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
LOCAL_CFLAGS += \
-DUSE_SSE41 -msse4.1 -mstackrealign
-endif
include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+endif
# ---------------------------------------
# Build libmesa_i965_gen4
@@ -310,11 +310,6 @@ LOCAL_LDFLAGS += $(MESA_DRI_LDFLAGS)
LOCAL_CFLAGS := \
$(MESA_DRI_CFLAGS)
-ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
-LOCAL_CFLAGS += \
- -DUSE_SSE41
-endif
-
LOCAL_C_INCLUDES := \
$(MESA_DRI_C_INCLUDES) \
$(MESA_TOP)/include/drm-uapi
@@ -326,13 +321,19 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
$(MESA_DRI_WHOLE_STATIC_LIBRARIES) \
$(I965_PERGEN_LIBS) \
libmesa_intel_tiled_memcpy \
- libmesa_intel_tiled_memcpy_sse41 \
libmesa_intel_dev \
libmesa_intel_common \
libmesa_isl \
libmesa_blorp \
libmesa_intel_compiler
+ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
+LOCAL_CFLAGS += \
+ -DUSE_SSE41
+LOCAL_WHOLE_STATIC_LIBRARIES += \
+ libmesa_intel_tiled_memcpy_sse41
+endif
+
LOCAL_SHARED_LIBRARIES := \
$(MESA_DRI_SHARED_LIBRARIES)
--
2.19.1
More information about the mesa-dev
mailing list