Commit Graph
12196 Commits
Author SHA1 Message Date
MarcZX100 55497ed3a4 fix(relinker): omit RELRO when lazy binding 2026-10-17 13:27:03 +00:00
Dean ec76af441a Merge pull request #7125 from pushkarreddyy/feat/libs-yakuza-0-rudp-signaling-imports
feat(libs): declare missing RUDP and signaling imports for PPSA31327
2026-10-18 02:27:02 +13:00
MarcZX100 09bc5a1799 fix(relinker): preserve GNU stack and RELRO headers on Linux 2026-10-17 13:25:43 +00:00
Dean 042ec94a60 Merge pull request #6569 from MarcZX100/codex/pr-6564-mouse-read-pad-guard
fix(videoout): separate title mouse input from pad bindings
2026-10-18 02:25:04 +13:00
Dean 21a0672ab2 Merge pull request #7122 from Th3Gold3nRainbow/feat/libSceContentDelete
feat(libSceContentDelete): add sceContentDeleteById and sceContentDeleteByPath
2026-10-18 02:24:09 +13:00
Dean 4827f36cb5 Merge pull request #7029 from milescoviello/fix/condattr-setclock-einval
fix(libkernel): return EINVAL from scePthreadCondattrSetclock and Destroy for a null attribute
2026-10-18 02:22:59 +13:00
milescovielloandClaude Opus 5.5 9c9311af8f test(libSceNet): set TCP_NODELAY on a libkernel socket through sceNetSetsockopt
The call MXGP 26 makes; libkernel answers it since #5565.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 13:22:34 +00:00
milescovielloandClaude Opus 5.5 3573289f2f fix(libSceNet): set an option on a libkernel socket through sceNetSetsockopt
MXGP 26 (PPSA30839) opens TCP sockets with libkernel's socket() and
turns on TCP_NODELAY with sceNetSetsockopt. libSceNet only looked in its
own socket table, so the call failed with SCE_NET_ERROR_EBADF. On the
console both calls work on the same kernel sockets.

A descriptor libSceNet does not own but libkernel has open as a socket
now goes to libkernel's setsockopt(), which answers the options it
models. Anything else still fails with EBADF. The fallback runs after
g_mutex is released.

