Commit Graph
6874 Commits
Author SHA1 Message Date
Dean 379b1dca32 Merge pull request #9164 from MaxLikesCode/fix/kernel-sema-einval
fix(libkernel): return EINVAL for the semaphore arguments the console rejects
2026-10-24 15:28:17 +13:00
Yunus Shaikh a809ad7d2f fix(libc): fail a q length in scanf as the console's libc does
The console's own sscanf, run natively from three titles' libc.prx, returns 0 for %qd and stores nothing, where FreeBSD 11.4's source reads q as ll. A q directive now ends the scan there, and the count of conversions before it is returned. The test adds the console's rows for wrapping narrow conversions, saturating 64-bit ones with ERANGE, and %qd.
2026-10-23 19:26:15 -07:00
Dean 43d6937041 Merge pull request #10246 from orezraey/fix/libkernel-pthread-create-detach-measured-ps5
fix(libkernel): refuse long thread names and answer a detach after a join as measured on a PS5
2026-10-24 15:26:04 +13:00
Dean 6fc058f5cf Merge pull request #10302 from orezraey/fix/libkernel-socket-buffers-measured-ps5
fix(libkernel): keep socket buffer sizes and SO_NBIO as measured on a PS5
2026-10-24 15:25:05 +13:00
billybobpicklioandClaude Opus 5.5 1f11b8ab9b fix(agc): bound the sampled depth-plane copies
A depth plane copy (a depth surface sampled as several slices, an integer view or a cube) was
kept until the device went away, with a staging buffer of its own size, and a staging buffer it
outgrew was never freed. Every depth surface a scene ever sampled this way held its copy, so
device memory grew with each new scene (0.4-1.2 GB in RE2 after a level load).

