Commit Graph
2834 Commits
Author SHA1 Message Date
Dean ed835aa76f Merge pull request #5756 from oneandonlydean/fix/raise-address-lock-1488
fix(libkernel): defer raises while a thread holds the address-wait lock on Windows
2026-10-15 07:01:27 +13:00
Nicolas FalesyandClaude Opus 5.5 62d8eeae76 fix(libkernel): poll libSceNet sockets with the host wait
With libSceNet sockets on ordinary descriptor numbers (#4391), poll on a
libSceNet socket threw "neither a socket nor a pipe": poll only knew
libkernel sockets and pipes, while select already asks libSceNet through
its poller. libSceNet now lends libkernel the host socket behind a
descriptor, together with an owner that keeps it open, so poll puts it in
the same WSAPoll or poll call as libkernel sockets. ProsperoLight
(PPSA99002) stopped here on Linux and now reaches its PC list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EvDbpwUPTa78oCAJqe7m9K
2026-10-14 19:56:10 +02:00
Adrià 61cec42439 Merge pull request #5032 from kq62/docs-winlibs-link
docs(build): link the supported WinLibs release
2026-10-14 19:54:36 +02:00
Get-fix 901b92c794 feat(libSceVideoOut): register PS4 display buffers
Add the PS4 functions sceVideoOutSetBufferAttribute and
sceVideoOutRegisterBuffers on top of the existing registration. The PS4
call uses the first free attribute set and returns its index. It
accepts linear A8R8G8B8_SRGB and A8B8G8R8_SRGB buffers, which map to the
PS5 B8G8R8A8 and R8G8B8A8 formats. It throws for tiled buffers, whose
PS4 layout differs from the PS5 one. Linear PS4 buffers may be 4 KiB
aligned: the OpenOrbis graphics sample places its second 1920x1080
buffer 8,294,400 bytes after the first. PS5 buffers keep the 64 KiB
rule. A handle with PS4 buffers writes the PS4 flip status (64 bytes)
and vblank status (32 bytes). Writing the 128-byte PS5 flip status into
the sample's stack structure overwrote its saved frame pointer.
2026-10-14 20:52:00 +03:00
Adrià FranchandClaude a15f163245 docs(debt): FMASK decompress over multisampled targets
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 19:49:32 +02:00
Adrià 26ce6e954a Merge pull request #4779 from MarcZX100/codex/null-tsharp-type-4139
fix(agc): treat type-0 texture descriptors as null
2026-10-14 19:47:43 +02:00
Adrià 8ba869d303 Merge pull request #4450 from Pipodi/feat/tessellation-instanced-hull
fix(shader): number an instanced draw's hull patches across its instances
2026-10-14 19:44:52 +02:00
TripyFoxandClaude Opus 5.5 3c1f43948b fix(shader): fault only where a table call misses its linked callees
An s_swappc_b64 whose target is not resolved compiles to a faulting call
only at the fallback the table-call linker emits; the linker lists those
calls in the request (GuestContext::linkedCallFallbacks), and every other
computed call is refused at compile time again, as on main. The new
agc_driver_compute_table_calls test runs a linked two-record table on
Vulkan in wave32 and wave64, with SCC 0 and 1 reaching the callee, and a
record past the table reporting the UnlinkedCall fault.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 06:44:25 +13:00
TripyFoxandClaude Opus 5.5 9c8fb780e8 feat(shader): link callees of calls whose target is loaded from a table
An s_swappc_b64 whose target pair comes from an s_buffer_load of a buffer
whose descriptor is loaded from user data now calls the targets that buffer
holds: at dispatch the driver reads the buffer, links one copy of each
distinct callee after the caller and rewrites the call into a compare chain
that s_call_b64s the matching copy. A target that matches no copy, and any
other computed call, records an UnlinkedCall fault that the driver reports,
instead of failing the shader at compile time.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 06:44:07 +13:00
RickandClaude Opus 5.5 6fd0e33431 fix(libSceVideodec2): report the coded picture size
Decode and Flush let FFmpeg crop every picture to its display size, so a
1080p H.264 stream came out as 1920x1080 with the chroma after 1080 luma
rows. The console reports and writes the coded picture: EVO-PLAYER-PS5's
hardware run of a 1080p H.264 IDR returned 1920x1088 with pitch 2048 and
the chroma after the 1088 luma rows, and ProsperoLight rejects a 1080p
H.264 or HEVC picture whose height is not 1088. FFmpeg's cropping is now
off, so the frame size, the chroma offset and the sizes in the AVC
picture info are those of the coded picture. The pitch is unchanged, and
the frame size QueryDecoderMemoryInfo reports, which aligns the maximum
height to 32 rows, still holds a picture coded within the maximum and the
macroblock-padded H.264 picture of a maximum given as the display size.

libSceVdecsw derived its crop offsets from the difference between that
size and the macroblock grid, which is now zero. It takes the crop FFmpeg
exports for the picture from libSceVideodec2 instead.

The H.264 fixture is coded at 64x48 with frame_crop_bottom_offset 4: its
pictures are checked at 64x48 and the crop through Vdecsw. The HEVC and
VP9 fixtures are coded at 64x40 and keep their hashes. The new hashes come
from FFmpeg 8.1 decoding with apply_cropping 0, hashed as the tests do;
the same method reproduces every previous H.264, HEVC and VP9 hash.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 19:39:34 +02:00
Adrià 1cbd74ed9d Merge pull request #4906 from nicolasfalesy/feat/savedata-name-prepare-for-transferring
refactor(libSceSaveData.native): name sceSaveDataPrepareForTransferring
2026-10-14 19:35:45 +02:00
Adrià fe1ccd79b7 Merge pull request #4778 from xXPBSXx/fix/audioout2-port-state-channels-v2
fix(libSceAudioOut): report the port's channel count from sceAudioOut2PortGetState
2026-10-14 19:32:58 +02:00
billythemenace2andClaude Opus 5.5 bd09862e55 fix(shader): read 1D T#s through 3D image_sample and image_load accesses
A 3D image access bound to a 1D T# matched no runtime image mode and threw
"image descriptor is incompatible with the static runtime image interface"
(SONIC SUPERSTARS, PPSA06888, which reads a 1x1 1D T# as 3D with a plain
image_sample and an image_load). Add a 1D mode for 3D accesses whose only
uses are image_sample_lz, plain image_sample or mip-less image_load.

Measured on RDNA1 (RX 5700 XT, gfx1010) with the hardware oracle:
image_sample_lz reads the texel u selects and ignores v and r with every
addressing mode; a plain image_sample takes its texel and LOD from u alone;
image_load reads the x texel for any y when z is 0 and returns zero for any
other z, as the 3D-on-2D load measured in #2023 does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QQNVXyqeecpyneonkYL6H1
2026-10-14 18:32:22 +01:00
xXPBSXxandClaude Sonnet 5.5 84aa2349f8 fix(libkernel): answer F_GETFD and F_SETFD on a guest socket
fcntl on a guest socket handled F_GETFL and F_SETFL only and failed every other command with EINVAL, so libcurl's fcntl(fd, F_SETFD, FD_CLOEXEC) on a new socket failed (ProsperoRadio PPSA99001, traced by screamm on #4796). Record FD_CLOEXEC per socket descriptor: F_SETFD sets or clears it, F_GETFD reads it, SOCK_CLOEXEC sets it at creation, and dup, dup2 and close start without it, as FreeBSD's kern_fcntl and kern_dup do.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 19:28:40 +02:00
Tyler WesterbergandClaude Opus 5.5 18522aeabb fix(agc): wait for queued registration preparations before accepting a submission
Since registered shaders are prepared in the background, a draw whose shader
was registered just before could wait seconds for its preparation inside the
queue worker. Under CPU load Goat Simulator 3's first submissions took ~3.7 s;
the title treated the GPU as hung, stopped submitting, and its 10 s garbage
collection timeout crashed it on every launch. Driver::Submit now waits for
the preparations queued before it, on the submitting thread, before the
commands reach the GPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:26:46 +02:00
Nicolas FalesyandClaude Opus 5.5 204c2ac4af refactor(libSceSaveData.native): name sceSaveDataPrepareForTransferring
The NID RvID8BVeg+g, declared as sceSaveDataUnknown_RvID8BVeg for
Minecraft (PPSA17221), hashes to sceSaveDataPrepareForTransferring. The
name is not in aerolib; it was found by combining words from the
libSceSaveData names that are. Behaviour is unchanged: it still throws,
now naming the real function.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017WeVmjnnPPKdxVTpr2Vjtw
2026-10-14 19:17:41 +02:00
Adrià FranchandClaude 58b2245027 docs(debt): record type-0 texture descriptors bound as null images
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 19:17:15 +02:00
Adrià e154f56585 Merge pull request #5844 from p3n1cillin/claude/audioout-ex-open
feat(libSceAudioOut): open HDMI bitstream ports with sceAudioOutExOpen
2026-10-14 19:17:02 +02:00
Adrià b60e0bc0a5 Merge pull request #4676 from milescoviello/fix/socket-msg-dontwait
fix(libkernel): accept MSG_DONTWAIT in the socket send and receive calls
2026-10-14 19:13:53 +02:00
Adrià 5ef619a914 Merge pull request #5813 from eliyarson/trace-drop-detail
feat(agc): report which trace threads dropped events and where their buffers filled
2026-10-14 19:10:18 +02:00
Adrià c14fd87044 Merge pull request #4721 from fdfawef324/build/stable-import-libraries
build(libs): keep import libraries stable so a source edit relinks one library
2026-10-14 19:08:35 +02:00
Adrià Franch 3c17b3dbb2 docs(debt): update the relative patch index line for instanced draws 2026-10-14 19:08:18 +02:00
Dean 19e020a274 Merge pull request #1186 from MichonGoddijn231849/feat/depth-plane-array-base-slice
feat(agc): sample depth plane arrays from a later base slice
2026-10-15 06:04:53 +13:00
Rujul Talekar 661b1671ff feat(libc): implement collate<wchar_t>::_Getcat 2026-10-14 22:27:59 +05:30
Itamar Medyoni 52a3b15796 feat(libkernel): report relative symbolic links in lstat on Windows
lstat of a Windows symbolic link threw, although symlink creates links
with relative targets on Windows and readlink reads them. Report such a
link as S_IFLNK with its own identity and times and the length of its
target as st_size, through the reparse reader readlink already used,
now shared from libkernel. Links with absolute targets, junctions and
other reparse points still throw, as for readlink.
2026-10-14 18:55:31 +02:00
Eli Yarson a53332472c feat(agc): report which trace threads dropped events and where their buffers filled
The trace summary line keeps `trace_dropped` as before: true when any
thread lost a slice, any thread's totals table was full, or the gpu
track was full. When it is true, the line now also carries
`trace_dropped_threads`, one entry per affected thread name, so the reader
can tell which thread lost data and how much. Threads that share a
name, such as the shader prepare threads, share one entry: losses are
summed, the earliest fill is kept and totals_full is true if any is.

Each entry has `events_full_after_s`, the seconds from the first
present of the window to the start of the first lost slice. It is
absent for `gpu` and in every summary line (windowed frames/seconds
and APS5_TRACE_SUMMARY_EVERY) whenever the first lost slice starts
outside the line's span of presents, including a slice whose scope
began before the window opened or one lost after the last present.
`events_lost` is the number of slices not recorded and is absent when
0; in interval lines it counts the buffer's losses since it started.
`totals_full` is true when the thread's totals table overflowed, which
makes the summary numbers incomplete; a thread with only `events_lost`
has complete totals.

The Chrome trace gets a `trace buffer full` instant event on a thread
at the point where its buffer filled.

BUILD.md documents the new fields and the event.

`trace_dropped` is unchanged, and when nothing drops the default output
is byte-identical to before.

Refs #5786
Depends on #5808
2026-10-14 18:54:44 +02:00
Kurenaiiiii 36ffe08690 feat(libSceNpWebApi2): accept PushEventAbortHandle for known contexts 2026-10-14 22:11:11 +05:30
Kurenaiiiii b4ee57e6ff fix(libSceGameUpdate): return INVALID_ARGUMENT for null entitlement label 2026-10-14 22:11:08 +05:30
JosepBove 9926c6b76b docs(ngs2): cite the PS5 module for the voice-index error 2026-10-14 18:36:33 +02:00
Claude 793224067f fix(shader): round and flush f16 conversion results by FLOAT_MODE in every denormal mode
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ha6Tsy62AFUyp9a5Mf7vjA
2026-10-14 16:25:23 +00:00
Claude 9399cc93aa fix(shader): flush v_cvt_pknorm_*_f16 denormal inputs by FLOAT_MODE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ha6Tsy62AFUyp9a5Mf7vjA
2026-10-14 16:18:32 +00:00
Yunus Shaikh 85ff7136d0 docs(libSceNet): record the wait for a datagram socket's local address on Windows 2026-10-14 09:07:56 -07:00
KernelPanicNTandClaude Opus 5.5 9a0aa5f6a7 fix(exports): export the PS VR2 calls Phasmophobia's psvr2.prx imports
PPSA09030's Media/Plugins/psvr2.prx imports sceHmd2ReprojectionGetStatus
from libSceHmd2 and sceVrTracker2GetCoordinateSystem and
sceVrTracker2GetPlayAreaBoundaryGeometry from libSceVrTracker2, so the
title does not start with the plugin loaded (discussion #4680). Declare
the three as throwing exports, like the earlier PS VR2 imports of
PPSA29866. The names resolve from the NIDs 8GkaY2B7opM, Y-3JCiU9bbU
and SCph4ZbkqzU with tools/nid_names.py; no reference gives their
signatures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:57:41 +00:00
JosepBove 17f8bb521e docs(ngs2): name DOOM + DOOM II among the titles that probe the voice index 2026-10-14 17:55:09 +02:00
Adrià e34c479210 Merge pull request #758 from Celegans12/feat/agc-image-tables-global
feat(agc): implement image tables loaded through 64-bit pointers
2026-10-14 17:53:44 +02:00
Adrià 763ad20fc1 Merge pull request #757 from Celegans12/feat/agc-image-tables
feat(agc): implement image and sampler tables indexed at runtime offsets
2026-10-14 17:48:32 +02:00
SynnZer0andClaude Opus 5.5 8029428497 fix(libkernel): keep host standard streams open on guest close
Guest descriptors are host C runtime descriptors. Closing descriptor 0, 1
or 2 closed the host process's standard stream, and the runtime then gave
that number to the next file opened anywhere in the process, including
files libkernel opens itself, such as the APR reader's. The title's next
close of the same number closed that file mid-read.

close and sceKernelClose now fail with EBADF for descriptors 0 to 2 that
were open when libkernel loaded, and leave them open. A standard
descriptor that was not open at load can still be opened and closed by
the guest.

PPSA21703 calls sceKernelClose(0) repeatedly while loading asset
bundles, which made APR reads return 0 or a part of the requested bytes
and raised UCRT invalid parameter reports from close.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:46:42 +02:00
Evgeniy KazarinandClaude Opus 5.5 a1b80121c1 fix(libSceSystemService): pass LoadExec arguments as the whole guest argv
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:41:25 +03:00
Yunus Shaikh 7f82da1080 docs(libSceNet): record which timeout options take a timeval 2026-10-14 08:37:49 -07:00
JosepBove 5fe4780812 fix(ngs2): return the voice-index error from sceNgs2RackGetVoiceHandle
An index at or beyond the rack's voice count returned through
APS5_INVALID_ARG_EX, which throws and ends the process. Heretic + Hexen
(PPSA26525) creates a one-voice reverb rack, takes voice 0 and asks for
voice 1 at start-up, so it stopped at 1.5 s on
"sceNgs2RackGetVoiceHandle: invalid argument". Return 0x804A8305 and
leave the output handle untouched, after the existing null-output and
rack-handle checks. The value follows prosper's analysis of
libSceNgs2.native.sprx; shadPS4 lists 0x804A0302 for the PS4 library.
Neither is a PS5 measurement, recorded in the technical debt.

ngs2_voiceindex creates one-voice sampler, submixer, mastering and
reverb racks and a default sampler rack, and checks the error, the
untouched output, the null-output and invalid-rack codes and that the
last valid index still resolves afterwards. It aborts on main's library
with the throw above and passes with this change.
2026-10-14 17:29:25 +02:00
Elvis BruhinandClaude Opus 5.5 f708a73969 feat(libSceSsl): record connection verify options, minimum version and ALPN
sceSslEnableVerifyOption, sceSslDisableVerifyOption, sceSslSetMinSslVersion,
sceSslSetAlpn and sceSslGetAlpnSelected kept throwing because their
signatures were unknown. SharpProspero, the source already used for the
other connection functions, declares them; the signatures follow it.

The options, minimum version and ALPN list are recorded on the connection
like the verification callback; nothing reads them until sceSslConnect has
a transport. sceSslGetAlpnSelected returns null because no handshake
completes. Unknown connections and terminated contexts throw.

The PPSA07411 functional debt entry moves to libSceJson2.md, now its first
linked library.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SaSmTp7ZiSYcnUMTDVa7hZ
2026-10-14 17:28:07 +02:00
Adrià a453108cf7 Merge pull request #5817 from snipeTR/feat/voice-reset-port
feat(libSceVoice): implement sceVoiceResetPort
2026-10-14 17:23:46 +02:00
eljackjoestar-cmd bb4ec482d2 fix(audio): preserve completed AudioOut2 grains across threads 2026-10-14 19:18:32 +04:00
Jota 4cb3271fb2 docs(build): list Mach-O among relinker-only outputs 2026-10-14 12:10:46 -03:00
KernelPanicNTandClaude Opus 5.5 352a300dd8 feat(libkernel): answer sceCoredumpGetThreadContextInfo outside the coredump handler
sceCoredumpGetThreadContextInfo takes (void* threadContextInfo,
size_t threadContextInfoSize) as in Orbital's IDA type database, and the
144-byte block of 18 64-bit registers follows SharpProspero. It answers
as sceCoredumpGetStopInfoCpu: the handler is never invoked here, so an
aligned 144-byte request returns NOT_IN_COREDUMP_HANDLER without reading
or writing the block, and null, unaligned or wrapping buffers and other
sizes throw, as the console validation order is unverified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:45:01 +00:00
Adrià 979ad7b6aa Merge pull request #5861 from simonbronk/feat/sample-location-grid
feat(agc): rasterize sample locations that vary between pixels through a 2x2 grid
2026-10-14 16:44:29 +02:00
Adrià 41cf107810 Merge pull request #5853 from KernelPanicNT/feat/system-gesture-recognizer-information
feat(libSceSystemGesture): implement sceSystemGestureGetTouchRecognizerInformation
2026-10-14 16:44:03 +02:00
Celegans12 34525fdf7a feat(agc): implement image tables loaded through 64-bit pointers
Plan runtime-indexed T# and S# columns read through a 64-bit pointer.
Preserve the console offset alignment, signed immediate and key bounds.
Track the descriptor dwords consumed by each table in its invocation.
Reject table reads when a writable buffer or storage image overlaps them.
Cover the overlapping-storage fault and isolated second-table behavior.
2026-10-14 16:43:57 +02:00
Celegans12 d9e47d1e98 feat(agc): implement image and sampler tables indexed at runtime offsets
Materialize runtime-indexed image and sampler records into descriptor
tables while keeping descriptor selection in the shader. Report invalid
active entries through the existing deferred fault buffer.

Bind fragment tables in the fragment set when pipeline libraries split it,
and reserve a physical descriptor for empty tables. Reject unsupported
sampler, border, cube and anisotropic pairings per entry. Keep one column
per heap access shape, one T# shared by several image operations included
(milescoviello's #5550 case), and narrow it to the union of its keys'
domains when every key has one (SleglJan's key-domain changes). Plan
columns read at (key << n) & mask over their whole domain (tibzejoker's
fix). Read records in runs through SleglJan's bulk reader, and reject
entries whose surface has no mapped byte, as Tamalero proposed. Store
table columns in disk plans; update the runtime ABI and disk format. Bound
table-sized entries in the resource cache (65,536 table elements) and the
dispatch cache (256 MiB of captured words), evicting LRU.
2026-10-14 16:43:57 +02:00
Yossi Yadgar 3969d4f8b3 docs(debt): note how AVC units of parameter sets alone are decoded 2026-10-14 17:42:02 +03:00