Repository navigation
v0.18.0 — "One Hundred Fifty-Five"
155 pull requests, 152 of them from ten contributors, merged in #594. The biggest batch so
far, and a different shape from the last few: less of it comes from one port
and more of it is platform work that every port gets. D3D12 and Metal both
grow a real pipeline cache, raw SPUs run on macOS and Linux, the SPU helpers
gain SSE4.1/AVX2 and exact NEON paths, and the diagnostics that had crept into
the hot loops are now all behind gates.
RSX and graphics
- D3D12 (@rigaz29, new): indexed triangle
lists are drawn with their own indices (#530); guest depth/stencil state and
samplers are folded into the guest-FP pipelines (#558), with depth surfaces
per zeta offset that are readable as textures and FP depth export (#559).
Guest textures stage through a shared upload ring with least-recently-used
slots (#579), vertices are converted once per draw (#518), and a small batch
can be held back across two flips (#583). The texture-slot SRVs that were
overwriting the SRV heap are gone (#557). NewD3D12_VSYNC=0(#575) and
on-demand RenderDoc capture with resources named in guest terms (#561).
Duplicate clear-presented flips are skipped, and only those
(@Tzeentchnet, new, #486). - Metal (@erikomis unless noted): HLSL→MSL
translations are cached in memory and optionally on disk (#511), a vertex
program's position invariant compiles (#563),SET_TEXTURE_BORDER_COLORis
honoured in the sampler (#476), and the staging arena records into a pooled
MTLBuffer(@tekulvw, #440) with one reused
buffer for depth readback (#461). - Vulkan: per-target colour mask and blend enable for MRT sets (#516);
VK_DRAW_BATCH=1records engine draws, snapshots, uploads and clears into a
single submission (@MaChInEgUn3, #532),
with readback staging reused and changed textures refreshed in place (#552). - Draw engine: a scissored
CLEAR_SURFACEclears only the scissor (#560),
user clip planes are honoured (#537), and so is the polygon offset (#562). A
depth read as a texture converts on the GPU, with eviction from full
surface/zeta tables (@n0madic, #499); a depth
snapshot is the region the texture names (#507) and a stale one is released
(#502). A compressed texture is never a render target's output (#508). A
larger surface is reused only on the same sample grid (@tekulvw, #422),
each texture key remembers where it was last found (#438),
engine-rewritten textures upload without a full hash (#439), the per-draw
pipeline key is cheaper (#459), index runs append in one pass (#465), and
the depth-to-guest row conversion vectorizes (#460). - Decompilers and vertex fetch: shadow compare is
depth FUNC reference,
not the reverse (@n0madic, #424); 3D texel coordinates divide by depth
(#482); the vertex program branches on the transform branch bits, with
leaders up to slot 544 (#485); WPOS counts pixels on antialiased targets
(#446) and follows the RSX's own window convention —SET_SHADER_WINDOW
origin and pixel centres (@MaChInEgUn3, #589). Vertex array addresses wrap
at 28 bits (#504), frequency 1 under a modulo divider bit is one element for
the whole draw (@n0madic, #547), CMP (11-11-10) attributes decode
(@rigaz29, #529), and a draw's vertices are fetched attribute by attribute
(@tekulvw, #458).rsx_dispatchemits an immediate vertex for every
completing ATTR0 encoding (#463). Linear A8R8G8B8 decodes with one rotation
per texel (#432), the depth formats present their one channel on every
crossbar source (@n0madic, #501), and the swizzled decode steps the offset
instead of re-interleaving each texel (@rigaz29, #578). - GCM FIFO walker (@rigaz29 unless noted): NOP runs are passed over and
3D method runs decoded a command at a time (#554), vertex-program methods
are taken first with one diagnostic gate per FIFO word (#548), the drain's
own ring recycle counts as the JUMP to begin (#553),GCM_PARK_GRACE_MS
bounds how long a park may stand (#531), a park is forgotten once the walker
has left it (@erikomis, #541), and a resync replays the label releases it
skips (#513). GCM handlers run from blocked semaphore waits on Windows
(#576). A flip in the FIFO restoresZSTENCIL_CLEAR_VALUE, and a 0 clear
value is the near plane (@n0madic, #526).rsx_stateis handed only the
methods with outside effects under the draw engine (@tekulvw, #466), and
the EA→IO lookup behind the SPU put hook is bounded (#449).
SPU, SPURS and threads
- Raw SPUs run on macOS and Linux (@erikomis, #473), each with its own
program;SPU_RunCntl = 0stops a running one (#505), and raw-SPU images can
carry a parameter area the loader fills in (#538). - Dispatch and residency (@tekulvw): streamed code regions are verified
once per load and then dispatched by residency (#420), with resident-code
ownership honoured when the interpreter rejoins lifted code (#419) and a
per-thread dispatch cache in front ofspu_lifted_lookup, on by default
(#481). The interpreter rejoins inside resident regions (@rigaz29, #525).
Indirect-dispatch registry lookups are memoized per thread (#436), as is the
per-thread MFC engine lookup (#421), and an image's fingerprint is reused
while its bytes are unchanged (#433). - Exact float: NEON float ops without scalar fix-up lanes (@tekulvw,
#445), and opt-inSPU_FLOAT_RZrunning single precision natively under a
round-toward-zero FPCR (#479). SSE4.1 and AVX2 forms of the per-lane integer
and quadword helpers (@erikomis, #512), and AVX2 estimates, interpolation
and float/int conversions four lanes at a time (@Kurtisone, #500). - DMA, reservations and coherency (@tekulvw):
GETLLARwithout the
lock-line lock for registered holders (#441), only the reserved lines of a
PUT copied under it (#484), a brief spin before parking on the POSIX
lock-line lock (#443), DMA event producers serialized with reservation-lost
notifications (#418), a yield before sleeping when a job re-issues the same
transfer (#448), the overlay-source scan skipped for small GETs no source
can match (#455), and the parked-task scan bounded on every committed lock
line (#450).event_statusupdates atomically (@erikomis, #492). - SPURS:
WAIT_SIGNALwakes on coherent guest writes to the signal bitset
(#423) and the coordinator wakes when an SPU commits the request line (#478). - Interpreter and lifter: interrupt enable/disable bits are honoured on
every taken indirect branch (#417); pending interrupts are delivered at
merged chunk entries (#435); lifted known-target branches tail-call their
target underSPU_DIRECT(@erikomis, #510); lifter coverage now verifies
job-module regions and embedded SPU programs, reports dispatch misses loudly,
and handles spilled PPU jump tables (#444). The drain shares checkpoints and
skips calls to inactive guards (#434), resolves its thread-local transfer
slot once per drain (#452), and runs the per-hop hooks' common case inline
(@rigaz29, #533). Straight quadword load/store sequences run in the SMC
microstep on a tight loop (@MaChInEgUn3, #571), and halt andiret
longjmp without unwinding on 64-bit Windows (#572). The decrementer uses the
raw monotonic clock on Apple (#451).
Runtime, HLE and syscalls
- New module surface:
cellVoiceResetPort,cellVoiceUpdatePortand
cellVoiceGetSignalState(@tekulvw, #487);cellSysconfOpenand
cellSysconfAbort(@erikomis, #564); the licence area as system parameter
0x0122(@undecuple, #429);
cellPadInfoSensorModeandcellPadSetSensorMode(#565);ps3_host_quit,
so the window's close button and Cmd+Q reach the guest (#544). - Offline answers:
cellSysutilNpEulaanswers the PSN terms check through
its callback (#542), sceNp answers tickets, account region and network time
as OFFLINE (#543), and the cellNetCtl net-start dialog ends cancelled (#503). - Threads and sync: a thread that has exited is gone, and its id is not
reused at once (@undecuple, #415); a thread made above its creator's
priority runs until it blocks underPS3_PRIO_START=1
(@n0madic, #416); the main thread's stack information is no longer 0 + 0
(#469); each host thread runs HLE→guest callbacks on a stack of its own
(#489);sys_mutexdestroy refuses a mutex that is held or has waiters
(#490), andMUTEX_WATCHnames the owner of a lock a thread is stuck on
(#474).sysPrxForUserlwmutex moves to an atomic lock word, with a fast
path for leaf HLE imports (@rigaz29, #577). The runtime's host threads have
names (#567). lv2 syscall 22 is registered as_sys_process_exit
(@xuxinsss, new, #587). - Files, audio and media: cellFs repositions the stream when a fd switches
between read and write (@feanor-noldorin,
new, #456);ppu_fsserializes the fd table and reads each slot once
(@tekulvw, #430); cellAudio's WASAPI path keeps 60 ms queued with the
mixing thread ahead of the guest (#514); cellVdec drains the decoder when a
sequence goes idle with pictures owed (#471) and never hands out handle 0
(@undecuple, #495). stdout and stderr are buffered and flushed on a timer
(#524). - cellPad: a controller switched off and on again reopens (#472), XInput
loads at run time rather than being imported (@undecuple, #494), a port
with no controller reports centred sticks rather than zero (@Kurtisone,
#496),PAD_FILEholds survive empty drain reads (@tekulvw, #570), and an
empty XInput slot is polled once a second instead of every frame
(@rigaz29, #581). - Clocks and error codes: one host clock backs
mftb, system time and
timers, viamach_absolute_timeon macOS (#540). GCM error codes move to
base0x80210000and SPURS task codes onto their own0x80410900
(@undecuple, #414). - PPU lifter and loader (@rigaz29): guest stores inline, to match the
inline loads (#573), on a cheaper access sequence — memory-model copy, one
compare, a branch hint (#574); the SPU reserved-line bitmap is tested inline
on guest stores (#534); the reservation is re-checked once the lock-line lock
is held (#522).
Platforms and build
- macOS: one window survives an
exitspawn, viatools/host_windowand a
Metal host-surface mode (@erikomis, #509); the guest runs off the main
thread (#477). - POSIX: the project template backs the whole 32-bit guest space, as on
Windows (#475). - Windows: the runtime builds with plain MSVC (
cl), not only clang-cl
(@xuxinsss, #588). - CMake: a build configured without
CMAKE_BUILD_TYPEis optimised rather
than left at-O0(#506), and the SPU program build can lift with
--merge-chunks(@rigaz29, #549).
Diagnostics — all of it now gated
- The hot paths stop reading the environment: the GCM FIFO walker no longer
callsgetenvper packet (@tekulvw, #437),SPU_PCSAMPLEis read once
rather than per DMA (@Kurtisone, #243), and the remaining hot debug
switches are read once (@rigaz29, #519, #527). - Logs and scans become opt-in: the SPURS module-poll log is capped per process
(#431), the PUT poison scan runs only when it can be reported (#454), the
closed policy-module DMA trace counter stops advancing (#453), two per-event
log lines in cellVdec andspu_channelsare opt-in (@rigaz29, #521), and
the guest load/store watch hooks are gated behind one inlined load
(@tekulvw, #483). - New samplers and reports:
PS3_TPROFfor SPU and PPU threads (#480),
RSX_WALKER_PROFfor the FIFO walker thread (#467),SPU_IRQWAIT_DIAGfor
an SPU waiting on an interrupt that never comes (@erikomis, #491),
SPU_INTERP_STATSnow listing where the interpreter was entered
(@rigaz29, #523),PS3_SAMPLE_DRAIN=1to sample only the RSX drain thread
(#520) with exact attribution underPS3_SAMPLE_RVASand a one-thread fast
path (#568), and an ftrace span per HLE import call with its own report
section (#580).
Tooling and docs
lift_jobmodslifts each job module at the link base its header names
(@erikomis, #488);ppu_lifter --insn-patcheslifts patched instructions
as run-time switches (#539); the twistedmetal regression run removes its FIOS
file cache first (@Kurtisone, #498).- Docs (@undecuple):
SPU_LIFTER.mdrefreshed (#425), the SPU workflow added
toGETTING_STARTEDand the porting guide's Phase 11 (#426), prerequisites
made to agree across README,GETTING_STARTED,BUILDING,TOOLSand the
porting guide (#427), and template paths made to match the CMake with
config.tomlmarked reference-only (#428).CITATION.cffadded (#535).
Housekeeping
- The five third-party GitHub Actions are pinned to commit SHAs (#590), the
release.ymlwrite token is scoped to the job that publishes rather than
held by the job that compiles the tree and runs every test script (#592),
and.github/CODEOWNERSrecords the paths that execute (#593). CMakeLists.txtsaidVERSION 0.11.0, six releases stale, so every
configure printedps3recomp runtime v0.11.0. It says0.18.0now.runtime/spu/tests/test_spu_int_neon.candtest_spu_float_neon.crun on
the macOS arm64 job. The integer one had never been compiled by any
workflow on any platform; neither had been built for NEON on an arm64 host.
Known issue
- You Don't Know Jack can hang at boot in a SPURS
EventFlagWaitthat no
workload ever sets. The race is on v0.17.0 too (1 run in 4), but this
release hits it far more often (4 in 4 on the regression gate). It climbs
across several merges rather than coming from one PR, and is being chased
separately.