Commit Graph
1960 Commits
Author SHA1 Message Date
Codex 908c1ea783 record: convert source PCM on the MediaCodec worker
Borrow queue spans, convert at most 256 source frames per action and retain output across partial encoder acceptance. Track source and encoded ends separately through calibration, trim and cancellation. Calculate ceil durations exactly from the binary64 source rate.

Tests cover fractional mono/stereo, packet boundaries, anti-aliasing, empty/short EOF, source gaps, cancellation and file/live calibration. An independent Python rational oracle checks 176 duration cases.
2026-11-16 20:01:26 +01:00
Codex 4a5bde636f record: schedule owned MediaCodec streams on the I/O dispatcher
Copy native stream configuration and URL at cold startup. Negotiate the owned shared RTMP client before publishing Surface readiness, poll producer/resolver/socket interests together, and keep detached DNS notifications independent of dispatcher lifetime. Setup and drain deadlines are I/O-owner-only; no new frame/audio waits or clocks.

Windows contract suite, focused Linux ASan/UBSan and TSan thread/wake tests, and eight actual Android NDK dispatcher compiles pass. Client and recording session boundaries remain mocked; real receiver/device acceptance and frontend activation remain pending.
2026-11-16 20:01:25 +01:00
Codex 3ddbeb2a11 record: connect MediaCodec network output to owned session lifetime
Add an RTMP/FLV-gated network session constructor and bounded network service entry point. Select live AAC priming, skip file creation and MP4 edits, report socket interests, and retire the output before stopping codecs or releasing encoders. The caller retains client ownership.

Windows strict C89 suite plus focused completion check pass. Session fixtures cover cold rollback, file regressions, network failure, delayed retirement and source/GPU closure with native/output boundaries mocked. Dispatcher activation and real receiver/device acceptance remain pending.
2026-11-16 20:01:25 +01:00
Codex d3d8d404c4 record: prime live MediaCodec AAC without publishing calibration
Gate source PCM until measured delay determines the silent input boundary. Drop complete calibration packets before output, retain silent AAC preroll and shift video/source ends to the same epoch. Preserve the existing MP4 calibration/edit path and stable descriptors across output backpressure.

Strict C89 Windows suite passes; calibrated fixtures cover six delays, empty PCM, output backpressure and early cancellation. Native MediaCodec and network session activation still require acceptance.
2026-11-16 20:01:25 +01:00
Codex 8d0b716fca record: integrate native Vulkan frontend capture and A/V drain
Connect the admitted desktop Vulkan encode queue to viewport recording through
an asynchronous worker. Capture GPU pixels in the renderer submission, publish
only successful submissions, and retain source/device resources through stop,
resize and deferred video reinitialization. Refuse unsupported devices, HDR,
formats and audio layouts before creating output. Start after the first core
frame so admission uses its actual audio layout.

Hold PCM on the existing worker queue until encoded video establishes its
clock limit. Trim trailing queued PCM at video EOS before AC-3 padding and
publish the actual consumed count after worker retirement. This prevents a
threaded resize from leaving audio beyond the last captured picture. Add no
producer locks, waits, pixel readbacks or pacing logs.

Configure selects the driver on desktop Vulkan builds with its dependencies;
existing default driver priority is retained. Add frontend admission/lifetime,
delayed-video PCM, terminal-result publication and native isolated-window
resize/reinit/stop regression coverage.

Validation: GCC/Clang ASan+UBSan frontend contracts, Vulkan encode contracts,
recording output/session/dispatch contracts and independent MP4 A/V checks.
Windows native recording passes threaded/direct multichannel float PCM at
32/44.1/48 kHz, plus resize, reinit and stop with Khronos sync validation.
Desktop Linux and Windows frontends build with automatic feature selection.
Native Linux GPU acceptance remains open. The unrelated extended RSLC unsized
uniform-buffer fixture is rejected by the installed standalone SPIR-V validator;
that check is retained as a failure, not reported as an extended-suite pass.
2026-11-16 19:50:40 +01:00
Codex ef75e4fa45 vulkan: reserve an optional dedicated recording queue
Preserve caller device requests and explicit feature opt-outs while adding supported H.264 encode queues, timeline semaphores and synchronization2. Failed optional device creation retries the untouched renderer request; cached devices retain their recording admission state.

