Merge branch 'optimization' into dev

This commit is contained in:
fewtarius 2023-11-09 11:28:32 +00:00
commit 6941263356
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
11 changed files with 274 additions and 229 deletions

View file

@ -34,6 +34,11 @@ AMD64:
PROJECT=PC DEVICE=AMD64 ARCH=i686 ./scripts/build_distro PROJECT=PC DEVICE=AMD64 ARCH=i686 ./scripts/build_distro
PROJECT=PC DEVICE=AMD64 ARCH=x86_64 ./scripts/build_distro PROJECT=PC DEVICE=AMD64 ARCH=x86_64 ./scripts/build_distro
INTEL64:
unset DEVICE_ROOT
PROJECT=PC DEVICE=INTEL64 ARCH=i686 ./scripts/build_distro
PROJECT=PC DEVICE=INTEL64 ARCH=x86_64 ./scripts/build_distro
RK3588: RK3588:
unset DEVICE_ROOT unset DEVICE_ROOT
PROJECT=Rockchip DEVICE=RK3588 ARCH=arm ./scripts/build_distro PROJECT=Rockchip DEVICE=RK3588 ARCH=arm ./scripts/build_distro

View file

@ -1,6 +1,6 @@
# determines TARGET_CPU, if not forced by user # determines TARGET_CPU, if not forced by user
if [ -z "${TARGET_CPU}" ]; then if [ -z "${TARGET_CPU}" ]; then
TARGET_CPU=core2 TARGET_CPU="x86-64-v3"
fi fi
# 64bit userland # 64bit userland
@ -17,8 +17,9 @@
TARGET_KERNEL_ARCH=x86 TARGET_KERNEL_ARCH=x86
# setup ARCH specific *FLAGS # setup ARCH specific *FLAGS
TARGET_CFLAGS="-march=${TARGET_CPU}" TARGET_CFLAGS="-march=${TARGET_CPU} -mtune=generic"
TARGET_LDFLAGS="-march=${TARGET_CPU}" TARGET_CXXFLAGS="${TARGET_CFLAGS}"
TARGET_LDFLAGS="${TARGET_CFLAGS}"
# build with SIMD support ( yes / no ) # build with SIMD support ( yes / no )
TARGET_FEATURES+=" mmx sse sse2" # TARGET_FEATURES+=" mmx sse sse2"

View file

