Commit Graph
3534 Commits
Author SHA1 Message Date
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
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
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
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 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 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
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
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 b1fa1b94f1 docs(debt): note how 16-bit interpolation reads its parameters without the extension 2026-10-17 15:18:41 +03:00
Dean c9e6c45de9 Merge pull request #7016 from Amoenus/codex/fix-native-vertex-after6590-main661
fix(agc): refuse native MSAA vertex buffer reads
2026-10-18 00:57:37 +13:00
pushkarreddyy 4bc8e2c683 feat(libSceVideoOut): implement color space conversion and blend space exports 2026-10-17 17:14:24 +05:30
Dean df92748a30 Merge pull request #6318 from hypermoist/fix/libc-lgamma-signgam
fix(libc): store the sign of gamma in an exported signgam from lgamma
2026-10-18 00:32:04 +13:00
Dean 677354d9da Merge pull request #7018 from thuanquang/fix/mul-lo-u16-24-bit-factors
fix(shader): read low-half 16-bit multiply factors as 24-bit fields
2026-10-18 00:30:09 +13:00
Dean ab85981811 Merge pull request #6251 from parthbhanti22/fix-fchmodat-symlink
fix(libkernel_sys): return 0 for AT_SYMLINK_NOFOLLOW in fchmodat
2026-10-18 00:29:29 +13:00
lorkydey 14acf7f444 feat(libc): implement bounded error message APIs 2026-10-17 13:26:23 +02:00
milescovielloandClaude Opus 5.5 91fbafd94a fix(libkernel): keep refusing a read low-water mark above 1 on non-stream sockets
On Linux, FIONREAD on a datagram socket reports the next datagram only,
where FreeBSD's sbavail counts every queued byte, so a read mark above 1
there could never fire. kevent now throws for it as before; stream
sockets and marks of 1 are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 11:20:03 +00:00
Aryan SharmaandClaude Haiku 5.5 6a8062b487 feat(libSceNpTrophy2): declare sceNpTrophy2GetRewardIcon's arguments
The bundled PSNCore.prx of PPSA06888 calls sceNpTrophy2GetRewardIcon
with (context, handle, reward_id, buffer, size): once with a null buffer
to read the size, then with a buffer of that size. The function still
throws because the reward icon data is unknown.

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
2026-10-17 16:45:41 +05:30
Claude 9766ea7781 Merge upstream/main into claude/brave-ride-lz92qi
Brings in main's connection verify options, minimum version, ALPN and
certificate readers. The conflicts in libSceSsl/Export.cpp and the
libSceSsl debt entry take the resolution from blawesom's rebase of this
pull request (blawesom/AnyPS5 rebase/6828 at 925c37aa0): SslConnection
keeps main's verifyOptions, minimumVersion and alpn next to the session,
and the debt entries follow main's structure.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RoU3ZF76A6uR8sCA7NMLch
2026-10-17 11:00:59 +00:00
milescovielloandClaude Opus 5.5 e1d4ccba49 fix(libkernel): take NOTE_LOWAT on socket read and write events
kevent threw for NOTE_LOWAT. On a socket's EVFILT_READ it now sets the
low-water mark as FreeBSD 11's filt_soread does: the event fires once the
buffered bytes reach it, or at end of file or on a listening socket, and
a later change of the knote replaces it. EVFILT_WRITE takes a mark of 1,
where the host's writability stands in for a free byte; other write marks
and marks below 1 still throw. A pipe ignores the mark, as filt_piperead
does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 10:58:41 +00:00
milescovielloandClaude Opus 5.5 5b072bc2c4 fix(libSceSystemService): park guest threads during LoadExec's shutdown as exit does
Metal Gear Solid 4 (PPSA18194) aborts on main when its launcher starts
the game: sceSystemServiceLoadExec runs the guest shutdown, a render
thread that then calls into the stopped AGC driver gets ProcessShutdown
back from LibcAwaitExit, and the exception unwinds into title code,
which terminates the process before the new executable starts.

