From: notaz Date: Mon, 8 Aug 2022 23:05:19 +0000 (+0300) Subject: make: adjust in preparation to enable neon on arm64 X-Git-Tag: r24l~431 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07ade526c4a0b1ddb316aff1459c1bdff31c267a;p=pcsx_rearmed.git make: adjust in preparation to enable neon on arm64 --- diff --git a/Makefile.libretro b/Makefile.libretro index 0a1734bb..e9df3455 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -149,6 +149,7 @@ else CXX = c++ -arch armv7 -isysroot $(IOSSDK) ARCH := arm HAVE_NEON = 1 + HAVE_NEON_ASM = 1 BUILTIN_GPU = neon CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon ASFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon @@ -241,6 +242,7 @@ else ifeq ($(platform), vita) # CFLAGS += -U__ARM_NEON__ HAVE_NEON = 1 + HAVE_NEON_ASM = 1 BUILTIN_GPU = neon DYNAREC = ari64 @@ -299,6 +301,7 @@ else ifeq ($(platform), qnx) CC = qcc -Vgcc_ntoarmv7le CC_AS = $(CC) HAVE_NEON = 1 + HAVE_NEON_ASM = 1 DYNAREC = ari64 BUILTIN_GPU = neon ARCH = arm @@ -327,6 +330,7 @@ else ifeq ($(platform), rpi2) CFLAGS += -marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard ASFLAGS += -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard HAVE_NEON = 1 + HAVE_NEON_ASM = 1 ARCH = arm BUILTIN_GPU = neon DYNAREC = ari64 @@ -338,6 +342,7 @@ else ifeq ($(platform), rpi3) CFLAGS += -marm -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard ASFLAGS += -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard HAVE_NEON = 1 + HAVE_NEON_ASM = 1 ARCH = arm BUILTIN_GPU = neon DYNAREC = ari64 @@ -358,6 +363,7 @@ else ifeq ($(platform), rpi4) CFLAGS += -marm -mcpu=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard ASFLAGS += -mcpu=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard HAVE_NEON = 1 + HAVE_NEON_ASM = 1 ARCH = arm BUILTIN_GPU = neon DYNAREC = ari64 @@ -392,6 +398,7 @@ else ifeq ($(platform), classic_armv7_a7) CPPFLAGS += $(CFLAGS) ASFLAGS += $(CFLAGS) HAVE_NEON = 1 + HAVE_NEON_ASM = 1 ARCH = arm BUILTIN_GPU = neon DYNAREC = ari64 @@ -414,6 +421,7 @@ else ifeq ($(platform), classic_armv8_a35) -fmerge-all-constants -fno-math-errno -march=armv8-a \ -marm -mcpu=cortex-a35 -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard HAVE_NEON = 1 + HAVE_NEON_ASM = 1 ARCH = arm BUILTIN_GPU = neon DYNAREC = ari64 @@ -443,6 +451,7 @@ else ifneq (,$(findstring armv,$(platform))) CFLAGS += -mfpu=neon ASFLAGS += -mfpu=neon HAVE_NEON = 1 + HAVE_NEON_ASM = 1 BUILTIN_GPU = neon endif ifneq (,$(findstring softfloat,$(platform))) diff --git a/frontend/libretro.c b/frontend/libretro.c index 97323f46..15c53a3c 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -1864,7 +1864,7 @@ static void update_variables(bool in_flight) pl_rearmed_cbs.gpu_peops.iUseDither = 0; pl_rearmed_cbs.gpu_peopsgl.bDrawDither = 0; pl_rearmed_cbs.gpu_unai.dithering = 0; -#ifdef __ARM_NEON__ +#ifdef GPU_NEON pl_rearmed_cbs.gpu_neon.allow_dithering = 0; #endif } @@ -1873,7 +1873,7 @@ static void update_variables(bool in_flight) pl_rearmed_cbs.gpu_peops.iUseDither = 1; pl_rearmed_cbs.gpu_peopsgl.bDrawDither = 1; pl_rearmed_cbs.gpu_unai.dithering = 1; -#ifdef __ARM_NEON__ +#ifdef GPU_NEON pl_rearmed_cbs.gpu_neon.allow_dithering = 1; #endif } diff --git a/frontend/libretro_core_options_intl.h b/frontend/libretro_core_options_intl.h index f8379c22..8382ff2d 100644 --- a/frontend/libretro_core_options_intl.h +++ b/frontend/libretro_core_options_intl.h @@ -235,7 +235,7 @@ struct retro_core_option_v2_definition option_defs_tr[] = { }, #endif /* NEW_DYNAREC */ -#ifdef __ARM_NEON__ +#ifdef GPU_NEON { "pcsx_rearmed_neon_interlace_enable", "Interlacing Mode'u etkinleştir", @@ -272,7 +272,7 @@ struct retro_core_option_v2_definition option_defs_tr[] = { }, NULL }, -#endif /* __ARM_NEON__ */ +#endif /* GPU_NEON */ { "pcsx_rearmed_duping_enable", diff --git a/jni/Android.mk b/jni/Android.mk index 96811d3c..d8a01093 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -174,12 +174,14 @@ endif ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) COREFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP -DGPU_NEON + COREFLAGS += -DHAVE_bgr555_to_rgb565 -DHAVE_bgr888_to_x SOURCES_ASM += $(CORE_DIR)/gte_neon.S \ $(NEON_DIR)/psx_gpu/psx_gpu_arm_neon.S \ $(FRONTEND_DIR)/cspace_neon.S SOURCES_C += $(NEON_DIR)/psx_gpu_if.c else ifeq ($(TARGET_ARCH_ABI),armeabi) - COREFLAGS += -DUSE_GPULIB=1 -DGPU_UNAI + COREFLAGS += -DUSE_GPULIB=1 -DGPU_UNAI + COREFLAGS += -DHAVE_bgr555_to_rgb565 SOURCES_ASM += $(UNAI_DIR)/gpu_arm.S \ $(FRONTEND_DIR)/cspace_arm.S SOURCES_C += $(UNAI_DIR)/gpulib_if.cpp