The copies now share their image's ownership with the views they hand out, the recorder keeps
the image and the staging buffer until the recorded copy has run, and past
APS5_DEPTH_PLANE_COPY_MIB (default 256; 0 keeps every copy) the least recently used copies
leave the cache. A copy made again refills from the surface and guest memory as a new one does.
agc_driver_depth_plane_sampling_evicting runs the plane sampling cases with a 1 MiB budget.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 04:24:03 +02:00
Dean da53518e5f Merge pull request #10212 from noamroger/claude/project-thread-a44tqk
feat(libSceJson2): implement sce::Json::String at, find and rfind
2026-10-24 15:23:36 +13:00
Dean d7f0c005a9 Merge pull request #9862 from JJenkx/windows/libc-cbrtf-msun
fix(libc): compute cbrtf with FreeBSD msun's algorithm, as titles' libc.prx does
2026-10-24 15:23:06 +13:00
Dean 5669dff560 Merge pull request #9596 from JJenkx/windows/fgetws-console-contract
fix(libc): follow the console fgetws for short buffers and read errors
2026-10-24 15:22:31 +13:00
Adrià FranchandClaude Opus 5.5 7b4b9d9814 fix(shader): zero the resinfo layer count for DIMs without layers
image_get_resinfo returns 0 in its third component when the instruction's
DIM has no layers (1D, 2D, 2D MSAA) and the T# is not 3D, as measured on
RDNA 2 in #7550. Keep 1D-array T#s on their first layer and MSAA T#s
refused, and record the unmeasured forms in the shader debt file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 04:21:06 +02:00
Yunus Shaikh fca8266468 Merge main into fix/libscenet-inet-text-rules 2026-10-23 19:15:30 -07:00
Felipebmaitan a1086ce5c5 fix(job-manager): merge main into Linux reference changes 2026-10-23 23:01:11 -03:00
Felipebmaitan 2211c438b8 fix(job-manager): merge main into compute shutdown changes 2026-10-23 22:59:46 -03:00
hypermistandClaude Opus 5.5 1159e12357 Merge remote-tracking branch 'upstream/main' into fix/agc-semaphore-memory-firmware
Keep this PR's semaphore entry and main's workload entry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 14:58:12 +13:00
Felipebmaitan a83522e25f fix(job-manager): merge main into profiler changes 2026-10-23 22:57:42 -03:00
Felipebmaitan 9a7b9cc95b fix(job-manager): merge main into caller-owned state changes 2026-10-23 22:56:30 -03:00
Felipebmaitan 2758578c20 fix(job-manager): merge main into registration changes 2026-10-23 22:54:47 -03:00
Felipebmaitan 260c7816c0 fix(job-manager): merge main into lifecycle changes 2026-10-23 22:53:34 -03:00
Felipebmaitan b7640ae5a3 fix(job-manager): merge main and reconcile scheduler debt 2026-10-23 22:48:31 -03:00
Himansh Raj a0a0960a7b Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-24 07:10:36 +05:30
Dean 5ac955b1ac Merge pull request #9166 from orezraey/fix/agcdriver-workload-registration-measured-ps5
fix(libSceAgcDriver): return the console's workload stream registration errors
2026-10-24 14:35:51 +13:00
Dean d1d67190a8 Merge pull request #8720 from orezraey/fix/libc-heap-measured-ps5
fix(libc): follow the default heap's alignment, errno and realloc to zero as measured on a PS5
2026-10-24 14:34:38 +13:00
Adrià FranchandClaude Sonnet 5.5 b443b9f9f0 fix(libc): compare only with std::thread::hardware_concurrency, record host count in debt
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-24 03:31:05 +02:00
Himansh Raj 08ef933d8f Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-24 07:00:23 +05:30
thuanquangandClaude 71f70d803f docs(shader): count bits 16-28 among the ancillary word bits that have a source
Co-Authored-By: Claude <[email protected]>
2026-10-24 08:27:20 +07:00
milescovielloandClaude Opus 5.5 371652fd0e fix(agc): draw a PS_ITER_SAMPLE program once per pixel into a one-sample color target
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 01:26:53 +00:00
Dean 9232ee9c98 Merge pull request #9854 from sivasdeadknight/fix/np-async-request-lifecycle
fix(libSceNpManager): validate request ids for abort, delete and poll
2026-10-24 14:26:15 +13:00
orezraeyandClaude Opus 5.5 81d0a5dc15 Merge main into fix/libc-strftime-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 22:26:02 -03:00
Dean b6198d2fd7 Merge pull request #9721 from frankea/fix/one-sample-depth-comp-z
fix(agc): accept DB_EQAA INTERPOLATE_COMP_Z for a one-sample depth target without MSAA_ENABLE
2026-10-24 14:25:46 +13:00
Dean 31516f7021 Merge pull request #9894 from MarrasFederico/feat/np-score-ranking-offline
feat(libSceNpScoreRanking): model the score requests offline
2026-10-24 14:22:50 +13:00
Dean b5fd705743 Merge pull request #9990 from xdCloudy/feat/libSceAgcVsh-150-pending-exports
feat(libSceAgcVsh): declare 150 PS5 pending exports
2026-10-24 14:21:58 +13:00
Dean 842d625686 Merge pull request #9812 from Pacuka/fix/agc-mem-semaphore-address
fix(libSceAgc): take the semaphore address second in Acb/Dcb MemSemaphore
2026-10-24 14:20:36 +13:00
Himansh Raj 2562590ab0 Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-24 06:50:19 +05:30
Dean f45a8d2bdc Merge pull request #9274 from zmeizy/claude/f32-hardware-flush-float-mode
fix(shader): take the hardware f32 flush only in shaders that flush f32 denormals
2026-10-24 14:20:09 +13:00
Dean 72641c92f6 Merge pull request #9841 from JJenkx/windows/libc-logf-msun
fix(libc): compute logf with FreeBSD msun's algorithm, as titles' libc.prx does
2026-10-24 14:19:40 +13:00
thuanquangandClaude c687e7e353 docs(agc): limit the host placement exception to device buffers and images
Co-Authored-By: Claude <[email protected]>
2026-10-24 08:01:24 +07:00
thuanquangandClaude 8472a51793 docs(agc): say that a refused device allocation falls back to host memory before throwing
Co-Authored-By: Claude <[email protected]>
2026-10-24 07:59:55 +07:00
thuanquangandClaude 17c723d8fa docs(libc): correct stale rmdir, nanf and bad_optional_access debt statements
Co-Authored-By: Claude <[email protected]>
2026-10-24 07:59:41 +07:00
Himansh Raj e836e519a8 Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-24 06:20:19 +05:30
Adrià 11d6efa06c Merge pull request #9305 from tibzejoker/fix/bit-exact-reciprocal
feat(shader): bit-exact RDNA v_rcp_f32 behind APS5_EXACT_RCP
2026-10-24 02:47:43 +02:00
Ethan Barr ce6865fc0d perf(agc): pipeline queue-0 DMA_DATA by default
Queue-0 DMA_DATA packets drained the draw pipeline unless APS5_PIPELINE_DMA was set, so the packet worker waited on the committer at every small immediate store. Kena PPSA01746 issues 17-23k DMA_DATA packets per 10 s and 11329 of its 20134 pipeline drains per 10 s are opcode 0x50. enqueueDmaPacket now queues DMA_DATA stores and fills unconditionally, and keepsDrawPipeline keeps the pipeline for a copy or fill whose source and destination miss every queued write. The APS5_PIPELINE_DMA switch and its documentation are removed and the tests run the default path.
2026-10-24 02:35:37 +02:00
Dom3005andClaude Opus 5.5 dd6220698a fix(libkernel): change O_APPEND on a Windows file through fcntl
fcntl(F_SETFL) threw when it changed O_APPEND on a Windows file. The
guest flag already chooses WriteAtEnd, but a descriptor opened with
O_APPEND also carries the CRT's append flag, so _write kept appending
after the guest cleared it. F_SETFL now replaces the CRT descriptor of
every descriptor sharing the open file's status with a duplicate handle
opened with or without _O_APPEND, as libc fdopen does for append mode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:28:14 +02:00
JJenkxandClaude Opus 5.5 8b83c68aad fix(libc): compute exp2f with FreeBSD msun's algorithm, as titles' libc.prx does
exp2f returned the host exp2, so its last bit and errno depended on the
host: on Windows the bits differ from the libc.prx that titles ship on
213,306,266 of the 2^32 floats. That libc.prx is msun's s_exp2f.c, setting
ERANGE only in its overflow and underflow branches. The port gives the same
bits and errno as PPSA07923's, PPSA05916's and PPSA13934's copies for every
argument.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 20:16:32 -04:00
dantdmdarealguy 80bcb4bd24 docs(environment): correct the crash indirect memory, log timestamp, language and label flush rows 2026-10-23 19:14:56 -05:00
dantdmdarealguy 0c5e45e9f3 docs: describe the converted module output the relinker prints
The relinker stopped printing a 'Guest module:' line for each converted
module in 56c2a5318; it reports 'Converted modules: N' and lists the
.guest.prx files under app0/ in its runtime layout tree. GAME_TESTING.md
and USAGE.md still told readers to use the files printed as 'Guest module:'.
2026-10-23 19:14:55 -05:00
SuarezPM 9c3ffcf5b0 feat(shader): support 64-bit image atomics through keyed image tables
Table T#s keyed at runtime feeding image_atomic64_* now lower to
OpAtomic* on the table Atomic64View instead of faulting, mirroring
the 32-bit path: gate, dedup identity, binding flags and view
selection. Packed formats and BY element counts still fault; hosts
need VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT for the view format.
2026-10-23 21:14:39 -03:00
SamandClaude Opus 5.5 a70e108a03 fix(agc): capture memory committed during the frames and count flips per thread
The recorder took its ranges once, at the snapshot, so a title that
committed memory during the captured frames replayed submissions from
memory the capture never had. Each memory delta now adds the allocations
the registry gained since the last one as new ranges with their nonzero
64 KiB blocks, and the header counts them as late_ranges.

