try to enable gpu_neon on 32bit x86
authornotaz <notasas@gmail.com>
Fri, 16 Sep 2022 20:19:39 +0000 (23:19 +0300)
committernotaz <notasas@gmail.com>
Fri, 16 Sep 2022 20:22:44 +0000 (23:22 +0300)
Makefile.libretro

index a3bb43a..7dded84 100644 (file)
@@ -54,7 +54,7 @@ ifneq ($(findstring __thumb__,$(shell $(CC) -E -dD $(CFLAGS) include/arm_feature
        CFLAGS += -marm
 endif
 endif
-ifneq (,$(findstring $(ARCH_DETECTED),x86_64 aarch64))
+ifneq (,$(findstring $(ARCH_DETECTED),i686 x86_64 aarch64))
        BUILTIN_GPU = neon
 endif
 
@@ -534,6 +534,15 @@ endif
 ifdef ALLOW_LIGHTREC_ON_ARM
 CFLAGS += -DALLOW_LIGHTREC_ON_ARM
 endif
+ifeq ($(BUILTIN_GPU),neon)
+ifeq ($(ARCH_DETECTED),i686)
+       CFLAGS_GPU_NEON ?= -msse2 # required
+endif
+ifeq ($(ARCH_DETECTED),x86_64)
+       CFLAGS_GPU_NEON ?= -mssse3 # optional, for more perf
+endif
+CFLAGS += $(CFLAGS_GPU_NEON)
+endif
 
 TARGET ?= libretro.so
 PLATFORM = libretro