Cover feature/queue ownership and fallback with strict C89 and GCC/Clang sanitizer tests. Native Vulkan 1.1 direct-image and buffer recording pass independent A/V checks with zero synchronization-validation errors; Vulkan-enabled frontend and supported threadless C89 builds link. Frontend recording activation remains separate.
2026-11-16 18:33:55 +01:00
Codex fa19896686 record: convert fractional core PCM for Metal file recording
Keep the producer clock and queue budget in source frames. Convert on the recording worker through AudioToolbox, retain converted packets across mux backpressure and retire native input borrows before queue teardown. Preserve the direct path for integral rates and extend conversion contracts through eight channels.
2026-11-16 17:47:49 +01:00
davey f1675e7f4f core signatures: the load check's gate and check task
core_load_check.c checks a core before it is opened: the quick check
on the main thread, else a task hashes it in slices of the shared I/O
window and keeps the result for the load, bound to the file it
checked. A refusal tells whether it only waits for the first run's
seed. Built with HAVE_CORE_LOAD_CHECK; nothing calls it yet. Its unit
harness runs in the samples-tasks job, under ASan and UBSan, TSan and
mingw-w64.

On Windows the check reads the file LoadLibraryW will load: a name
with no '.' is read as <name>.dll, and a \\?\ path ending in '.' is
refused, since CreateFileW opens that name as written while
LoadLibraryW may drop the dot and map another file.
2026-11-16 07:12:21 +01:00
davey 6d6c22d851 core signatures: trust cores inside RetroArch's own package
Whoever can change RetroArch's own .app bundle, or the read-only mount
its binary runs from (Flatpak, AppImage, Snap), can replace RetroArch
itself, so cores there are exempt like it. Linux compares mount ids,
not devices: a Flatpak user install's read-only view of the home shares
/app's device. Not on Windows, Android or the BSDs.

The bundle is looked up through CoreFoundation, which RetroArch and the
core_signature and core_install_check harnesses now link on macOS.
2026-11-16 07:12:21 +01:00
davey f1df7cf157 core signatures: check a core staged for install
Adds the check the install paths will use: a core is staged under
the name it is installed as, checked there and only then moved into
place. The check hashes the staged file even when a record or the
folder rule would pass the file in place: those vouch for the file,
not the download. A check reads as failed until it ends, so a cancel
is a failure.

The old .sig is set aside as <core>.sig.old while the core is renamed
in, then deleted, or renamed back when the rename fails; the new .sig
is placed and the identity read again after the rename. A crash in
between leaves a core without a .sig, never a new core beside the old
one's .sig, and a stray .sig.old is never put back. A core that passed
by its trusted hash keeps its staged .sig only if that .sig verifies
on its own.
2026-11-16 07:12:20 +01:00
davey 738584cd10 core signatures: the Security Warning
core_warning_push() holds one request, a copy of the check that failed,
and opens a screen built like Load Archive / Open Archive: the reason
and the full-access warning as rows above the choices, the line about
turning the checks off below, the cursor on Cancel. An install offers
Install and Trust, a load Load Once and Always Trust This Core, a core
that couldn't be read Cancel only. The text rows are wrapped short
because no menu driver wraps a label. The core updater's two refusal
messages are added with the rest.

The caller's callback gets the choice, or Cancel on Back, a newer
request or quit. Each request has a serial that its screen's rows
carry, so OK on rows built for an older request refreshes the screen
rather than answering the newer one. OK and Back take the screen off
the stack before the callback runs, so a callback that changes the
menu stack (a load starting content) isn't followed by a pop of the
wrong screen. A newer push runs the replaced request's callback with
Cancel inside itself, with the newer request already in the slot; a
choice made from there is ignored.

A request still pending when a stack flush (a tab switch, a menu
reinit) takes its screen away gets it back on the next frame; one
answered before its screen came up leaves none. Info on the screen
does nothing. core_warning_push() refuses during deinit's cancel and
when the menu driver shows no screens (null), so the caller keeps its
request instead of one nobody can answer.

