summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorMauro Rossi <[email protected]>2018-10-29 12:59:56 +0100
committerTapani Pälli <[email protected]>2018-10-30 14:45:16 +0200
commitbfe0e3291302f4a8bf2f9b401a07f6d5ade19d15 (patch)
treeb6a9178b73c916efb2f405658a4f8bbe52ac60a0 /src/mesa/drivers
parent50e952840f5a194af0e89fac3383a0c32132f065 (diff)
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 <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/Android.mk17
1 files changed, 9 insertions, 8 deletions
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)