39432 Commits
Author SHA1 Message Date
LibretroAdmin 49edc8402a VideoCommon: opcode decoder callbacks without a vtable
The decoder is a template over its callback class, so the callbacks are
plain members; the FIFO player's analyzer has its own GetVertexSize.
2026-11-07 23:28:10 +01:00
LibretroAdmin 6e68902485 VideoCommon: the frame output without virtual calls
Each backend has one output class, and FrameOutput calls it by the
backend kind; what an output does not do itself, FrameOutput answers.
2026-11-07 23:10:25 +01:00
LibretroAdmin a108f60c5e VideoCommon: shader compiles queue pooled items without allocating
The shader cache keeps its compile items in chunks and reuses them, so a
shader or pipeline compiled while the game runs allocates nothing. Each
item embeds the compiler's link and callbacks, so a finished one is pushed
back as it is, and a pipeline waiting on its stages queues itself again.
The compiler keeps the waiting items in a heap by priority and order, and
is a member of the shader cache rather than an object of its own.
2026-11-07 22:59:17 +01:00
LibretroAdmin d19124ef7e VideoCommon: vertex formats and the presenter without virtual calls
Vertex formats are deleted as the backend's own class, like the other GPU
objects. The vertex loader's shuffle table is a plain array, and the D3D
bounding box writes its offset as the UINT the box takes.
2026-11-07 22:46:28 +01:00
LibretroAdmin 89ee0e20b2 VideoCommon: EFB peeks and pokes are plain functions
They pick the hardware, software or null path by the backend kind, so
there is no EFB interface object to allocate and no virtual calls.
2026-11-07 22:25:43 +01:00
LibretroAdmin 29c3df6c8a D3D, D3D12: build without MinGW warnings
The texture's debug name is set from the argument instead of being kept.
2026-11-07 22:25:39 +01:00
LibretroAdmin f0f8757c91 VideoCommon: one texture cache for every backend
The software renderer's EFB encode and the null renderer's empty copies
are picked by the backend kind, so the cache has no virtual calls.
2026-11-07 22:25:36 +01:00
LibretroAdmin 52b5d83816 VideoCommon: shaders compile from the generated text without copying it
A backend is handed the ShaderCode: Vulkan and D3D write their header
into the room kept in front of the text and compile the two as one span,
and GL hands the header, any prefix and the text to the driver as they
are and keeps the text's block for its link messages.
2026-11-07 21:59:49 +01:00
LibretroAdmin 183b8d7ce6 VideoCommon: shader generators write through a C89 text builder
ShaderText is one growing block of chars with room kept in front for a
header. ShaderCode writes into it as it is or printf-style, without fmt
or std::string; the generators' string parameters, tables and switch
trees are plain C strings, and the UID enumerations fill arrays.
2026-11-07 21:48:29 +01:00
LibretroAdmin 77ba38f542 VideoCommon: shaders keep rslc's result block for their code
SPIR-V and DXBC stay in the block rslc returns instead of being copied
into vectors, and the disk cache is lent the code to write. Code read
back from the cache is copied once into a block of its own.
2026-11-07 21:11:31 +01:00
LibretroAdmin 037f0ca008 VideoCommon: bounding box and queries call their backend without virtual methods
Each backend's are final and called by the backend in use; the Null
backend uses the base classes, which count nothing. Bounding box values
are read into and written from the caller's arrays, and GL's queries
are one class for each kind of query object.
2026-11-07 20:57:55 +01:00
LibretroAdmin b10df251e4 Remove frame dumping and screenshots
The frontend takes screenshots and records video.
2026-11-07 20:34:48 +01:00
LibretroAdmin 8d37172bc1 D3D: vertices and indices are decoded straight into their buffers
Each batch maps its slices of a vertex and an index stream when it
starts and unmaps them at its commit. While mapped they are off the
input assembler, for the draws a batch's textures may make.
2026-11-07 19:58:58 +01:00
LibretroAdmin 04e818b56c Remove libadrenotools
The frontend makes the Vulkan instance and device, and loads the driver
they come from.
2026-11-07 19:58:56 +01:00
LibretroAdmin 7e4cf4aa94 VideoCommon: VertexManagerBase calls its backend without virtual methods
Each backend's vertex manager is final and called by the backend in use;
what a backend does not do itself falls to the defaults.
2026-11-07 19:58:52 +01:00
LibretroAdmin 4b604fbd32 Remove FFmpeg movie dumping
Frame dumps are written as PNG images.
2026-11-07 19:20:50 +01:00
LibretroAdmin 043c12979f Remove the Output Resampling setting
The output is handed on at the picture's own size, and the frontend
scales it. A picture drawn scaled is sampled bilinearly.
2026-11-07 19:07:22 +01:00
LibretroAdmin 0697b306c0 Remove the Disable Fog setting
Fog is part of what the GPU draws, and is always emulated.
2026-11-07 19:07:20 +01:00
LibretroAdmin 5993291fba OGL: readback staging buffers ask for client storage
What the GPU copies back is read only by the CPU, from memory its reads
are cached in.
2026-11-07 18:31:45 +01:00
LibretroAdmin 110b15799b D3D: clear the MinGW view descriptions through their plain base
Silences -Wclass-memaccess.
2026-11-07 18:25:37 +01:00
LibretroAdmin 03810f4a91 VideoCommon: an XFB copy lost from VRAM keeps the shown picture
XFB copies kept only in VRAM go with the texture cache when the video
backend is made again or a state is loaded. RAM then holds only the
uninitialized marker, so no picture is fetched from it and the frontend
keeps the one it shows until the game's next XFB copy.
2026-11-07 18:25:34 +01:00
LibretroAdmin 2537685afa D3D12: 4 MiB texture uploads go through the upload stream
The largest GameCube texture, 1024x1024 RGBA8, fits the 32 MiB stream
and can be lent; only larger ones take a staging buffer of their own.
2026-11-07 18:17:34 +01:00
LibretroAdmin d2468a7caa OGL: textures lend a persistently mapped pixel unpack stream
Where GL has buffer storage, sync objects and texture storage, a 32 MiB
unpack buffer mapped for good in client memory is what loads of
uncompressed 2D and array textures are decoded into; glTexSubImage
uploads them from it.
2026-11-07 18:17:30 +01:00
LibretroAdmin 361bcaf7a1 Video: textures and XFBs decode straight into the backend's upload memory
AbstractTexture::LendLoad lends the upload stream's memory for a level,
and CommitLoad uploads it: Vulkan for any rows, Direct3D 12 for rows at
its pitch alignment. The texture cache decodes textures and XFBs into
it; it decodes into its own buffer and Loads that where the backend
lends none, or when the arbitrary mipmap detection reads the levels
back. The detector keeps its levels in a fixed array.
2026-11-07 17:53:42 +01:00
LibretroAdmin 03af617adc Vulkan/D3D12: texture uploads stream through CPU-cached system memory
Texels are written into it in place, tile by tile, so it is cached
memory: VK_HEAP_UPLOAD_CACHED on Vulkan, a write-back L0 custom heap on
Direct3D 12, the upload heap where the device has none.
2026-11-07 17:53:38 +01:00
LibretroAdmin 9e1ec1f660 Video: AbstractGfx without virtual methods
AbstractGfx calls into the Gfx of the backend in use, by
g_video_backend_kind; each backend's Gfx is final, so these are direct
calls, and what a backend does not do itself falls to the defaults,
which a backend may also call as the Base* functions. The Gfx is deleted
as its own class. The unused fullscreen calls are gone, and BackendObjects
follows the tree's formatting.
2026-11-07 17:16:18 +01:00
LibretroAdmin e3246abb7b Boot: the system directory's GBA BIOS is set as a path after UICommon::Init
It is the user path the GBAs load their BIOS from, set once the config
layers exist.
2026-11-07 17:13:03 +01:00
LibretroAdmin 106efcaf56 Video: GPU objects without virtual methods
Shaders, pipelines, textures, staging textures and framebuffers call
into the classes of the backend in use, which each backend's Gfx sets
as g_video_backend_kind; those classes are final, so the calls are
direct. A std::default_delete specialization deletes them as their own
class. The Null and Software renderers use the base shader and pipeline
types.
2026-11-07 17:05:56 +01:00
LibretroAdmin 8e818cb82c XF: a clip-disable write ends its case
It went on into the vertex specs case.
2026-11-07 17:05:52 +01:00
LibretroAdmin c31327c410 GBA on the link cable as a controller type, its screen drawn zero-copy
A GameCube port can take a Game Boy Advance; its buttons are on the
port's RetroPad and it boots from gba_bios.bin in the system directory
when that is there. Its screen is drawn along the bottom right of the
picture (GBA Screens option): mGBA renders each frame straight into
upload memory the GPU thread lends it and keeps mapped, swapped in
through one atomic word, and a buffer goes back to the GBA only once
the GPU has copied from it. Without such memory the frames are uploaded
from plain buffers. The buffers are taken back, with the GBA's thread
letting go first, before the video backend goes.