samples/menu/core_warning drives the screen through the shipping
handlers, with core_signature.c rebuilt around the test key and a trust
store of its own.
2026-11-16 07:12:20 +01:00
davey 3e010f2ce6 core signatures: keep the trust store in RetroArch
core_trust_runtime owns the one store: loaded at startup before any
core is opened, saved by a task after each change with one write out at
a time, and written once more at quit, within the exit drain's limit,
if a change didn't go through. A store that can't be read is left alone
and the session's changes stay in memory. With no keys compiled in,
nothing is loaded and the feature acts as if it weren't built. A
test-key build says so at every launch.

Test-key builds keep their store in core_trust.testkey, so what they
record never reaches a release build's store on the same account. On
macOS the store always lives in ~/Library/Application Support/RetroArch,
whatever portable.txt, RAPortableInstall or a Steam build say about the
app's folder.
2026-11-16 07:12:20 +01:00
davey 7e8aeb9d61 core signatures: build switches
HAVE_CORE_SIGNATURES builds the signature check and its trust store,
HAVE_CORE_LOAD_CHECK the check at every core load, and
HAVE_CORE_SIGNING_TEST_KEY the public test key. The first defaults on
where dynamic loading and the crypto library are, a line to turn off
for one target; the load check and the test key default off. configure
has --disable-core_signatures, --enable-core_load_check and
--enable-core_signing_test_key. griffin stops with an #error when
HAVE_CORE_SIGNATURES is set without HAVE_CRYPTO, as it does for
HAVE_S3, rather than failing on crypto/pk.c's missing symbols.
2026-11-16 07:12:19 +01:00
Codex 753e517f4f rhash: use shared AES and hash primitives
Use libretro-common AES in all builds and retain the expanded key across CBC and CTR calls. Keep an AES-only build for targets without the full crypto feature. Preserve full-width CTR carry and remove the duplicate cipher implementation.

Share digest formatting and endian operations. Handle incomplete swap tails without overrunning the buffer. Validate frozen cipher vectors, unaligned primitives and disc/ZIP identification.
2026-11-15 04:27:32 +01:00
Codex 9002f880a9 cheevos: replace mutexes with owner-thread handoffs
Keep client APIs and server responses on one owner thread, using the
libretro-common task queue for HTTP delivery. Run delayed badge prefetch
on that owner with bounded traversal per tick. Document the ownership
contract and remove the client mutex, its call sites and native backends.

Replace the badge-cache spinlock with libretro-common MPSC requests,
atomic surface transfers and deferred reader-safe retirement. Keep keys
immutable across loads and reject stale generations without waiting.

Cover concurrent requests, resets, late uploads, shared-default recovery,
queued client responses, cancellation and destruction. Guard against
reintroducing the removed locks and run sanitizer/portability CI lanes.
2026-11-15 03:12:49 +01:00
LibretroAdmin fd17192acb formats: no file I/O - image_texture's path loaders go through streams/
formats/image_texture.c loaded images by path through the data_transfer
file adapter. Its four path loaders (image_texture_load, _load_ex,
_load_request, _load_request_ex) move to streams/image_texture_file.c,
declared in streams/image_texture_file.h, the same split data_transfer,
cdfs and the DVD reader got. The names and behaviour are unchanged;
callers include the new header.

formats/image_texture.c keeps the buffer decoders and makes
image_texture_load_buffer_probe public so the adapter can reach it.
image_texture_load_set stays in formats/image_texture_set.c: it does no
file I/O of its own, and gfx_surface_still tests it against a stubbed
load_request.

griffin, Makefile.common, the companion test scripts and the sample
Makefiles that build the loaders add streams/image_texture_file.c; the
overlay task sample, which stubs image loading, does not.
2026-11-12 22:27:29 +01:00
LibretroAdmin 68b07f6a1a formats: no file I/O - data_transfer, cdfs and the DVD file reader go through streams/
data_transfer reads only through its reader callback. The path entry
points keep their names, data_transfer_open_prefix and
data_transfer_open_window, in streams/data_transfer_file.c
(<streams/data_transfer_file.h>), which opens the file through
filestream, reads it at offsets and closes it with the transfer;
data_transfer_open_prefix_reader and data_transfer_set_release are the
core's side of that.

