If you don't pass this, the compiler refuses to compile the assembly for
pre-v7 CPUs. This also keeps us from building identical, non-NEON code on
aarch64 and x86.
Fixes: a373f77662c5 ("vc4: Use a wrapper file to set VC4_BUILD_NEON instead of CFLAGS.")
v2: Fix Android build by just appending NEON_C_SOURCES when
ARCH_ARM_HAVE_NEON.
Tested-by: Rob Herring <robh@kernel.org>
LOCAL_SRC_FILES := \
$(C_SOURCES)
LOCAL_SRC_FILES := \
$(C_SOURCES)
+ifeq ($(ARCH_ARM_HAVE_NEON),true)
+LOCAL_SRC_FILES += $(NEON_C_SOURCES)
+endif
+
LOCAL_GENERATED_SOURCES := $(MESA_GEN_NIR_H)
LOCAL_C_INCLUDES := \
$(MESA_TOP)/include/drm-uapi
LOCAL_GENERATED_SOURCES := $(MESA_GEN_NIR_H)
LOCAL_C_INCLUDES := \
$(MESA_TOP)/include/drm-uapi
$(top_builddir)/src/broadcom/cle/libbroadcom_cle.la \
$()
$(top_builddir)/src/broadcom/cle/libbroadcom_cle.la \
$()
+if HAVE_ARM_ASM
+noinst_LTLIBRARIES += libvc4_neon.la
+libvc4_la_LIBADD += libvc4_neon.la
+libvc4_neon_la_SOURCES = $(NEON_C_SOURCES)
+libvc4_neon_la_CFLAGS = $(AM_CFLAGS) -mfpu=neon
+endif
+
libvc4_la_LDFLAGS = $(SIM_LDFLAGS)
EXTRA_DIST = kernel/README
libvc4_la_LDFLAGS = $(SIM_LDFLAGS)
EXTRA_DIST = kernel/README
vc4_state.c \
vc4_tiling.c \
vc4_tiling_lt.c \
vc4_state.c \
vc4_tiling.c \
vc4_tiling_lt.c \
vc4_tiling.h \
vc4_uniforms.c \
$()
vc4_tiling.h \
vc4_uniforms.c \
$()
+
+NEON_C_SOURCES := vc4_tiling_lt_neon.c
void *src, uint32_t src_stride,
int cpp, const struct pipe_box *box)
{
void *src, uint32_t src_stride,
int cpp, const struct pipe_box *box)
{
if (util_cpu_caps.has_neon) {
vc4_load_lt_image_neon(dst, dst_stride, src, src_stride,
cpp, box);
if (util_cpu_caps.has_neon) {
vc4_load_lt_image_neon(dst, dst_stride, src, src_stride,
cpp, box);
- } else {
- vc4_load_lt_image_base(dst, dst_stride, src, src_stride,
- cpp, box);
+#endif
+ vc4_load_lt_image_base(dst, dst_stride, src, src_stride,
+ cpp, box);
void *src, uint32_t src_stride,
int cpp, const struct pipe_box *box)
{
void *src, uint32_t src_stride,
int cpp, const struct pipe_box *box)
{
if (util_cpu_caps.has_neon) {
vc4_store_lt_image_neon(dst, dst_stride, src, src_stride,
cpp, box);
if (util_cpu_caps.has_neon) {
vc4_store_lt_image_neon(dst, dst_stride, src, src_stride,
cpp, box);
- } else {
- vc4_store_lt_image_base(dst, dst_stride, src, src_stride,
- cpp, box);
+#endif
+
+ vc4_store_lt_image_base(dst, dst_stride, src, src_stride,
+ cpp, box);
}
#endif /* VC4_TILING_H */
}
#endif /* VC4_TILING_H */