A submission ended a captured frame when the driver's flip count changed
while it was being submitted, and the count was global, so a submission
that overlapped another thread's flipping one ended the frame as well.
The count is now kept per thread.

agc_driver_frame_replay copies its second frame from a block committed
during the capture, and agc_driver_frame_capture_eop checks that a flip
submitted on another thread leaves this thread's count unchanged; both
fail without the fix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
SamandClaude Opus 5.5 268525d612 fix(agc): keep replayed memory, tokens and outputs faithful to the capture
- Order memory deltas and video output registration before the next
  recorded call, and serialize the deadlock breaker with delta application
- Capture the blocks holding shader code with each shader delta
- Reserve explicit and automatic EOP flip tokens under one lock
- Record video output unregistration so replay can close and reopen a handle
- Clear already mapped ranges before restoring the snapshot so elided zero
  blocks replay as zero

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
SamandClaude Opus 5.5 dbe034fdf8 fix(agc): end a captured frame once per EOP flip
An EOP flip reservation also ended a frame, and so did the submission
whose EOP release carries the reserved token, so a title flipping with
EOP releases counted each displayed frame twice: a capture of N frames
stopped after about N/2 and could start between the reservation and
the submission that flips. The reservation is now only recorded; a
frame ends at a CPU flip or at a submission that flips.

agc_driver_frame_capture_eop reserves and submits six EOP flips with
APS5_FRAME_CAPTURE_FRAMES=3 and checks that the capture starts after
the first flipping submission and holds three frames of one reservation
and one submission each.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
SamandClaude Opus 5.5 95d2a76583 feat(agc): capture frames at the driver boundary and replay them offline
APS5_FRAME_CAPTURE=<dir> makes the AGC driver record a few frames of a
title: the shader registrations and ABI resolutions, video output and
EOP flip reservations it made since it started, a snapshot of every
readable guest allocation (the title image included) taken at a frame
boundary once the driver is idle, and for the next frames each
submission, flip and suspend point with the thread that made it, its
serial progress and the guest pages the write tracker saw the CPU write
before it. At the end it stores the presented display buffers as
reference images. APS5_FRAME_CAPTURE_AT_FLIP, _TRIGGER and _FRAMES pick
the frames.

agc_frame_replay maps the captured memory at its addresses and replays
the calls of each captured thread on a thread of its own, in captured
order, through the current build of the driver with no title running.
It paces GPU work to the in-flight depth the title had, releases GPU
waits that the title's CPU threads released without calling the driver
(AgcDriverAwaitedWaits), and reports frame times, released waits and
how closely the replayed display buffers match the references.

Tests: agc_frame_capture (file format) and agc_driver_frame_replay
(two captured frames of CPU writes and DMA copies replayed and
compared). Docs: BUILD.md, ENVIRONMENT.md and the libSceAgcDriver debt
file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
JAB-devandClaude Sonnet 5.5 db06672a36 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/ngs2-pan-ps5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-24 02:08:01 +02:00