cdfs reads only through the stream a track holds. cdfs_open_track,
cdfs_open_data_track and cdfs_open_raw_track are in
streams/cdfs_file.c (<streams/cdfs_file.h>); the length-based sector
probe they use is cdfs_track_sector_size_from_length.

rdvd_vfs, which binds files to the DVD source, and rdvd_stream, which
drives it, are streams/rdvd_vfs.c and streams/rdvd_stream.c, their
headers under <streams/>.

cdfs_file_test covers the path openers: a cooked iso and a raw bin
sized by length, a cue sheet resolving its bin beside it, an INDEX 01
offset, the data track, refusals.
2026-11-12 19:22:20 +01:00
Codex c9260506ee record: drive Metal streaming on the owned I/O worker
Own RTMP setup and socket/producer readiness on the existing dispatcher. Retain independent DNS completion notifications through cancellation, keep native audio conversion on the worker and service the connection before first-picture format binding. Preserve file-mode Mach scheduling and producer retirement barriers.

Add independent native receiver coverage of the URL-owning worker and full network-enabled frontend links with and without threads. Native acceptance remains a gate before frontend streaming selection.
2026-11-12 15:44:20 +01:00
Codex d7f44832a6 record: add worker-owned AudioToolbox AAC packet encoding
Lend two fixed PCM buffers so native callback retention cannot race reuse. Borrow raw AAC output until release, preserve source-frame timestamps, expose priming and final input counts, and keep cancellation ownership explicit.

Add portable callback/loan fault contracts and a native AAC decode oracle with retained failure artifacts. This foundation does not enable Apple streaming; native format, priming and PCM acceptance must pass before landing.
2026-11-12 10:13:38 +01:00
Codex 2f6cdda706 record: stream native NVENC video and AAC over RTMP
Connect the I/O-owned publisher to borrowed encoder packets and direct native AAC input. Keep producer input pending until publish setup completes, schedule network readiness alongside GPU completion, and bound setup and final drain.

Cover packet lifetime and cancellation contracts, native socket wakes, and independent GPU/AAC receiver decoding. Preserve file recording and reject unsupported streaming formats explicitly.
2026-11-10 23:46:07 +01:00
Codex 6ee48d2f87 net/rtmp: own incremental publisher connections
Parse publisher URLs and drive asynchronous resolution, TCP address fallback, TLS and RTMP setup on one I/O owner. Report readiness and local work without an internal wait or clock. Cancel transport resources while retaining producer borrows for retirement; drain plain TCP replies after normal send shutdown.

Exercise URL admission and canceled resolver capacity, plus independently decoded TCP/TLS media through the owned client. Wire normal and Griffin builds and retain completed session status during transport retirement.
2026-11-10 22:57:03 +01:00
Codex 122da7195a record: add borrowed native Windows AAC encoding
Lend native PCM input and retain raw AAC output until its consumer returns the packet. Keep native calls on one recording I/O owner, bound input admission, preserve source timestamps and load optional Media Foundation entry points at runtime.

Use private interface IDs to avoid bulk SDK GUID collisions. Verify real Windows encoding against an independent decoder, including mono/stereo, supported rates and bitrates, partial blocks, large clocks, cancellation and owner checks.
2026-11-10 22:23:07 +01:00
LibretroAdmin a86d86a22c HAVE_RGIF: GIF images through image_texture, image_transfer and the tasks
rgif now loads GIFs wherever RetroArch loads images: thumbnails and
backgrounds through task_image, the image viewer core, the file browser
and the image_texture/image_transfer layer underneath them all.

rgif:
- the image_transfer interface the other decoders have:
  rgif_set_buf_ptr, rgif_set_avail, rgif_header_ready and
  rgif_process_image, giving a 32-bit texture of its own, ARGB32 or
  ABGR32 in native byte order
- RGIF_ABGR, for ABGR32 on big-endian targets
- a file not all read yet gives IMAGE_PROCESS_WAIT and is not touched;
  the image is decoded in one call once it is all in

Wiring, as HAVE_RTGA is wired:
- IMAGE_TYPE_GIF (image.h) and NBIO_TYPE_GIF (task_file_transfer.h),
  both appended so no other value moves