Port devices change through the config, which the SI applies on the
CPU thread.
2026-11-07 16:38:22 +01:00
LibretroAdmin 7ad9cb9289 Staging textures: transfer fence and persistent mapping as plain fields
A staging texture says whether its upload memory stays mapped, and
StagingTransferDone tells without waiting whether the GPU is done with
its last copy, from the Vulkan fence counter, the Direct3D 12 fence
value or the GL sync object. Direct3D 12 upload heaps stay mapped
through their copies.
2026-11-07 16:38:18 +01:00
LibretroAdmin fd5353d81e GCMemcard: no algorithm or span uses; only the GCI writer kept
The GCS/SAV import and export helpers had no callers.
2026-11-07 16:38:14 +01:00
LibretroAdmin 024db52b1d DSPHLE: saturate with SaturateS16, Zelda flags and patterns without maps
An unknown Zelda ucode CRC gets no flags instead of reading past the table.
2026-11-07 16:38:10 +01:00
LibretroAdmin c6d65ecb30 HSP: transfers lend a 32-byte pointer; no GBA host interface
The GBA host callbacks had no implementation in the core; GBACore
lends its video buffer as a pointer.
2026-11-07 16:38:07 +01:00
LibretroAdmin f6ebe7b503 Memmap: page-table views in fixed tables, no maps or spans
DBAT views go in a fixed array; page-table views and the large-page
translations in two-level tables per guest page, blocks allocated on
first use and kept until shutdown. GetPointerAndSize lends a pointer
and the bytes left in its region.
2026-11-07 16:38:00 +01:00
LibretroAdmin 0b99fddaef Output: a published slot packs kind/index and width/height into one atomic each 2026-11-07 15:25:45 +01:00
LibretroAdmin 4ac4e8d19b Output: lock-free hand-over queue between the GPU and frontend threads
The GPU thread publishes a picture's description into one of four slots
and the generation naming it into an atomic word; the frontend's thread
claims it with a CAS that sets a taken bit, and the GPU thread reclaims
an untaken target with a CAS on the same word, so exactly one of them
owns it. What is being handed over and what was handed are atomic
tags only the frontend's thread writes, the first before its claim.
No slock on either side.
2026-11-07 15:18:37 +01:00
LibretroAdmin 0bd8e77a4d D3D11/D3D12: backend info from the frontend's device only
The frontend picks the adapter and hands over its device, so the core no
longer loads dxgi.dll, creates DXGI factories, enumerates adapters or
creates throwaway D3D11/D3D12 devices to query AA modes and logic op
support at load. Until the device arrives the AA modes are the counts
every device has; the context reset fills them in from the real device
(D3D12 now too) and re-validates the MSAA setting against them.
2026-11-07 15:18:33 +01:00
LibretroAdmin 73c3c0baee Remove Movie (TAS input recording/playback)
Nothing in the core starts a recording or a playback, so a movie is
never active. Each call site keeps its no-movie path: no determinism
toggle, the real clock for the RTC, the configured memory cards, no
pad/Wiimote input mirroring into display strings on every poll. The
state keeps the movie counters' bytes, written as zeroes, so existing
savestates still load.
2026-11-07 15:12:31 +01:00
LibretroAdmin 5e7772c97e Follow-ups to the LIBRETRO ifdef removal
D3D11 sets logic op support from the device again (off on UWP) and
always reports object names: the UWP check's else had swallowed the
object-name line and logic op was never on. The Android input backend
is no longer created, so its source, include and CIFACE_USE_ANDROID go.
Core.h declarations indented with spaces like the rest of the file.
2026-11-07 14:55:52 +01:00
LibretroAdmin aa9a6e9140 Triforce, MagCard, Bluetooth: bytes lent as pointer and size, no spans or maps
Serial devices lend their Rx bytes in place and take Tx as pointer plus
size; JVS frames unescape onto the stack and are consumed without a
scope guard. IO port inputs and outputs are plain pointers with fixed
counts. Mediaboard addresses resolve to a lent pointer and size; the
game table is a flat array. Bluetooth passthrough keeps its link keys
in a fixed sorted array, links live transfers through the header that
already fronts each buffer, and lends ACL packets as pointer and size.
AsU8Span/AsWritableU8Span are gone from BitUtils.
2026-11-07 14:55:48 +01:00
libretroadmin c878c0d818 remove LIBRETRO ifdefs 2026-11-07 14:23:51 +01:00
LibretroAdmin cd38818e52 Common: pointer and size instead of spans, loops instead of STL algorithms
SHA1, HMAC, hex dumps, PNG loading, file search, DHCP options, HTTP
posts and DirectIOFile reads and writes take pointer plus size; callers
pass their buffers straight through. Contains.h is gone; lookups are
plain loops. File search and FAT FST sorting are in-place heap sorts;
min/max/clamp/copy/fill become ternaries, memcpy and memset. Watch
string import and export had no callers and are removed.
2026-11-07 13:37:26 +01:00
LibretroAdmin 6e9be4ba64 Common: drop the Gekko assembler, nothing in the core calls it 2026-11-07 13:37:22 +01:00
LibretroAdmin c033a61899 DiscIO: pointer and size instead of spans, loops instead of STL algorithms
Names, game IDs, patch lists, LBA ranges and hash exceptions are passed
as pointer plus count. min/max/fill/copy become ternaries, memset and
memcpy; FST entries sort with an in-place heap sort, partitions with an
insertion sort. WAD content checks decrypt and hash in 2 KiB chunks
straight from the borrowed input; banner names read onto the stack.
2026-11-07 12:55:07 +01:00
LibretroAdmin 23b8d27c35 IOS FS: host files shared through a fixed refcounted table
Guest handles index one of sixteen host file slots; the last handle to
close a path closes its file. No shared_ptr, weak_ptr or map. Directory
order is an insertion sort over FST positions; lookups are plain loops.
2026-11-07 12:55:04 +01:00
LibretroAdmin 4a6a6489fc IOS ES: bytes lent as pointer and size, no spans or STL algorithms
Signed blobs, TMDs, tickets, certs and signatures are lent as pointer
plus size; readers are filled in place from guest memory and disc
reads. Algorithm calls become plain loops and memcpy. WiiUtils keeps
only WAD install, TMD recovery and the Bluetooth getters the core uses.
2026-11-07 12:55:00 +01:00
LibretroAdmin 15d144087d IOS ES: views written into guest memory, signatures and keys lent
A TMD view and a ticket view are written straight into the guest's
output buffer, the TMD view's size computed rather than measured off a
view built to be thrown away. A ticket, a signature and a public key are
spans into the blob they are part of instead of copies in vectors. A TMD
or ticket the guest passes to the DI view calls is read into its reader
straight from guest memory.
2026-11-07 12:22:51 +01:00
LibretroAdmin 139497cecc IOS ES: signed blobs in one malloc'd buffer, filled in place
A ticket, TMD or certificate holds its bytes in one malloc'd buffer and
hands them out as a span. ResizeBytes() gives the room to fill, so a
ticket or TMD is read from the NAND, a disc, a WAD or guest memory
straight into its reader instead of into a std::vector that is then
moved or copied in.

Ticket, TMD and certificate chain imports take spans, and the IPC
handlers pass the guest's buffers where they lie instead of copying
them out into vectors first. A certificate is read where it lies and
only its own bytes are copied, so parsing a chain no longer copies the
rest of the chain once per certificate. Deleting a ticket closes up the
ones kept in place. The savestate layout is unchanged.
2026-11-07 06:35:01 +01:00
LibretroAdmin 734ceaa90c GBA: ROM, BIOS and saves through the frontend's VFS
The GBA core's files open as an mGBA VFile over a libretro-common
filestream (GBAVFile.c). A read-only map of a mapped file lends the
mapping itself, so the ROM and the BIOS are read where they lie; a save
is mapped into a buffer of its own and written back when mGBA syncs it.
A ROM in an archive or a zip is read or inflated straight into the
memory file mGBA maps, with no buffer in between.

The state and save import/export, e-Reader card queueing, ROM info and
forced disconnect entry points nothing calls are gone.
2026-11-07 06:27:34 +01:00