Commit Graph
14017 Commits
Author SHA1 Message Date
Adrià 2b6c1112b8 Merge pull request #6763 from SP4C3B4R-8/perf/windows-draw-input-copies
perf(agc): copy draw inputs on NVIDIA's Windows driver instead of binding host imports in place
2026-10-19 13:45:06 +02:00
Adrià db73af3506 Merge pull request #6831 from ErenYeager1836/fix/savedata-sync-memory-init-check
fix(libSceSaveData.native): return error for uninitialized sceSaveDataSyncSaveDataMemory
2026-10-19 13:43:56 +02:00
Adrià 77b3edf32a Merge pull request #6841 from Sevthered/feat/ajm-pcm-resample
feat(ajm): resample interleaved s16 PCM through codec 23
2026-10-19 13:38:50 +02:00
milescovielloandClaude Opus 5.5 1427802578 fix(agc): map the AGC driver memory past ASan's shadow in an ASan build
An ANYPS5_ENABLE_ASAN build moves the guest arena up by 0x100000000000,
past AddressSanitizer's shadow gap, but the AGC driver memory that holds
the FS table (#6160) is still mapped at the fixed 0xfe0000000. That
address is in the shadow gap, so the mapping fails with EEXIST and no
test that initializes the driver runs under ASan.

The offset is now GuestArena::GuestAddressOffset in GuestArena.hpp, and
the driver memory and the FS table move by it like the arena. Builds
without ASan keep 0xfe0000000. agc_driver_compute_fs_table_calls skips
in an ASan build: its shader builds the PS5's fixed table address from
literals, as titles' shaders do, and that address can't be mapped there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 11:38:29 +00:00
Adrià 62e946f114 Merge pull request #6833 from ErenYeager1836/feat/libkernel-sysconf-limits
feat(libkernel): support _SC_ARG_MAX, _SC_OPEN_MAX and _SC_IOV_MAX in sysconf
2026-10-19 13:37:44 +02:00
MarcZX10 7fdfe4493a fix(libScePngDec): reject misaligned output buffers 2026-10-19 11:35:17 +00:00
David f673abe047 docs(debt): record the macOS RLIMIT_NOFILE at load in libkernel.md 2026-10-19 13:35:03 +02:00
David 6eb29b8fe7 test(libkernel): check the macOS open file limit against EMFILE
guest_getrlimit failed on macOS because the host's soft and hard
RLIMIT_NOFILE differed. On macOS it now also checks that the limit does
not exceed kern.maxfilesperproc, and, as on Windows, that guest pipes
fail with EMFILE within 64 descriptors of the reported limit. The pipe
loop moves into a helper that both use.
2026-10-19 13:34:50 +02:00
David 0cb9d92b56 fix(libkernel): set the open file limit at load on macOS
getrlimit(RLIMIT_NOFILE) reports the host's limits, and libkernel
raised the soft limit to the hard one at load only on Linux. On macOS
the soft limit stayed below an unlimited hard limit (1048576 and
infinity in a shell here, 256 and infinity by default), so the two
differed. XPSemu (PPSA97358) then raises the soft limit to the hard one
in QEMU's os_setup_limits, and setrlimit refuses the change.

macOS fails with EMFILE at kern.maxfilesperproc (10240 here) whatever
the soft limit, even an unlimited one. At load, libkernel now sets both
limits to the smaller of the hard limit and kern.maxfilesperproc, so
getrlimit reports the descriptor count after which opening fails. The
Linux path still raises the soft limit to the hard one.
2026-10-19 13:34:29 +02:00
thuanquangandClaude Opus 5.5 5b6101e1ae test(agc): skip kept-denormal f64 rounding rows a device cannot preserve
Lavapipe reports no f64 DenormPreserve, so the shaders get no
DenormPreserve 64 and it may flush f64 denormals; the rows of modes that
keep them then fail with or without the recompiler change (frexp, floor,
ceil and fract of 2^-1074 on Mesa 25 and 26). As in F64FmaSubnormals,
a mismatch in those modes is reported as skipped on such a device. The
modes that flush f64 denormals are still checked on every device.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 18:34:17 +07:00
thuanquangandClaude Opus 5.5 abea1bc710 fix(shader): flush f64 floor, ceil, fract and frexp denormal inputs
v_floor_f64, v_ceil_f64, v_fract_f64, v_frexp_mant_f64 and
v_frexp_exp_i32_f64 ignored the FLOAT_MODE f16/f64 denormal field. On
RDNA2 (gfx1031) bit 6 clear flushes a denormal input to a zero of its
sign, so v_ceil_f64 of 2^-1074 is 0 instead of 1, and bit 7 clear
flushes the denormal result v_fract_f64 gives for a positive denormal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 18:34:17 +07:00
MarcZX10 73e472b3c2 fix(libScePngDec): reject oversized alpha values 2026-10-19 11:33:45 +00:00
xXPBSXxandClaude Sonnet 5.5 0b8c849f55 docs(agc): record the queue 0x20 label wait that holds another slot's address
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 13:32:36 +02:00
xXPBSXxandClaude Sonnet 5.5 7d5089a7fb docs(debt): record the CMASK clear pass fault on AMD without pipeline libraries
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 13:31:58 +02:00
MarcZX10 d0119e5686 fix(libScePngDec): validate custom decode pitch 2026-10-19 11:30:20 +00:00
Ondra97 59dbdd615a Merge remote-tracking branch 'origin/main' into codex/pr6593-review-fix-20261019 2026-10-19 13:29:42 +02:00
milescovielloandClaude Opus 5.5 1f63ba35af docs(agc): say where PS_ITER_SAMPLE alone still throws and which memory accesses can differ
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 11:28:30 +00:00
Ondra97 921b8408d4 perf(shader): keep redundant expression operand keys inline 2026-10-19 13:24:47 +02:00
MarcZX10 0a6c3880f3 fix(libScePngDec): enforce decode width limit 2026-10-19 11:24:42 +00:00
Ondra97 9ee4af350e test(json2): isolate Linux allocation failures from guest unwinding 2026-10-19 13:24:36 +02:00
Adrià 7a36de66b9 Merge pull request #6823 from ErenYeager1836/feat/libSceSysmodule-is-loaded-internal
feat(libSceSysmodule): implement sceSysmoduleIsLoadedInternal
2026-10-19 13:24:27 +02:00
Adrià 3691f6ffc2 Merge pull request #6826 from hugodearaujo/fix/page-table-stats-console
fix(libkernel): count page-table entries the way the console does
2026-10-19 13:24:22 +02:00
WernerandClaude Opus 5.5 2ac433e3cb feat(libc): list stack return address candidates in the hang dump
The Windows crash report walks every other thread's rbp chain only, so
a thread waiting inside ntdll or in code built without frame pointers
showed no frames at all. For a thread whose chain yields fewer than two
frames, scan the 32 KiB above its rsp while it is suspended and print
up to 24 words that point at executable memory.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01T86KdkUbEv7m5hrCbPbkAp
2026-10-19 13:24:02 +02:00
RengundomandClaude Opus 5.5 88f8184102 fix(trace): write the benchmark file safely and off the presenter
Review of the benchmark report:

- The file is written to `<name>.tmp` and moved over the previous one, so a
  crash or kill during a rewrite keeps the last complete report.
- A dedicated writer keeps only the newest pending snapshot, so two reports
  can no longer be joined into one file when the writer falls behind.
- The report is formatted on the writer thread. The presenter hands over the
  kept intervals, which are shared and never copied, so the interval that
  closes no longer pays for formatting every earlier one.
- Hosts that are not x86 or report no CPU brand string leave the host fields
  out instead of failing every summary line.
- A `contentVersion` that is not a string, or does not fit, is left empty
  instead of failing the title's metadata.
- Tests cover the 240-interval rotation and `intervals_dropped`, the
  newest-only writer, the pending write on stop and the atomic replace.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 06:21:04 -05:00
Adrià f6eeca4f5f Merge pull request #6786 from fdfawef324/claude/agc-indirect-args-stale
fix(agc): wait for address-based writers before reading indirect dispatch arguments
2026-10-19 13:16:24 +02:00
akkadbakkad89 8f3849e791 fix(prx): correct the offline NP WebAPI error code and list silent stubs 2026-10-19 11:16:04 +00:00
Adrià 12e42b2730 Merge pull request #6660 from al3w0f205/fix/agcdriver-wait-reg-mem-masking-and-pipeline-drain
fix(libSceAgcDriver): mask WAIT_REG_MEM addresses and elide non-overlapping pipeline drains
2026-10-19 13:15:39 +02:00
Ondra97 7f14bc7afb Merge remote-tracking branch 'origin/main' into codex/pr6593-review-fix-20261019 2026-10-19 13:08:04 +02:00
Lindamea1andClaude Opus 5.5 d8baccc195 feat(libSceNetCtl): declare sceNetCtlGetInfoV6
libSceNetCtl exports sceNetCtlGetStateV6, sceNetCtlRegisterCallbackV6
and sceNetCtlUnregisterCallbackV6 but not sceNetCtlGetInfoV6 (NID
Jy1EO5GdlcM). Dragon Ball Xenoverse 2 (PPSA08587) imports it, and an
import that no system library exports stops a title before its entry
point: on Linux ld.so refuses the relinked executable with "undefined
symbol: Jy1EO5GdlcM", and on Windows the entry stub prints "FAIL:
unresolved ELF import Jy1EO5GdlcM from libSceNetCtl.prx" and raises
0xC0000139. The title's tester reports that it does not call the
function before its loading screen.

It is a Sony network-control call with no FreeBSD counterpart, and
neither its parameters nor the IPv6 info layout are known, so it is
declared without parameters and throws through
NotImplemented_nid_no_patch, as CONTRIBUTING.md asks of exports that
cannot be implemented. The gap is recorded in
docs/dev/debt/libSceNetCtl.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:07:45 +01:00
Adrià 97d5d7a52a Merge pull request #6737 from fogydes/fix/libkernel-eventflag-deletion-and-multiwaiter-race
fix(libkernel): prevent use-after-free on event flag deletion and multi-waiter race
2026-10-19 13:05:18 +02:00
Adrià d957f18282 Merge pull request #6793 from al3w0f205/test/game-live-streaming-coverage
test(libSceGameLiveStreaming): add guest game live streaming test coverage
2026-10-19 13:05:12 +02:00
milescovielloandClaude Opus 5.5 c2764f31f2 fix(agc): draw a PS_ITER_SAMPLE program once per pixel into a one-sample depth target
A one-sample depth target under a multisampled rasterizer without
MSAA_ENABLE is drawn as a one-sample draw at the pixel center, but a pixel
program that runs with PS_ITER_SAMPLE threw. Ghost of Tsushima (PPSA02225)
draws its depth-only pass this way (2x PA_SC_AA_CONFIG, PA_SC_MODE_CNTL_1
0x06030000, KILL_ENABLE, no sample index or coverage input) and stops on it.

Every sample is taken to be at the pixel center on this path, so
invocations per sample would get the same inputs and give the same depth,
kill and color results, and the target keeps sample 0's. Such a program is
now drawn once per pixel, without sample shading. ANCILLARY and
SAMPLE_COVERAGE inputs still throw. The debt entry notes that only the
memory writes of such a program can differ.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 11:05:02 +00:00
milescovielloandClaude Opus 5.5 e8d68f482c docs(libScePlayGo): describe the scenario-only chunk list without naming a title
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 11:04:22 +00:00
Adrià Franch bd7453d97a test(libc): set the zone through the guest environment in tzname and region-zone checks 2026-10-19 13:04:13 +02:00
MarcZX100 94f035da1f docs(libc): correct timezone interaction note 2026-10-19 13:03:54 +02:00
MarcZX100 89fb0ddb7a docs(libc): note host timezone interaction 2026-10-19 13:03:54 +02:00
MarcZX100 03fbf57208 docs(libc): move timezone debt to its component file 2026-10-19 13:03:54 +02:00
MarcZX100 783c70de53 fix(libc): refresh tzname after implicit TZ changes 2026-10-19 13:03:54 +02:00
Hussein Kadhim b49644c83d fix(libc): read the guest TZ once per outermost time conversion
Nested conversions such as the one closing mktime no longer re-read TZ, so
the instant and the normalised fields come from one zone. The race test now
covers mktime and strftime.
2026-10-19 13:03:54 +02:00
Hussein Kadhim 6b03cf445f fix(libc): serialise guest TZ changes with time conversions
Copy the guest TZ under the guest environment lock so a concurrent setenv
cannot free it while it is read, and hold one lock across the zone switch
and the conversion so the fields of two zones are never mixed. Document the
host rejection, Windows zone name and stale tm_zone limits.
2026-10-19 13:03:54 +02:00
Hussein Kadhim 7d1140d962 fix(libc): apply the guest TZ to tzset, localtime, mktime and strftime
Guest setenv, putenv and unsetenv only change the guest environment, while
the time conversions read the host TZ, so a guest that set TZ and called
tzset still got host local time. Copy a changed guest TZ to the host before
each local conversion and call tzset again.
2026-10-19 13:03:54 +02:00
Lindamea1andClaude Opus 5.5 4faf57a986 feat(libs): add the Voice and IME exports PPSA24191 needs to load
Monster Hunter Wilds imports sceVoicePausePort, sceVoiceResumePort and
sceImeSetConsecutiveClauseConversionEnabled, which no library exported,
so the loader stopped at the first of them.

sceVoicePausePort and sceVoiceResumePort check the library and the port
like sceVoiceResetPort. sceImeSetConsecutiveClauseConversionEnabled has
no public reference and throws.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:01:08 +01:00
Adrià Franch 45d012ed3d docs(agc): merge the storage write-back debt lines and state what the hold counters report 2026-10-19 12:57:59 +02:00
umangandClaude Opus 5.5 a56ca27514 docs(agc): list APS5_NO_QUEUED_DRAW_READ_ORDER in the environment reference
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:57:48 +02:00
umangandClaude Opus 5.5 aca898eeea fix(agc): release a queued DMA copy's held source read when it runs
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:57:48 +02:00
umangandClaude Opus 5.5 f1c4a0baee test(agc): keep the gate closed until the queued draw's vertex hold is checked
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:57:48 +02:00
umangandClaude Opus 5.5 aee27c0be7 fix(agc): store held results on demand from memory waits
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:57:48 +02:00
umangandClaude Opus 5.5 00053a3f60 fix(agc): hold queued draws' vertex and DMA source reads and retry the stores they refused
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:57:48 +02:00
umangandClaude Opus 5.5 a9082d366b test(agc): wait for the image write-back before checking the queued index read
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:57:48 +02:00
umangandClaude Opus 5.5 c9af5d9f4b fix: order deferred write-backs after queued draws' index reads
A pipelined draw read its index buffer from guest memory at commit time,
after the packets behind it had run, so a later dispatch's deferred
storage-image write-back could land in the bytes first. Stellar Blade
recycles its full-screen quad's index buffer for a 66x66 image when the
menu loads, and aborted with "vertex fetch exceeds descriptor record count".
Deferred write-backs now wait while a queued draw still holds a read of the
range. APS5_NO_QUEUED_DRAW_READ_ORDER=1 restores the old order; [draw]
reports held read ranges and stores.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:57:48 +02:00