- image_texture_get_type: .gif
- image_transfer: new, free, start, is_valid, set_buffer_ptr, process,
  set_avail; the support matrix gains a GIF column
- task_image and task_file_transfer: GIF is an image task
- FILE_TYPE_GIF ("gif", "GIF"): opened as image content
- the file browser's image extensions, the image viewer core's
  extensions, the System Information list ("GIF (RGIF)") and
  --features ("RGIF"); SUPPORTS_RGIF in config.features.h
- griffin.c, Makefile.common (rgif.o), configure (HAVE_RGIF=yes), and
  next to HAVE_RTGA in every platform Makefile, the Android, Apple,
  MSVC, UWP and QNX projects and the CI compile matrix
- tools/settings_check.py and tools/stack_budget.py check with it

Also: menu_displaylist's image viewer extension list wrote "tga"
without moving its length on, so "webp" and "dds" landed on top of it
and TGA dropped out of the list; it moves on now.

Tests: rgif_test checks the texture in both byte orders against
rgif_decode, the wait before the whole file is in, and a refused file;
image_decode_fuzz sweeps GIF too (every byte of a small GIF set to
edge values, and every truncation), under ASan and UBSan. The griffin
unity build with every codec, the touched objects in a configured
build, the MinGW/C89 syntax check, the overlap check and the stack
budget pass.
2026-11-10 20:00:24 +01:00
LibretroAdmin 4356847c42 gfx/font: move the clean-room TrueType rasterizer into libretro-common
The TrueType loader and rasterizer the stb font renderer carried
inside gfx/drivers_font_renderer/stb.c moves, unchanged, to
libretro-common/gfx/font/rtt.c with its interface in
<gfx/font/rtt.h>, so cores can use it: sfnt/TTC directories, cmap
formats 0/4/6/12, hmtx/hhea/head/maxp metrics, glyf outlines and the
exact-coverage anti-aliased rasterizer with its SSE2/NEON resolves.

It reads the caller's bytes in place, opens no file, and allocates
only to grow the caller's rtt_scratch_t, as before. The scratch's
cell key is packed locally instead of through video_defines.h.

The stb renderer now calls it. Every glyph of four fonts at 12, 24,
48 and 100 pixels renders byte for byte as before, at the same speed.
2026-11-10 19:30:21 +01:00
Codex 5dd6fbbfc8 Add bounded asynchronous resolver jobs
Dispatch lookups through an existing resolver executor and publish borrowed address chains without main-thread waits. Separate caller and worker references keep cancellation safe during queued and executing lookups; cap live requests instead of accumulating canceled jobs.

