Commit Graph
12196 Commits
Author SHA1 Message Date
Dean 339217ebc9 Merge pull request #8331 from ymatrix1/feat/audio-missing-exports
feat(audio): export missing firmware AudioIn, Audio3d and Voice interfaces
2026-10-21 11:01:53 +13:00
janzezno e64d42be1f test(agc): resubmit an SGPR pattern fill whose batch retired before the read saw it 2026-10-20 23:57:48 +02:00
Adrià d97361bd0d Merge pull request #8567 from imellag/perf/agc-highest-index-vectorized
perf(agc): find a draw's highest index with a loop the compiler vectorizes
2026-10-20 23:54:21 +02:00
Dean 6830c91641 Merge pull request #8603 from xXPBSXx/fix/libkernel-sys-readlink-size-first
fix(libkernel_sys): check the readlink size before the path
2026-10-21 10:50:49 +13:00
Dean bcdb033754 Merge pull request #7560 from parl0v/perf/window-store-liveness
perf(shader): drop window stores no relative read can see
2026-10-21 10:48:39 +13:00
Dean Galvin a07ad30578 feat(shader): request DenormPreserve 32 where the device preserves f32 denormals
The recompiler asked for DenormPreserve only for 16-bit and 64-bit floats,
so a device that flushes 32-bit denormals by default (RADV, MoltenVK) flushed
them whatever the guest's float mode said. target.float32DenormPreserve is set
from shaderDenormPreserveFloat32 when denormBehaviorIndependence allows a 32-bit
mode, is part of the cache key and of the request serialization (version 41),
and makes the module declare DenormPreserve 32 unless the 32-bit flush is
already taken in hardware. APS5_NO_HW_F32_PRESERVE=1 turns it off.
2026-10-21 10:45:24 +13:00
memob 95050dda24 fix(libkernel): tick the process time counter at the TSC frequency
sceKernelGetProcessTimeCounter counted nanoseconds and
sceKernelGetProcessTimeCounterFrequency returned 1 GHz, while
sceKernelGetTscFrequency reports the host TSC rate. On the console the
process time counter runs at the TSC frequency, so a title may scale
the counter by sceKernelGetTscFrequency. PPSA34501 does, and its clock
ran 3.4 times slow on a 3.4 GHz host: it paced its 60 Hz frames to
17.6 fps and its game time and audio drifted apart.

The counter now ticks at sceKernelGetTscFrequency, over the same
monotonic clock and APS5_TIME_SCALE, and its frequency is that rate.
2026-10-20 17:43:18 -04:00
Adrià 42427a6a45 Merge pull request #8556 from teepean/perf/one-fold-per-store-run-5f7e
perf(agc): fold the occlusion dumps of a queued store run once
2026-10-20 23:42:44 +02:00
bluandClaude Fable 5.1 3ed129ab33 fix(agc-driver): make the presenter wait for a full frame dump queue
With APS5_DUMP_FRAMES, FrameDumpWriter::Enqueue threw "frame dump queue exceeded 64 MiB" when the
writer thread fell more than 64 MiB behind, which failed the presentation and ended the title.
#4320 made that rare at the default APS5_DUMP_SCALE=4; at APS5_DUMP_SCALE=1 a 1920x1080 title
reaches it within nine frames and a 3840x2160 one on the third.

