Commit Graph
39 Commits
Author SHA1 Message Date
libretroadmin 9f13f0f051 Remove sleeps and timed polling from the emulation and render paths
The core no longer sleeps to pace itself: the frontend runs retro_run at
its own rate, so the frame throttle, the idle-vblank delay and the real
clock sync event (and its core option) are gone, and a stepping CPU hands
straight back instead of waiting 2 ms. Waits that polled now park on a
lock-free eventcount through Common/Thread/ParkingLot and are woken by
whoever changes the state: a paused GL emu thread, which also queues a
marker behind its last frame so pausing runs the render queue up to it
instead of polling; async I/O results; the software renderer when its
queue is full; Vulkan pipeline compiles; and debugger requests once
stepping ends. Boot joins the loader thread, cache shutdown joins its
read-ahead thread, and the slow-I/O simulation is removed.

The path browser, the HTTP and WebSocket servers, the Windows console and
the game info cache are left out of the core build. libretro/test gains
lrgltest, which drives the GL backend on a surfaceless EGL context through
every path that pauses or stops the emu thread; run.sh and the image
checks CI job run it on llvmpipe.
2026-10-08 17:58:42 +02:00
libretroadmin d56b453891 Replace zlib, zstd, libchdr, libzip and libpng with libretro-common
Deflate, zlib and gzip streams go through rinflate and rdeflate, zstd
through rzstd, CHD images through rchd, zip archives through
rzip_archive and PNG through rpng. The bundled libraries, their build
glue and the system-library options are gone; adler32 and uncompress
keep zlib's ABI for the prebuilt FFmpeg archives that still call them.
libretro-common is one CMake library that the core, the headless tool
and the unit tests all link.

The reads take shorter paths on the way. CHD decodes straight from the
loader's reads and a range of blocks at a time, and a file read at any
alignment decodes into place; CSO keeps one inflate stream instead of
one per block; a plain ISO serves a file read with one read of its exact
bytes; a stored zip member is read in place and a deflated one through
restart points rather than a copy of the whole image in memory; zip
members decode into the caller's buffer; sequential reads through the
frontend's VFS skip the seek, which also keeps its buffering.

libretro/test reads one image as ISO, CSO, CHD and zip through the block
devices, boots each, and checks the codecs against Python-made vectors;
a CI job runs it.
2026-10-08 14:14:38 +02:00
libretroadmin 499286a19a libretro: keep autodetected hwaccels out of the MinGW FFmpeg build
On a native MSYS2 build FFmpeg's configure finds the Windows SDK headers
and enables DXVA2 and D3D11VA, whose dxva2.c fails with GCC 14 and later
(a pointer type mismatch in a conditional expression is now an error).
PPSSPP uses no FFmpeg hardware acceleration, so every autodetected
hwaccel and external library is disabled explicitly, which also makes
the result independent of what the build machine has installed.
2026-10-08 10:01:47 +02:00
libretroadmin fd59972918 libretro: build the bundled FFmpeg from source for MinGW
The MinGW platform linked FFmpeg from the toolchain while compiling
against the bundled 3.x headers, which fails against any current FFmpeg.
The prebuilt ffmpeg/Windows libraries cannot stand in: they are MSVC
builds, and GNU ld leaves calls between their function-level COMDATs
unrelocated. The bundled FFmpeg source is now configured and built with
the MinGW toolchain out of tree, with the components from
windows_x64-build.sh, and its static libraries are linked by path, so
the core no longer depends on any FFmpeg installed on the system.
FFMPEG_CROSS_PREFIX names the binutils prefix when cross-compiling.

The build-libretro-mingw CI job no longer installs MSYS2's FFmpeg.
2026-10-08 09:51:32 +02:00
libretroadmin c28abf20a4 libretro: fix the MinGW link of the core
The MinGW platform compiled against the bundled Windows FFmpeg headers
(3.x) but linked the toolchain's FFmpeg, since the bundled libraries are
MSVC builds MinGW cannot link; against a current FFmpeg the old API
calls the 3.x headers select are unresolved. It now compiles against the
same FFmpeg it links, which the existing version guards already handle.
zstd's x86-64 asm decoder loop is enabled for any GNU C compiler, so the
asm source is now built for MinGW too rather than only skipped on MSVC,
and version and iphlpapi join the link for GetFileVersionInfo* and
GetAdaptersAddresses/GetBestInterfaceEx.

A build-libretro-mingw job builds the core with platform=win from
MSYS2 so these breaks show up in CI.
2026-10-08 09:32:50 +02:00
Henrik RydgårdandClaude Opus 5.5 e932d55f1c Build: Only turn off floating-point contraction for CPU emulation
The vertex decoder's C++ steps may fuse, like the vertex JITs do; with
contraction off everywhere, RISC-V's VertexJit test found the JIT and
the steps disagreeing on morphed float UVs. The flag now applies to
Core/MIPS only, in CMake and the libretro Makefile. ndk-build has no
per-file flags, so the legacy Android.mk goes back to the default.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 12:59:04 -06:00
Henrik RydgårdandClaude Opus 5.5 1206528e45 Build: Turn off floating-point contraction for C++
Clang and GCC fuse a * b + c into one rounding on CPUs that have fused
multiply-add, which on ARM64 made the interpreter's dot products, vavg,
vdet and vqmul round differently from x86-64. Fused operations now only
happen where the code asks for them. MSVC doesn't contract by default.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 12:24:43 -06:00
Chris 3a77d51df1 libretro: add GLEW_EGL=1 to build GLEW's EGL backend
GLEW resolves its entry points through GLX unless built with GLEW_EGL. On a
display stack that provides no GLX -- Wayland, or GBM -- glxewInit() returns
GLEW_ERROR_NO_GLX_DISPLAY, glewInit() fails, and the GL backend never starts.