Exercise ownership failures, concurrent native DNS and the independent RTMP A/V receiver path. Keep executor thread lifetime outside the SDK request.
2026-11-10 18:03:29 +01:00
LibretroAdmin 4ad2961f09 vaapi: drop the libdrm dependency
RetroArch used libdrm only to confirm a render node and to find its
path from Vulkan's device numbers. Both are the same sysfs and /dev/dri
checks libdrm makes on Linux, so make them directly and let VA-API
configure and build with the libva headers alone.
2026-11-09 03:03:14 +01:00
LibretroAdmin 1542b3ab09 Register AV1 VA decoding with the Vulkan renderer
Publish bounded factories for the verified render-device identity while preserving native Vulkan AV1 priority. Start detached retirement before constructing native owners and retain factory storage across renderer replacement. Decline unsupported SDK, threading and atomic configurations without publication.
2026-11-09 00:48:34 +01:00
LibretroAdmin 6d48798625 Retire AV1 native owners after GPU frame returns
Bind the VA runtime, bounded physical pool and opaque frame adapter in a cold owner. Keep partial startup and poisoned native state until successful display termination, and keep runtime handles alive while renderer exports are held.
2026-11-09 00:32:27 +01:00
LibretroAdmin d8035b8ed3 Export AV1 pictures through opaque VA frame leases
Keep independent PRIME exports and their surface generations alive through renderer returns. Snapshot visible geometry per physical incarnation, preserve admitted color and chroma metadata, and decline grain before accepting a stream.
2026-11-09 00:26:45 +01:00
LibretroAdmin e835c18683 Preserve AV1 reference and exported surface incarnations
Rename logical DPB slots onto a bounded native pool while retaining in-flight reads and independently held output tickets. Poll once without waiting, retry buffer retirement without another completion query, and retain poisoned sessions until termination.
2026-11-09 00:20:38 +01:00
LibretroAdmin 730eec59e7 Submit AV1 VA buffers with bounded completion and retirement
Copy complete tile arrays and packet data into a three-buffer VA transaction. Validate the live target, references and tile bounds before native calls; retain partial handles and poison uncertain submissions until real display termination. Reuse the existing zero-timeout completion and retryable retirement contract.
2026-11-09 00:07:57 +01:00
LibretroAdmin 89dac15d17 Publish VP9 VA decoding from Vulkan renderer lifetimes
Resolve the renderer DRM identity at cold session startup, retain native frame owners through deferred retirement, and preserve native Vulkan VP9 priority. Cover startup failures, session bounds, stale renderer epochs and retirement notification ownership.
2026-11-08 22:46:50 +01:00
LibretroAdmin 1248a5c392 Own VP9 VA sessions through deferred frame retirement
Keep native libraries, contexts and surfaces alive until exported renderer frames return. Bound packet admission, preserve partial startup ownership, and retry failed termination without revisiting invalid native handles. Cover pending decode, held frames, partial buffers and termination failures.
2026-11-08 21:58:34 +01:00
LibretroAdmin 1f8508c514 Export VP9 VA pictures through opaque frame leases
Connect the renamed surface pool to generic DMA-BUF exports and producer/renderer return retirement. Keep repeated outputs independent, snapshot color metadata per decoded surface, and retain claimed frames through detach. Cover pending output, carrier backpressure, failed exports and color admission.
2026-11-08 21:45:15 +01:00
LibretroAdmin 437a90abab Keep VP9 VA surfaces alive across logical slot reuse
Rename logical DPB slots onto bounded physical surfaces while decode reads and independent exports remain held. Track each surface incarnation, retain pending transactions and retry completed buffer cleanup without waiting. Cover repeated exports, stale tickets, full-pool backpressure, pending readers and failure retirement.
2026-11-08 21:32:51 +01:00
LibretroAdmin a4b49015eb Submit VP9 VA buffers with bounded completion checks
Use typed VP9 picture, slice and packet buffers with the existing native transaction retirement contract. Keep pending or uncertain GPU work owned, preserve partial failures for cleanup, and poll completion once with a zero timeout. Cover successful and failed submission, poisoned ownership and cleanup retries on portable test lanes.
2026-11-08 21:24:09 +01:00
Codex 6e59d31074 audio: stream native WMA through mixer and media player
Add borrowed ASF and RIFF/xWMA streams with bounded fragment assembly. Drain decoder planes directly into audio_transfer output and reuse the mixer's streaming voices. Route music input through VFS-backed moving windows.

The builtin player uses source-rate integer intervals, float callbacks when supported and a legacy S16 fallback. Respect partial callback acceptance and reset without retaining a growing output queue. Gate the feature with HAVE_RWMA, disabled by default, and preserve FFmpeg/MPV selection.

Test analytic PCM, packet fragments and refill, loop reset, implicit xWMA setup, truncated objects, sample-rate cadence, callback backpressure and codec-disabled builds.
2026-11-08 18:32:37 +01:00
Codex 915cd52c19 formats: add native C89 XMA and WMA decoders
Adapt the MIT WaxFlow spectral decoders with immutable codebooks, reusable transform storage and borrowed PCM output. Keep compressed carry only for frames crossing packet boundaries and look up reused envelopes without copying a resampled curve. Preserve the upstream numeric-table provenance and MIT notices.