Enqueue now waits on the writer's condition variable until the frame fits, and the writer
notifies after each file; a single frame larger than the queue still throws. The VideoOut frame
dump queue test gets a wait mode at scale 1 whose third frame has to wait for the held first one.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-20 14:29:09 -07:00
Adrià e48bbff9ff Merge pull request #8578 from imellag/perf/agc-f32-flush-probe-moltenvk
perf(agc): probe the f32 denormal flush on MoltenVK
2026-10-20 23:27:16 +02:00
juanpimg 795961352b fix: restore the voice chat debt entry and tidy the new declarations
The change removed a technical-debt entry from origin/main that documents four
libSceVoiceChat exports it does not touch, left the new include out of the
quoted include group, put a forward declaration away from the other type
declarations, and cited a prototype source without a line anchor.
2026-10-20 23:22:18 +02:00
juanpimg 63af1bfcf8 fix(libScePosixForWebKit): export the host-named functions through a renamed helper
gethostbyname_r and sysinfo are names of host C library functions. Defining
them in libScePosixForWebKit made the library's own call to
::gethostbyname_r in Resolver.cpp bind to the new declaration, and the
guest_resolver test failed with "gethostbyname_r not implemented". Export
the two NIDs through a helper with the library's own prefix, the way
libSceAmpr re-exports the libc functions.
2026-10-20 23:22:18 +02:00
juanpimg 1f1add461e feat(prx): declare the missing PS5 3.20 system exports in the next tier of libraries
AnyPS5 resolves a title's imports by NID, so a title that imports a system
function that no AnyPS5 library provides fails to load with an unresolved
import. This declares 222 such exports across 11 PS5 system libraries that
AnyPS5 implements but does not provide.

Each declaration calls NotImplemented_nid_no_patch and returns 0; none of
them implements the function. A declaration with a credible prototype uses
it and cites the source with a pinned commit; the rest are declared without
parameters, which resolves the import without making an ABI claim. The
technical-debt files record the limitation per library.

The list is the intersection of the export table of the console's library
(function symbols only), the pinned aerolib names and the functions not yet
defined anywhere in the repo. Every name recomputes to its NID with
tools/nid_names.py.