LibcAwaitExit parks a thread only once an exit has been requested, and
LoadExec ran the shutdown without requesting one. It now starts the
shutdown the way exit does, so such threads wait until the process is
replaced.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 10:50:36 +00:00
pushkarreddyy 9fb282064b fix(libSceAgcDriver): accept unclamped normalized color target formats 2026-10-17 16:12:00 +05:30
Jan ŠléglandClaude Fable 5.1 39c23664bd fix(agc): let the storage image cache budget follow the heap's use like the sampled one
StorageTextureBudget gave the storage image cache a quarter of the VK_EXT_memory_budget
budget of the largest device-local heap (capped at TextureCacheBudget, never below 512 MiB)
whatever else the heap held, while SampledTextureBudget takes what that budget leaves after
the heap's other use. On a 10 GB card the storage cache kept 2024-2170 MiB into a level load
whose depth and render target allocations then failed with VK_ERROR_OUT_OF_DEVICE_MEMORY
with the heap at its reported budget where a run logged it.

The storage image budget is now what the reported budget leaves after the heap's use other
than the cached storage images, the unused part of the sampled textures' 2 GiB floor and an
eighth of the budget; the caps at a quarter of the budget and at TextureCacheBudget and the
512 MiB floor stay. The sampled budget still reserves TextureCacheBudget for the storage
cache, at least the storage cap, and the storage budget reserves the sampled textures alive,
so neither counts bytes the other may take; while the sampled textures alive stay within
their floor the sampled budget falls first, then the storage budget, and above it both fall
together. The budget line also prints when the storage image budget moves by more than a
tenth, with its previous value, and StorageTextureCacheBudget is exported for the execution
test.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-17 12:33:05 +02:00
Alexej Szpevák f2d3980f5e fix(libkernel): report free send space for socket write events on Linux
A socket's EVFILT_WRITE and sceKernelAddWriteEvent reported the whole SO_SNDBUF in data, however much was already queued. FreeBSD 11.4's filt_sowrite reports sbspace, the space still free. On Linux the queued bytes from SIOCOUTQ are now taken off SO_SNDBUF. Windows has no query for the queued bytes and macOS is not wired up, so both keep reporting SO_SNDBUF; the debt entry says so.
2026-10-17 12:28:11 +02:00
mrfelekandClaude Opus 5.5 40f4506659 fix(libSceNgs2): let render skip a grain while another thread holds the system lock
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BywPXoZACVi8ALV4JKvuPZ
2026-10-17 12:15:01 +02:00
Yunus Shaikh 7b3826a42d Merge main into fix/recompiler-once-per-pixel-sample-inputs
main d7262bd6d6 adds the single-sample scan entry after the custom MSAA
sample locations entry in the AGC debt file. Keep it after this
branch's version of that entry.
2026-10-17 03:04:20 -07:00
Yunus Shaikh cebbd414eb Merge main into fix/agc-sample-location-grid-fallback
main d7262bd6d6 adds the single-sample scan entry after the custom MSAA
sample locations entry in the AGC debt file. Keep it after this
branch's version of that entry.
2026-10-17 03:04:15 -07:00
Alexej Szpevák 41ec785705 fix(libkernel): answer F_GETLK with F_UNLCK on Linux and macOS
fcntl threw for F_GETLK with an F_UNLCK request on the hosts that use POSIX locks, as Linux's F_GETLK rejects that type. FreeBSD 11.4's kern_fcntl accepts it and lf_getlock reports the first overlapping lock that lf_blocks lets conflict: another owner's lock, one of the two being a write lock. For an F_UNLCK request that is exactly another owner's write lock, the same set an F_RDLCK request finds, so the host is asked with F_RDLCK and the reply is written back as for the other types.
2026-10-17 12:00:21 +02:00
Adrià d7262bd6d6 Merge pull request #5915 from SandstromPL/fix/agc-single-sample-scan-multisampled-depth
fix(agc): rasterize a single-sample scan into a multisampled depth target at the pixel center
2026-10-17 12:00:13 +02:00
Adrià fce6353052 Merge pull request #6026 from leorossi2005/feat/voiceqos-endpoints
feat(libSceVoiceQoS): implement endpoints and connections to unblock
2026-10-17 12:00:03 +02:00
Alexej Szpevák 5433b32b7d fix(libc): return the open error from fopen_s instead of ENOENT
fopen_s returned ENOENT for every failed open, including an invalid mode, a directory opened for writing and the loop and long-name cases. C11 K.3.5.2.1 only asks for a nonzero value; Microsoft's CRT, which shares Dinkumware's library, returns errno. fopen_s now returns the errno fopen set.
2026-10-17 11:52:14 +02:00
Dean bf20538169 Merge pull request #7053 from inmert/fix/relinker-macos-libc-for-libkernel
fix(relinker): list libc.prx with libkernel.prx in macOS executables
2026-10-17 22:32:23 +13:00
Alexandros Pournaras 4b656882ba fix(libSceNet): store SO_ONESBCAST in sceNetSetsockopt 2026-10-17 11:29:25 +02:00
Aryan Sharma 2e0d310c91 docs(debt): link the backtrace entry from its debt file 2026-10-17 14:57:32 +05:30
Aryan Sharma ec832e0bcb fix(libc): limit sceLibcBacktraceSelf to Linux and test its record layout 2026-10-17 14:56:56 +05:30
Aryan Sharma ce57c2d799 feat(libc): implement sceLibcBacktraceSelf on Linux
PPSA28997 (IL2CPP) calls sceLibcBacktraceGetBufferSize and
sceLibcBacktraceSelf. On Linux the host call stack is captured with
backtrace and each frame is resolved to its module and offset with
dladdr, then written as a linked list of frame records. The record
layout is inferred and listed in TechnicalDebt. Windows throws.
2026-10-17 14:56:56 +05:30
inmert f91e53d595 fix(relinker): list libc.prx with libkernel.prx in macOS executables 2026-10-17 14:06:01 +05:30
thuanquangandClaude Opus 5.5 e5cc0bc0ff feat(shader): translate packed f16 in the f16 denormal modes that flush
v_pk_add/mul/fma/fmac/min/max_f16 threw in f16 denormal modes 0-2. On
RDNA2 (gfx1031) bit 6 clear flushes each denormal input lane to a zero
of its sign, and bit 7 clear flushes an add result below 2^-14 and a
mul or fma result whose exact value rounded to 11 significant bits
with an unbounded exponent is below 2^-14, as the scalar forms do;
min/max flush only their inputs. Packed f16 still throws for f16
rounding other than nearest even.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 21:23:10 +13:00
Dean adb0e7a8cb Merge pull request #7040 from thuanquang/fix/fma-mix-f16-input-flush
fix(shader): flush v_fma_mix_f32 f16 sources by the f16 denormal field
2026-10-17 21:21:53 +13:00
Dean bf0bec93ff Merge pull request #7041 from thuanquang/fix/div-fixup-f64-input-flush
fix(shader): flush v_div_fixup_f64 src1 and src2 by the f64 denormal field
2026-10-17 21:21:49 +13:00
Dean a60ac1fbed Merge pull request #7034 from thuanquang/fix/f16-fma-denormal-flush
fix(shader): flush v_fma_f16 family denormals by the f16 denormal field
2026-10-17 20:52:18 +13:00
Dean 17cfb1f4cb Merge pull request #7031 from thuanquang/fix/f16-pack-denormal-flush
fix(shader): flush v_cvt_pkrtz_f16_f32 and v_pack_b32_f16 f16 denormals
2026-10-17 20:22:25 +13:00
Dean 8a2a2ee78f Merge pull request #7030 from thuanquang/fix/div-fixup-f16-input-flush
fix(shader): flush v_div_fixup_f16 src1 and src2 by the f16 denormal field
2026-10-17 20:22:21 +13:00
Dean 61ba0d9185 Merge pull request #7021 from thuanquang/fix/f16-compare-input-flush
fix(shader): flush f16 compare inputs by the FLOAT_MODE f16 denormal field
2026-10-17 20:22:13 +13:00
jagrat Singh fd5eb8458b feat(libSceSsl): implement certificate validity period and fingerprint queries 2026-10-17 12:47:23 +05:30
thuanquangandClaude Opus 5.5 a08adae15f fix(shader): flush v_div_fixup_f64 src1 and src2 by the f64 denormal field
On RDNA2 (gfx1031) f16/f64 denormal modes 0 and 2 flush the denominator
and numerator of v_div_fixup_f64 to a zero of the same sign and keep a
denormal quotient and result, as v_div_fixup_f32 does with the f32
field. The translation used them unflushed, so 0 / 2^-1074 gave 0
instead of the default NaN.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 14:08:08 +07:00