guest_sce_net sets SO_SNDBUF on a libkernel TCP socket through
sceNetSetsockopt, and checks that the call fails with EBADF once the
socket is closed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 13:22:34 +00:00
Dean af1e3ae904 Merge pull request #6641 from EagleBearerYS/fix/agc-shutdown-pool-threads
fix(agc): stop and join the driver's thread pools at shutdown
2026-10-18 02:22:13 +13:00
Alexej Szpevák acad67d946 feat(libkernel): poll descriptors 0 to 2 with the console model select uses
select takes descriptors 0 to 2 as a console title's terminal with no input: 0 is never readable and 1 and 2 are always writable. poll threw for them unless the host happened to attach a pipe, so the same title could select on its standard streams but not poll them. poll now gives the same answer, with POLLOUT, the one bit ttydev_poll reports for a writable terminal, for 1 and 2 and nothing for 0.
2026-10-17 15:21:34 +02:00
Alexej Szpevák 35f7466e50 fix(libkernel): answer select on files and the random device as FreeBSD's poll routines do
selscan asks a descriptor once, with the flags of every set it is in (POLLRDNORM for the read set, POLLWRNORM for the write set, POLLRDBAND for the exception set, plus POLLHUP and POLLERR), and marks each set whose flags the answer shares. A seeded random device's randomdev_poll narrows a request with POLLRDNORM to that bit and returns any other request whole, so in the read set it is readable and in no other set, and otherwise it is in each write and exception set it was asked in; select reported it readable and writable together and never exceptional. A regular file or directory went to the host poll, which on Windows threw; vop_stdpoll makes it readable and writable and never exceptional, which select now answers in process on every host, as poll does.
2026-10-17 15:21:34 +02:00
Dean 40315fcf8c Merge pull request #7102 from XairRrR/feat/pad-input-touchpad-halves
feat(pad): touch the left or right touchpad half from the input command file
2026-10-18 02:20:20 +13:00
Dean fbcaec0a5d Merge pull request #6559 from Bonjourcestmatt/fix/sysmodule-unknown-id-coverage
fix(libSceSysmodule): test and document unknown module ids
2026-10-18 02:19:42 +13:00
Ori ShamirandClaude Opus 5.5 ff4ecc6ee3 test(agc): order the late interrupt's commit after queue 0 waits
The test relied on queue 0 reaching its idle wait before the draw
pipeline committed the end-of-pipe label. It now forces that order: a
first submission runs the dispatch and leaves its batch unreaped
(APS5_NO_OPPORTUNISTIC_REAP), queue 0 must be waiting, then the label
is submitted while the test holds the GPU mutex, so the pipeline commits
it only after queue 0 handed it over and waits again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 16:19:04 +03:00
Alexej Szpevák 03ae66bea4 feat(libkernel): poll the random device as randomdev_poll does
poll threw for /dev/random and /dev/urandom, which select already treats as ready. FreeBSD 11.4's randomdev_poll, once the device is seeded, narrows a request that has POLLIN or POLLRDNORM to those bits and returns any other request whole, POLLOUT and the band bits included. poll now answers that, and the test that relied on the random device throwing uses a kqueue descriptor, which poll still does not support.
2026-10-17 15:18:34 +02:00
Alexej Szpevák 147d58cf9a feat(libkernel): poll regular files and directories as vop_stdpoll does
poll threw for any descriptor that is neither a socket nor a pipe, so a title polling a file it also reads stopped there. FreeBSD 11.4 hands a vnode to VOP_POLL, and both vop_stdpoll and vop_nopoll return POLLIN, POLLRDNORM and POLLOUT of the requested events for every event poll accepts and never POLLPRI, POLLRDBAND or POLLWRBAND. A file, a directory or a file read from app0.zar now answers that without a host call. File::IsVnode tells such a descriptor apart from the host file type without throwing, so a host socket lent by libSceNet still reaches its own path.
2026-10-17 15:18:34 +02:00
Dean 23f142350d Merge pull request #6886 from alexpournaras/fix/net-so-onesbcast
fix(libSceNet): store SO_ONESBCAST in sceNetSetsockopt
2026-10-18 02:17:03 +13:00
Lberonio 2aa6bfca62 fix(agc): suppress the flip end-of-pipe event on queues that raise release interrupts 2026-10-17 16:14:18 +03:00
pushkarreddyy 274f092e70 fix(libkernel): return EFAULT from sceKernelStat and sceKernelUnlink for a null path 2026-10-17 18:41:29 +05:30
Dean 532f3e7b89 Merge pull request #6216 from eljackjoestar-cmd/fix/audioout2-completed-grain-backlog
fix(audio): retain completed AudioOut2 grains until pushed
2026-10-18 02:06:50 +13:00
Maz dd70ca83fe test(libkernel): read absolute links into a buffer that fits 2026-10-17 17:06:37 +04:00
Dean f7d51cb885 Merge pull request #6474 from fdfawef324/claude/audioout2-grain-backlog
fix(libSceAudioOut): count completed AudioOut2 grains in the queue level
2026-10-18 02:05:38 +13:00
Dean 8f8bd8cd09 Merge pull request #6348 from JJenkx/fix/ngs2-ps5-handle-errors
fix(ngs2): use PS5 system and rack handle errors
2026-10-18 02:04:35 +13:00
Ori ShamirandClaude Opus 5.5 bd2197e919 fix(agc): wake an idle queue 0 for completions the draw pipeline adds
With pipelined draws, queue 0 hands the end-of-pipe labels of a
submission to the draw pipeline and can enter its idle wait before the
pipeline commits them. When such a label raises an end-of-pipe
interrupt behind recorded work, the pipeline attaches the delivery to
the batch as a completion and submits it, but queue 0 only reaps when
it saw completions pending before it went to sleep, and nothing woke
it. The batch was then reaped, and the interrupt delivered, only when
the next submission arrived, so a title that waits for that interrupt
before submitting more work stopped.