@ -13,11 +13,19 @@ PKG_SHORTDESC="DuckStation - PlayStation 1, aka. PSX Emulator"
PKG_TOOLCHAIN="cmake" PKG_TOOLCHAIN="cmake"
PKG_BUILD_FLAGS="-lto" PKG_BUILD_FLAGS="-lto"
pre_configure_target() {
case ${TARGET_ARCH} in
x86_64)
CFLAGS+=" -march=x86-64"
;;
esac
PKG_CMAKE_OPTS_TARGET+=" -DBUILD_SDL_FRONTEND=OFF \ PKG_CMAKE_OPTS_TARGET+=" -DBUILD_SDL_FRONTEND=OFF \
-DBUILD_QT_FRONTEND=OFF \ -DBUILD_QT_FRONTEND=OFF \
-DBUILD_LIBRETRO_CORE=ON \ -DBUILD_LIBRETRO_CORE=ON \
-DENABLE_DISCORD_PRESENCE=OFF \ -DENABLE_DISCORD_PRESENCE=OFF \
-DUSE_X11=OFF" -DUSE_X11=OFF"
}
makeinstall_target() { makeinstall_target() {
mkdir -p ${INSTALL}/usr/lib/libretro mkdir -p ${INSTALL}/usr/lib/libretro

View file

@ -8,6 +8,7 @@ PKG_SITE="https://github.com/libretro/vitaquake2"
PKG_URL="$PKG_SITE/archive/$PKG_VERSION.tar.gz" PKG_URL="$PKG_SITE/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain" PKG_DEPENDS_TARGET="toolchain"
PKG_SHORTDESC="Libretro port of VitaQuakeII (Quake 2 engine)" PKG_SHORTDESC="Libretro port of VitaQuakeII (Quake 2 engine)"
PKG_PATCH_DIRS+="${TARGET_ARCH}"
if [ "${OPENGL_SUPPORT}" = "yes" ]; then if [ "${OPENGL_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" ${OPENGL}" PKG_DEPENDS_TARGET+=" ${OPENGL}"

View file

@ -0,0 +1,18 @@
diff -rupN vitaquake2.orig/Makefile vitaquake2/Makefile
--- vitaquake2.orig/Makefile 2023-09-15 16:57:45.991890996 +0000
+++ vitaquake2/Makefile 2023-09-15 20:08:45.856895708 +0000
@@ -76,6 +76,14 @@ else ifeq ($(platform), linux-portable)
SHARED := -shared -Wl,--version-script=$(CORE_DIR)/link.T
LIBM :=
+else ifeq ($(platform), @DEVICE@)
+ TARGET := $(TARGET_NAME)_libretro.so
+ fpic := -fPIC
+ SHARED := -shared -Wl,--version-script=$(CORE_DIR)/link.T -Wl,--no-undefined
+ CFLAGS += -D_POSIX_C_SOURCE=199309L
+ GLES := 1
+ GLES31 := 1
+
else ifneq (,$(findstring rockchip,$(platform)))
EXT ?= so
TARGET := $(TARGET_NAME)_libretro.$(EXT)

View file

@ -49,17 +49,22 @@ else PKG_CMAKE_OPTS_TARGET+=" -DENABLE_VULKAN=OFF"
fi fi
pre_configure_target() { pre_configure_target() {
PKG_CMAKE_OPTS_TARGET+=" -DANDROID=OFF \ case ${TARGET_ARCH} in
-DENABLE_DISCORD_PRESENCE=OFF \ x86_64)
-DBUILD_QT_FRONTEND=OFF \ CFLAGS+=" -march=x86-64"
-DBUILD_NOGUI_FRONTEND=ON \ ;;
-DCMAKE_BUILD_TYPE=Release \ esac
-DBUILD_SHARED_LIBS=OFF \ PKG_CMAKE_OPTS_TARGET+=" -DANDROID=OFF \
-DUSE_SDL2=ON \ -DENABLE_DISCORD_PRESENCE=OFF \
-DENABLE_CHEEVOS=ON \ -DBUILD_QT_FRONTEND=OFF \
-DUSE_FBDEV=OFF \ -DBUILD_NOGUI_FRONTEND=ON \
-DUSE_EVDEV=ON \ -DCMAKE_BUILD_TYPE=Release \
-DUSE_X11=OFF" -DBUILD_SHARED_LIBS=OFF \
-DUSE_SDL2=ON \
-DENABLE_CHEEVOS=ON \
-DUSE_FBDEV=OFF \
-DUSE_EVDEV=ON \
-DUSE_X11=OFF"
} }
makeinstall_target() { makeinstall_target() {

View file

@ -85,4 +85,3 @@ case ${PROFILE} in
esac esac
ryzenadj --tctl-temp=97 --stapm-limit=${WATTS} --fast-limit=${WATTS} --stapm-time=500 --slow-limit=${WATTS} --slow-time=30 --vrmmax-current=70000 ryzenadj --tctl-temp=97 --stapm-limit=${WATTS} --fast-limit=${WATTS} --stapm-time=500 --slow-limit=${WATTS} --slow-time=30 --vrmmax-current=70000
set_setting system.overclock ${PROFILE}

File diff suppressed because it is too large Load diff

View file

@ -1,14 +1,16 @@
case ${TARGET_ARCH} in case ${TARGET_ARCH} in
x86_64) x86_64)
# (AMD CPUs) k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 if [ -z "${TARGET_CPU}" ]
# athlon-fx amdfam10 barcelona then
# (Intel CPUs) atom core2 nocona TARGET_CPU="x86-64-v3"
# fi
TARGET_CPU="x86-64" ;;
;;
i686) i686)
TARGET_CPU="i686" if [ -z "${TARGET_CPU}" ]
;; then
TARGET_CPU="i686"
fi
;;
esac esac
# kernel command line # kernel command line

View file

@ -2,18 +2,6 @@
# setup system defaults # setup system defaults
################################################################################ ################################################################################
# The TARGET_CPU variable controls which processor should be targeted for
# generated code.
case ${TARGET_ARCH} in
x86_64)
# (AMD CPUs) k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3
# athlon-fx amdfam10 barcelona
# (Intel CPUs) atom core2 nocona
#
TARGET_CPU="x86-64"
;;
esac
# Bootloader to use (syslinux / u-boot) # Bootloader to use (syslinux / u-boot)
BOOTLOADER="syslinux" BOOTLOADER="syslinux"