Add strict C89, direct-transform, malformed-input and packet-continuation regressions, plus an optional test-only FFmpeg PCM oracle. Gate frontend builds with HAVE_RWMA; playback integration and core replacement remain separate changes.
2026-11-08 17:36:03 +01:00
Codex 925ba3a9d8 Remove LGPL-derived WMA decoders from libretro-common
Revert 7777f39f5c: libretro-common requires an MIT implementation. Remove the derived decoder sources, codebooks and optional build/CI wiring. A replacement must use an independent clean-room process; the LGPL port must not be relabeled or reused as MIT.
2026-11-08 17:03:28 +01:00
Codex 7777f39f5c formats: add self-contained XMA and WMA audio decoders
Adapt LGPL WMA spectral decoding and codebooks behind a C89 packet API without a libavcodec dependency. Decode raw XMA bit spans directly and lend planar float PCM from reusable context storage. Allocate only at creation, retain bounded split-packet history, and keep file I/O, playback and resampling outside the decoder.

Add optional HAVE_RWMA sources, analytical XMA/IMDCT and packet-history tests, malformed-input and allocation checks, and a test-only FFmpeg PCM oracle in CI. Linux ASan/UBSan, MinGW and MSVC focused tests pass. Core migration, history serialization and gameplay validation remain separate.
2026-11-08 16:53:33 +01:00
Codex 5f59c1f42b media: add VA-API HEVC Vulkan PRIME playback
Submit bounded HEVC long-slice metadata through an owned VA session and export native surfaces to a matching Vulkan DRM device. Retain producer and renderer leases through asynchronous submission and device teardown, and refuse unsupported import combinations before publication.

Preserve sampled YUV chroma positioning in GPU conversion and cover decoder, import, retirement and threadless contracts.
2026-11-08 02:19:21 +01:00
LibretroAdmin 0b7c12251d Scanner: Wii U discs, WUX images and Wii U archives
Wii U content did not scan. It now takes the serial lookup by its
product code:

- a WUD, or a Wii U disc by another name (.iso, probed only once the
  other detectors find nothing, so other discs read nothing more), by
  the "WUP-P-XXXX" its header starts with;
- a WUX, through the new formats/wux, the same octets of the disc it
  stands for;
- a Wii U archive (.wua), by the product and company codes of its base
  title's meta/meta.xml, read through formats/zar.

formats/wux reads WUX, the Wii U image format that keeps each distinct
sector once, as the WUD it stands for. Like the other readers it does
no file I/O: it asks for each range it needs. Opening reads the
32-octet header alone; the sector index is read a window at a time,
only where a read needs it; a read's data lands in its own destination,
one request per run of sectors the file keeps in order.

formats/zar gains a directory listing, zar_dir_begin() and
zar_dir_step(), each name read whole, the listing's end ZAR_END.

A Wii U release's serial in the database is the product code and the
maker's two characters, or the code alone for a title sold as a
download; a disc does not say its maker. The code is therefore looked
up as a stem, in the Wii U database alone - glob() in a libretrodb
query now matches binary fields, as a serial is kept - and the release
picked is the one of the maker an archive names, else a download for
an archive and a disc release for a disc. The playlist names the
release found.

wux_test is new, zar_test lists directories, and the scan test gains a
Wii U lane: a WUD, a WUX, a disc named .iso, two archives whose update
is listed before the game, and another database holding the codes.
2026-11-07 13:49:21 +01:00
LibretroAdmin d06c4b2ebd formats/zar: ZArchive reader; scan Xbox 360 games in .zar
formats/zar looks files up in a ZArchive and reads them, with no file
I/O of its own. A lookup asks for a directory's entries a run at a
time and for each name only as far as it can match; a read asks for a
block kept as it is straight into its destination, decodes a
compressed block (HAVE_RZSTD) into the destination when the read
wants all of it, and otherwise into one block kept for the reads that
follow.

The scanner takes a .zar by the title of the default.xex it holds.
2026-11-07 12:23:29 +01:00
LibretroAdmin 5ca1dee585 formats/xdvdfs: Xbox disc file system; scan Xbox games
formats/xdvdfs finds an Xbox disc's game partition, at the start of a
trimmed XISO or where XGD1, XGD2 and XGD3 images keep it, looks files
up in its directory trees and reads the title of its default.xbe, with
no file I/O of its own. A lookup asks for one entry at a time, only as
much of each name as decides the search.