Queue 0's idle wait now also ends when completions are pending, and
the pipeline's end of a submission (and the REWIND path's open-work
submit) wakes it when they are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 16:04:23 +03:00
Dean d3a926e95f Merge pull request #7094 from Aryansh1520/feat/libSceNpTrophy2-reward-icon
feat(libSceNpTrophy2): declare sceNpTrophy2GetRewardIcon's arguments
2026-10-18 02:04:03 +13:00
Dean 32f28a462f Merge pull request #7093 from thuanquang/test/f16-fma-nan-bits-any-driver
test(agc): accept any NaN where the f16 fma and fma_mix tests expect one
2026-10-18 02:03:22 +13:00
Dean 20f15fd2fc Merge pull request #7103 from pushkarreddyy/feat/libSceVideoOut-color-space-exports
feat(libSceVideoOut): implement color space conversion and blend space exports
2026-10-18 02:02:10 +13:00
pushkarreddyy a295b771eb fix(libkernel): return EFAULT from sceKernelWriteThrottlingStatus for a null status 2026-10-17 18:31:54 +05:30
Dean c4f314d3ac Merge pull request #7104 from Amoenus/codex/test-pooled-buffer-gpu-main184
test(agc): honor GPU selection in pooled buffer checks
2026-10-18 02:01:32 +13:00
Dean c0b37ca726 Merge pull request #7028 from milescoviello/fix/pthread-attr-sched-enotsup
fix(libkernel): return ENOTSUP from pthread_attr_setschedparam and setschedpolicy like libthr
2026-10-18 02:00:22 +13:00
Dean 05b235498a Merge pull request #7099 from Lorkydey/feat/libc-safe-error-messages
feat(libc): implement bounded error message APIs
2026-10-18 01:58:23 +13:00
thibautandClaude Opus 5.5 a03ccc6be1 fix(shader): write cache files of 2 GiB and more in chunks
On Windows (MinGW libstdc++) one std::ofstream::write of 2 GiB or more
never returns: the whole temporary file is written but WriteFileAtomically
hangs, the entry is never replaced and the temporary file stays behind.
A Vulkan pipeline cache of 2.1 GB hung every save and left a 2 GB .tmp
per run. Write in chunks of at most 1 GiB.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XBXM4pgkMHYEtqN1EQni2P
2026-10-17 14:48:47 +02:00
Maz 6e331b3823 test(libkernel): compare absolute links by the file they name 2026-10-17 16:46:55 +04:00
JosepBove 3e1b7be111 fix(agc): clear the host depth image on a fill of a depth or stencil plane
A fill that covers a depth surface's whole stencil plane with four equal
bytes, or its whole depth plane with a value in 0.0-1.0, now reaches the
host image through the pending fast clear the next time the surface is
bound, sampled or stored to. An HTILE fill or HTILE clear kernel noted
afterwards replaces the value with DB_DEPTH_CLEAR/DB_STENCIL_CLEAR.
NoteDepthMetadataFill only reacted to fills of DB_HTILE_DATA_BASE, so the
Cohtml UI of Heretic + Hexen (PPSA26525) and DOOM + DOOM II (PPSA21444),
which resets its stencil plane to 1 with a 0x01010101 fill every frame and
then draws with stencil Equal 1 and 2, kept the stencil of earlier frames
and showed black squares and clipped text. agc_driver_depth_plane_fill
pins the rules.
2026-10-17 14:46:27 +02:00
pushkarreddyy a276d2f718 feat(libs): declare missing RUDP and signaling imports for PPSA31327 2026-10-17 18:14:12 +05:30
Alexius0815andClaude Opus 5.5 2b9c131e0c fix(shader): forward gl_ClipDistance through the generated rect-list stages
Since #3878 every vertex program that exports a position also writes
gl_ClipDistance for the all-zero position distance. The tessellation
stages generated for rect lists declared only gl_Position in gl_in, so
their input interface no longer matched the vertex outputs; on MoltenVK
the control stage then reads all-zero positions and every rect-list
draw stops with "rect-list requires finite nondegenerate axis-aligned
positions" (reported in #1).

The control and evaluation stages now declare the vertex program's
gl_ClipDistance array in their per-vertex blocks and forward it. The
generated fourth corner gets the clip distances interpolated with the
same weights as its position, so the all-zero position clip keeps
working for rect lists. Validation accepts gl_ClipDistance as a
tessellation input and as a tessellation-control output.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QXdkh9PHBCPqGcGQPeikAe
2026-10-17 14:36:51 +02:00
thuanquangandClaude Opus 5.5 ff9bf22281 fix(libkernel): end guest thread, fiber and context frame chains at a zero record
Unreal Engine walks the frame-pointer chain until it reads a return
address of 0 and never checks the frame pointer itself. Guest threads
started with whatever rbp the host code held, so the walk ran into host
start-up frames (glibc's saved rbp 0x21 in a LEGO Batman core dump,
address 8 in Returnal on Windows) and faulted. Fibers ended their chain
with a null frame, and makecontext started its function with rbp 0, so
the same walker read address 8 there too.

