From: Mauro Rossi Date: Mon, 29 Oct 2018 11:59:56 +0000 (+0100) Subject: android: i965/tiled_memcpy: fix build for x86 generic target X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bfe0e3291302f4a8bf2f9b401a07f6d5ade19d15;p=mesa.git android: i965/tiled_memcpy: fix build for x86 generic target 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 Reviewed-by: Tapani Pälli --- diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk index e125eb6d394..fbad63a0824 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)