The scanner takes .xiso files, and .iso and .chd files no other
detector finds a serial for, through the serial lookup by the XBE's
title ("MS-004"), without the ISO size hint, which would rule out
trimmed images. Other discs read nothing more for it.
2026-11-07 05:45:07 +01:00
LibretroAdmin f3774dba7c cheevos: hash CISO GameCube/Wii images
rc_hash reads a .ciso file through formats/ciso as the disc image it
stands for, the way RVZ and WIA files are read, so a CISO identifies
as its ISO does. The file reader lives in cheevos/cheevos_ciso.c: it
reads on the descriptor path, straight into the buffer rc_hash gives,
and seeks only when the file is not already where a read starts. The
reader is now built with cheevos as well as with the database.

ciso_hash_test hashes a GameCube disc as an ISO and as a CISO with
blocks left out, and checks the two hashes match.
2026-11-07 04:57:34 +01:00
LibretroAdmin cd1a16c44b formats/ciso: CISO reader; scan .ciso GameCube/Wii images
formats/ciso reads a CISO file as the disc image it stands for, with
no file I/O of its own: like formats/rvz, it describes each range of
the file it needs as a request and the caller supplies it. A read asks
for one range per run of stored blocks, straight into the read's own
destination, and blocks left out are zeroed in place; the head lands
in the block map's own storage and the map is built over it. Heads
that are not CISO, PSP CSO included, are refused.

The scanner takes .ciso files through the serial lookup, reading the
disc header through the reader on a descriptor-path stream.
ciso_test covers the reader and the database scan test a GameCube and
a Wii image, and one whose disc starts with a block left out.
2026-11-07 04:18:55 +01:00
davey 8eddbf7b6a x11: load libXss at run time
Closes #20018
2026-11-06 22:24:31 +01:00
LibretroAdmin c74c00f5f8 asio: teardown parks on the last callback out
A callback may still be inside after ASIOStop, so teardown and the
reclaim of a parked instance waited for the in-callback count to reach
zero by yielding and then sleeping a millisecond at a time. The last
callback out now notifies an eventcount and the wait parks on it; the
200 ms deadline remains only for a driver whose callback never returns.

The eventcount is built for Win32 ASIO builds without threads too, as
it already is for DirectSound, XAudio and waveOut: the callback runs on
the driver's thread either way, so the write's park no longer falls
back to Sleep(1).

samples/audio/asio_teardown runs the driver's count and wait, pulled
out of asio.c, under TSan, ASan and wine; a build whose last callback
does not notify fails.
2026-11-01 00:11:58 +01:00
LibretroAdmin 9f366c2e01 win32: NVDA spoken to over RPC, nvdaControllerClient64.dll gone
frontend/drivers/nvda_controller_win32.c talks to NVDA's controller
interface over local RPC itself, as NVDA's controller client does:
bound to ncalrpc:[NvdaCtlr.<session>.<desktop>], its four procedures
called through NdrClientCall2 with MIDL's format strings - the x64 ones
NVDA's client carries, byte for byte, and the same procedures for the
x86 stack - so 32-bit builds reach NVDA too. rpcrt4 and the session and
desktop calls are resolved at run time; where any is missing,
PowerShell speaks as it does without NVDA.

samples/frontend/win32_nvda runs it, x64 and x86, against a stand-in
NVDA in the test: an RPC server for the interface as widl compiles it.
Every procedure arrives in order with its string as sent, non-ASCII,
empty and long ones among them; with no NVDA listening or after deinit
nothing arrives and the calls fail.
2026-10-29 22:21:11 +01:00
LibretroAdmin 778f937839 gxm/exynos: frames copied with memcpy, memory/neon gone
The Vita driver copies the core's frame into its texture a row at a
time, the frame's width of each row, or in one copy when the core's
rows are the texture's; textures are allocated at their row stride,
the width rounded to 8. Both drivers copy with the C library's memcpy,
NEON-tuned on their targets, and memory/neon/memcpy-neon.S goes.

samples/gfx/gxm_frame_upload runs the driver's frame upload against
the psp2 stubs with guarded GPU memory: core rows longer, as long and
shorter than the texture's, widths not of 8, rows copied once each,
nothing written past the texture or read past the frame.
2026-10-29 21:25:58 +01:00