libSceAudio3d and libSceVoice are left out because #8331 declares them.
2026-10-20 23:22:17 +02:00
MarcZX10 11adccfe15 fix(relinker): preserve detailed header diagnostics 2026-10-20 21:16:19 +00:00
MarcZX10 8625b4802b fix(relinker): normalize input prefix paths 2026-10-20 21:07:53 +00:00
MarcZX10 fc046e621b test(relinker): reject large non-ELF inputs before allocation 2026-10-20 21:07:34 +00:00
MarcZX10 33c1f2365f fix(relinker): validate ELF prefix before reading full input 2026-10-20 21:07:34 +00:00
Ethan Barr 4f6a37d790 fix(libc): share delete access when freopen reopens a stream onto a file on Windows
On Windows, freopen reopened a stream through _wfreopen, which opens the file without FILE_SHARE_DELETE, so remove or rename of the file failed while the stream was open, unlike fopen streams and POSIX unlink/rename of an open file. freopen now closes the previous stream and opens the new file through the same CreateFileW path fopen uses, so the reopened stream shares delete access. Host standard streams and an empty filename keep the _wfreopen path. Reference: FreeBSD 11 unlink(2) and rename(2) succeed on a file that is open.
2026-10-20 17:07:21 -04:00
Adrià 73b6a4cc71 Merge pull request #8066 from HQasper/perf/gpu-thread-dimensions
perf(agc): resolve DISPATCH_INDIRECT thread dimensions on the GPU
2026-10-20 23:06:48 +02:00
Adrià be1ce988d4 Merge pull request #7870 from ionut27001/perf/image-memory-pool
perf(agc): keep released image memory in the buffer pool for reuse by type and size
2026-10-20 23:05:43 +02:00
Adrià 9d5099f5e7 Merge pull request #6785 from milescoviello/perf/srt-guard-fault-helper
perf(shader): name a poisoned guarded SRT read in the fault buffer
2026-10-20 23:00:29 +02:00
Yuri Olive 68f9b47be0 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/audio-missing-exports
# Conflicts:
#	docs/dev/debt/libSceAudio3d.md
2026-10-20 17:55:03 -03:00
Adrià ca74ef2177 Merge pull request #6148 from 011010/feat/audio3d-mix
feat(libSceAudio3d): mix the bed and deliver audio through AudioOut
2026-10-20 22:53:16 +02:00
MarcZX10 05cc68cd95 style(libkernel): keep regression comments out of code 2026-10-20 20:52:44 +00:00
MarcZX10 e1e20f0f2e fix(libkernel): match module info segment records 2026-10-20 20:50:05 +00:00
Dean c6145997ef Merge pull request #8270 from thuanquang/fix/relinker-module-name-input-path
fix(relinker): name the guest module in its output filename errors
2026-10-21 09:39:58 +13:00
MarcZX10 745ff15b80 test(agc): skip unsupported sampled color images 2026-10-20 20:39:55 +00:00
Dean 50e0624d7a Merge pull request #7154 from XairRrR/fix/agc-depth-plane-buffer-coherence
fix(agc): keep depth planes coherent with buffer reads and writes of their memory
2026-10-21 09:38:25 +13:00
MarcZX10 ee2d9a4876 test(agc): avoid unsupported color image format 2026-10-20 20:38:17 +00:00
Dean 26740077bd Merge pull request #8144 from TheSovietWaffle/fix/recompiler-domain-computed-control-point
feat(shader): read domain inputs at a control-point index computed from data
2026-10-21 09:31:11 +13:00
Adrià eb73c168bb Merge pull request #7431 from milescoviello/perf/srt-patch-insert-before
perf(shader): insert patched SRT reads before their use without appending first
2026-10-20 22:29:45 +02:00
Adrià 0c54584946 Merge pull request #6611 from meh7an/perf/shader-validate-vertex-inputs
perf(shader): validate vertex stage inputs without building them
2026-10-20 22:28:45 +02:00
Ondra97 278721a708 chore: merge current main into epoll lifetime fix 2026-10-20 22:24:13 +02:00
Ondra97 e6ec827647 fix(libSceNet): reject invalid descriptors for epoll DEL 2026-10-20 22:24:10 +02:00
Dean a6a4101e19 Merge pull request #8595 from MarcZX10/codex/socket-fdset-limit-followup
fix(libkernel): keep socket descriptors within FD_SETSIZE
2026-10-21 09:22:06 +13:00
Dom3005andClaude Opus 5.5 1af777afb1 fix(libc): map a Windows symbolic link loop to ELOOP when opening
CreateFileW fails a symbolic link that resolves to itself with
ERROR_CANT_RESOLVE_FILENAME (1921). WindowsOpenError_nid_no_patch had no
case for it, so sceKernelOpen, open and fopen reported EINVAL where
FreeBSD reports ELOOP.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 22:18:21 +02:00
Adrià FranchandClaude 7caa8fa045 test(libSceAudio3d): drop the wall-clock upper bound of the real-time push check
Co-Authored-By: Claude <[email protected]>
2026-10-20 22:06:56 +02:00
011010 64092044df fix(libSceAudio3d): queue the bed writes and consume one per advance
sceAudio3dBedWrite2 stored the bed in a single slot that
sceAudio3dPortAdvance mixed without clearing, so an advance with no new
write replayed the previous block instead of mixing silence, and two
writes before one advance kept only the second.

The writes are queued now, as shadPS4's ConvertAndEnqueue does: the
queue is bounded by queue_depth and returns NOT_READY when full, an
advance consumes one bed, and an advance with nothing queued mixes
silence through the mixer's empty-source path, which the mixer test
already covers.

guest_audio3d_port gains the queue case: fill the queue, require
NOT_READY, advance, and require the consumed bed to make room. It fails
on the old code at the NOT_READY of the full queue.
2026-10-20 22:06:52 +02:00
011010 c85d284e39 fix(libSceAudio3d): let the mixer test find libc.prx on Windows
The mixer test links libc and loads libc.prx, so on Windows its executable
exits 0xC0000135 unless the unpatched library directory is on PATH. Every
other test in the tree that links libc prepends it, and the two tests next
to this one only prepend the libSceAudio3d directory because they link the
library as well. Prepend the libc directory here too.
2026-10-20 22:06:52 +02:00
011010 0531b591e8 test(libSceAudio3d): check that a blocking push runs at real time
The push hands the mixed frames to an AudioOut port, so the pacing
comes from the AudioOut queue and not from a local wait. The test
pushes 200 frames of 256 samples at 48 kHz and requires the elapsed
time to be the duration of the audio within 150 ms below and 300 ms
above, the shape libSceAudioOut's own real-time test uses.
2026-10-20 22:06:52 +02:00
011010 7887d17766 fix(libSceAudio3d): use the reference error code for an unsupported buffer mode
The branch invented AUDIO3D_ERROR_NOT_SUPPORTED as 0x80EA0005, which
shadPS4's error enum names OUT_OF_MEMORY. Both shadPS4 and prosper
put the unsupported buffer mode at 0x80EA0008, prosper from the PS5
module's own error table.