Building the EGL backend resolves them through eglGetProcAddress instead, which
works on both. It is opt-in rather than the default so existing GLX builds are
untouched.

Note that changing this needs ext/glew/glew.o deleted to take effect, since the
Makefile is not a prerequisite of the object.
2026-08-07 15:01:04 +01:00
Bobby Smith 46a07943cc [Libretro] Fix Windows build + D3D11 glitches 2025-08-29 02:29:54 +02:00
Henrik Rydgård 6cfea96e58 Remove D3D9 support, to make future changes easier 2025-06-10 15:07:16 +02:00
oltolm 391e272df7 d3dx9: do not use it 2025-01-18 12:08:03 +01:00
oltolm 2d9f5ecc8f dx9sdk: do not use submodule 2025-01-18 11:28:59 +01:00
sonninnos a1b7d6e84a libretro: easier debug building 2024-05-28 15:55:26 +03:00
Ethan O'Brien 8426b35a80 Cleanup emscripten libretro build target 2023-08-12 14:38:35 -05:00
Gabriel Morazán 6c2f830d3b (Libretro) Makefile Tweak 2023-01-10 11:25:19 -04:00
Bobby Smith 7b47eb0fbd [Libretro] Prevent the removal of "huf_decompress_amd64.S" when doing "make clean" on Linux 2023-01-10 12:30:27 +01:00
Gabriel Morazán 5e4492b43f Libretro Buildbot Fix 2022-11-24 13:51:13 -04:00
GABO1423 2af55d37ad (Libretro) Huge MSVC Build Overhaul 2022-11-24 12:42:38 -04:00
Kingcom e025629d4b Attempt to fix libretro build 2022-10-03 15:50:33 +02:00
Unknown W. Brackets 559fdd167f armips: Also update UWP and ARM64, etc. 2022-09-30 20:16:34 -07:00
Stuart Kenny afdd51c0e6 Build with correct preprocessor flag 2021-11-24 16:37:29 +00:00
twinaphex 35e743c685 (Libretro/Gitlab) Add osx x64 target 2021-03-26 18:06:36 +01:00
Henrik Rydgård dc873bbd42 Add missing -DWITH_UPNP in a couple more places. 2021-03-20 13:46:45 +01:00
Unknown W. Brackets d9aecffd72 Build: Remove old ARM define. 2021-03-02 21:26:03 -08:00
Unknown W. Brackets 5119d79082 Build: Remove IOS define. 2021-03-02 21:04:03 -08:00
jdgleaver 580c0d3e61 (.gitlab-ci.yml) Add linux-i686 and windows-i686 targets (+ prevent creation of 'null' file when building Windows libretro cores) 2021-02-03 15:26:40 +00:00
jdgleaver 32aa4bfdd0 (.gitlab-ci.yml) Add windows-x64 target 2021-01-29 10:29:13 +00:00
Henrik Rydgård dffc36b854 Get Vulkan going again with libretro. Rendering is the wrong size and crashes on exit, but it's a start.
Only tested on Windows.
2020-10-11 19:06:09 +02:00
twinaphex 20d10187cd (Libretro Windows) Buildfix 2020-07-24 08:54:51 +02:00
Henrik Rydgård dd8dd2c15d Libretro: Update minimum windows version to Vista. Committed on behalf of twinaphex
To fix a build error.
2020-07-23 22:37:42 +02:00
twinaphex b8ad9c4d38 (Libretro) Add MSVC 2019 target 2020-07-13 21:12:41 +02:00
plaidman 8b2fcc5fe6 fix unintended line removal from rpi platform 2019-06-07 10:25:33 -04:00
plaidman 98c75085a7 adding arm64 platform to libretro makefile 2019-06-07 09:22:32 -04:00
Aaron Kling 9ee6203545 Squash of a few libretro makeile fixes
Fix https://github.com/libretro/ppsspp/issues/5#issuecomment-383238875

Add missing file

Bump this, in case you are building without .git/ folder

Libretro: remove override directive. (#4)
2018-10-31 10:39:44 -05:00
aliaspider bb64390632 Libretro: update Makefiles. 2018-03-26 17:52:35 +01:00
aliaspider dc490b3fc6 Libretro: msvc build fix. 2018-03-26 15:08:34 +01:00
gouchi 3fedaede1c Libretro: Declare TARGET_ARCH for ARM before the include flags 2018-03-24 23:08:22 +01:00
aliaspider 4113ba74f2 libretro: msvc build fix. 2018-03-24 22:47:12 +01:00
aliaspider c4f7790618 Libretro port. 2018-03-24 12:44:53 +01:00