Guest threads now start through a thunk that points rbp at a
{saved rbp 0, return address 0} record, as the relinker's entry stub
does for the main thread; the fiber trampolines push the same record,
and the makecontext start function is built with frame pointers so its
frame, over the zero return address makecontext stores, ends the chain.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 19:27:53 +07:00
Romans Pokrovskis e040cb7f75 fix(agc): retain the unchanged DCC generation proof 2026-10-17 15:22:26 +03:00
screamm e8627d607b feat(libSceContentDelete): add sceContentDeleteById and sceContentDeleteByPath
Cult of the Lamb (PPSA06465, #2686) stops at start-up on the first one:

    FAIL: unresolved ELF import pXJh3aVk8Ks from libSceContentDelete.prx

Both exports have been on main without an implementation (#2740); the
call itself has not been observed yet.

Orbital (cc408367, tools/ida/db_types.json:541-542) and SharpProspero
(5dfdb4b0, Interop/Content/ContentDelete.cs:25-42) agree on the
signatures: a 64-bit SceContentSearchContentId and a UTF-8 path. The
content library is empty on the host, since libSceContentExport exports
nothing into it, so no id or path can be found. SharpProspero gives only
NoPermission (0x809D5006) and no public source gives the not-found code,
so both calls throw with the id or path named once the null path and the
initialization are checked, like the "not in the host content library"
throws of #3724. sceContentDeleteById moves from
guest_content_unimplemented to the new guest_content_delete test.

NIDs pXJh3aVk8Ks and qC3QW+AltHs match tools/nid_names.py and the shadPS4
aerolib list.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
(cherry picked from commit 928184824a4acdf36a58287034bff8154c861835)
2026-10-17 14:20:14 +02:00
Yossi Yadgar 5697cea471 test(agc): draw 16-bit interpolation through the emulated barycentrics
On a device without VK_KHR_fragment_shader_barycentric the draw now
builds the emulation's geometry stage and checks the same results in
wave64 and wave32 as on a device with the extension. It skips only on a
device with neither the extension nor geometry shaders, or without the
Float64 capability the exact sums need.
2026-10-17 15:18:41 +03:00
Yossi Yadgar f397af4ca6 test(agc): check that 16-bit interpolation takes the barycentric emulation
Without barycentrics the test shader now recompiles with the emulation
active instead of throwing, and with them it does not take it. The
offline target declares Float64, which the exact interpolation sums use.
2026-10-17 15:18:41 +03:00
Yossi Yadgar d951775d15 fix(shader): take 16-bit interpolation to the barycentric emulation without the extension
v_interp_p1ll_f16, v_interp_p1lv_f16 and v_interp_p2_f16 read each
vertex's parameter and threw on a device without
VK_KHR_fragment_shader_barycentric. Without the extension the pixel
shader is translated once for fixed-function interpolation and, when
that cannot express it, again with the barycentric emulation, whose
generated geometry stage passes each vertex's parameter as a flat input.
The throw came in the first pass, before the second could run. Without
it the 16-bit parameters keep the shader off fixed-function
interpolation, so it takes the emulation and reads the halves bit for
bit, as v_interp_mov_f32 already does.
2026-10-17 15:18:40 +03:00
Ondra97 785c107979 test(agc): separate binding and cache pressure regressions 2026-10-17 14:10:09 +02:00
Ondra97 432fe5cf94 fix(agc): discard device buffers after memory binding fails 2026-10-17 14:10:09 +02:00
SamandClaude Opus 5.5 86b05a0dc6 fix(agc): keep cached pipelines across lazy buffer pool creation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 13:08:13 +01:00
SamandClaude Opus 5.5 724b16624f fix(agc): restrict lazy sampled view usage
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 13:08:11 +01:00
milescovielloandClaude Opus 5.5 e88b7de3c1 fix(libkernel): measure the host stack reserve from the frame address
MeasureStackReserve took the distance from the stack top to a local
variable. In an ANYPS5_ENABLE_ASAN build that local lives on
AddressSanitizer's fake stack (detect_stack_use_after_return is on by
default on Linux), away from the thread's stack, so the reserve could
come out negative. scePthreadCreate then asked the guest arena for a
stack of nearly 2^64 bytes and threw 'guest address space arena
exhausted'. The frame address is on the real stack in every build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 12:06:42 +00:00
Ondra97 5001f87bc9 fix(agc): return slab slots without allocating host memory 2026-10-17 14:05:58 +02:00
Romans Pokrovskis 6eebcc2ce1 fix(agc): exclude neighboring stores from DCC invalidation 2026-10-17 15:05:34 +03:00
Romans Pokrovskis 975c3ee6b3 test(agc): distinguish stores beside resident DCC metadata 2026-10-17 15:04:14 +03:00