The debt entries now name the reference behind each unverified
choice: the downmix coefficients and the dropped LFE follow shadPS4
(fpPS4 agrees) against prosper's contradiction, the channel order
follows shadPS4, prosper and fpPS4, the return of
sceAudio3dAudioOutOutput follows KytyPS5 and prosper against
shadPS4's total-sample answer, and the full-queue NOT_READY follows
shadPS4, the only reference with a body.

The stubs leave the branch: this pull request carries the bed path
alone.
2026-10-20 22:06:52 +02:00
husari.orozco 553ce8e9ba fix(libSceAudio3d): tie the audio out drain to the frame it submits
Pop the associated frame under g_mutex before submitting it, so two
concurrent PortPush calls cannot submit the same frame twice or drop
another, and restore it at the front if the submission fails. Open the
lazy internal AudioOut port for PortPush outside g_mutex, re-checking the
port before storing the handle and closing it when the port vanished.
Move the rollback close in sceAudio3dAudioOutOpen outside the lock too.
2026-10-20 22:06:52 +02:00
husari.orozco 6caa4971f9 fix(libSceAudio3d): drain the associated AudioOut ports on push
Queue the explicit AudioOut buffers instead of submitting them straight
away: sceAudio3dAudioOutOutput now copies the block into the associated
port's pending queue and returns the sample count, so the queue_depth
backpressure clears instead of wedging the port in NOT_READY forever.
PortPush drains every associated port's pending queue outside g_mutex,
popping a frame only once its submission succeeds. PortFlush keeps
draining the ports with a null output while clearing their queues.
sceAudio3dAudioOutOpen rejects a non-zero index and an unknown format
before opening and opens the AudioOut port outside g_mutex, re-checking
the port before it registers the handle.

sceAudio3dAudioOutOutputs returns 0 on success, matching the reference;
sceAudio3dAudioOutOutput returns the granularity as the sample count.
2026-10-20 22:06:52 +02:00
husari.orozco 0ee0731675 feat(libSceAudio3d): implement the explicit AudioOut exports 2026-10-20 22:06:52 +02:00
husari.orozco cd58534968 fix(libSceAudio3d): drain audio out of the lock and make sync and async distinct
Deliver and close the AudioOut port outside g_mutex: the queued frames are
moved out of the mixed deque under the lock and submitted after it is
released, and a failed output is returned instead of being dropped.

Make the blocking modes distinct: BLOCKING_SYNC drains every queued frame so
the queue level reaches 0, while BLOCKING_ASYNC submits only the excess and
leaves up to queue_depth - 1 frames buffered. Map a failed sceAudioOutOpen to
AUDIO3D_ERROR_OUT_OF_RESOURCES and rename the handle member to
audio_out_handle.
2026-10-20 22:06:52 +02:00
husari.orozco 68efaf1e55 feat(libSceAudio3d): mix on advance and deliver through AudioOut 2026-10-20 22:06:52 +02:00
husari.orozco 64be87978d fix(libSceAudio3d): accept every bed output route and cover the bed validation 2026-10-20 22:06:52 +02:00
husari.orozco 28a53f31db feat(libSceAudio3d): implement sceAudio3dBedWrite and BedWrite2 2026-10-20 22:06:52 +02:00
husari.orozco bae822a57a refactor(libSceAudio3d): name the downmix channel layout and coefficients 2026-10-20 22:06:52 +02:00
husari.orozco aece87d4c4 feat(libSceAudio3d): downmix multichannel sources to stereo in the mixer 2026-10-20 22:06:52 +02:00