Commit Graph
17691 Commits
Author SHA1 Message Date
Dean 7d1ed9bb1e Merge pull request #8879 from MarcZX10/codex/masked-select-single-pass
perf(shader): stop masked-select elimination after one analysis pass
2026-10-27 14:26:37 +13:00
al3w0f205 260454d8b9 test(libkernel): cover invalid usec and bad descriptor validation in futimes 2026-10-26 20:11:55 -05:00
al3w0f205 de459c7ed8 test(libSceNet): cover bad file descriptor rejection in socket close 2026-10-26 20:09:44 -05:00
Dean 38cda53b52 Merge pull request #11160 from p3n1cillin/claude/audioout-padspk-volume
fix(libSceAudioOut): declare sceAudioOutSetPadSpkVolume as PSBox calls it
2026-10-27 14:05:56 +13:00
MarcZX10 da573bb3a3 fix(libSceNpTus): give sceNpTusCreateNpTitleCtx its signature in the public header
main declares it with an empty parameter list in Api.hpp, which conflicts with the definition.
2026-10-27 01:05:54 +00:00
MarcZX10 5e1fc33a26 feat(libSceNpTus): declare a stub with its shadPS4 signature
They still throw through NotImplemented_nid_no_patch; only the parameter
lists change. The only source is shadPS4's PS4 prototypes; nothing is measured on a PS5.
2026-10-27 01:05:41 +00:00
Danigamer05 762556eb2d feat(libc): implement signed 32-bit minimum value helper 2026-10-27 01:58:48 +01:00
Danigamer05 5f08cbf1b3 feat(libc): implement unsigned 32-bit maximum 2026-10-27 01:58:47 +01:00
Danigamer05 4b911d7bae feat(libc): implement signed 64-bit maximum 2026-10-27 01:58:46 +01:00
Danigamer05 80bc31bb6c feat(libc): implement signed 64-bit minimum 2026-10-27 01:58:45 +01:00
Danigamer05 be750a1f38 feat(libc): implement unsigned 32-bit minimum 2026-10-27 01:58:44 +01:00
Danigamer05 7792cff8ef feat(libc): implement unsigned 64-bit maximum 2026-10-27 01:58:43 +01:00
al3w0f205 3a701b0350 test(libkernel): cover null pointer and invalid type validation in mutex attributes 2026-10-26 19:58:31 -05:00
al3w0f205 c3267a8b1b test(libSceAudio3d): cover terminate when uninitialized and positive reserved parameter 2026-10-26 19:57:37 -05:00
al3w0f205 e66943d28a test(libSceFont): cover invalid font handle in font scale slant and dpi getters 2026-10-26 19:56:47 -05:00
al3w0f205 0bbbb0bc8d test(libSceFont): cover parameter validation in sceFontDestroyLibrary and sceFontMemoryTerm 2026-10-26 19:55:55 -05:00
al3w0f205 cf2bfcb8e5 test(libSceFont): cover invalid font handle in effect weight and scale setters 2026-10-26 19:55:02 -05:00
al3w0f205 d1e47bdbde test(libSceCesCs): cover null source buffer rejection in mbc conversions 2026-10-26 19:53:59 -05:00
al3w0f205 2f67ef6d06 test(libSceCesCs): cover null source and destination checks in Japanese conversions 2026-10-26 19:53:17 -05:00
al3w0f205 2eda942a42 test(libSceCesCs): cover null source and profile checks in utf16 and utf32 sbc conversions 2026-10-26 19:52:18 -05:00
al3w0f205 d18c3ba169 test(libSceCesCs): cover null source buffer in utf16 and utf32le conversions 2026-10-26 19:51:19 -05:00
al3w0f205 2de6a9f947 test(libSceCamera): cover out-of-range channel rejection in settings getters and setters 2026-10-26 19:50:03 -05:00
al3w0f205 7f3c05b5b8 test(libSceCdlgG2P): cover reopen and null parameter behavior in finished dialog state 2026-10-26 19:48:57 -05:00
p3nicillinandClaude Opus 5.5 563844efe0 feat(libkernel_sys): implement sceKernelGetCpumodeGame and sceKernelSetCpumodeGame
ProsperoEden declares the setter with the mode as its argument and the
getter with an int output, and measured on a PS5 that modes 0 and 1 are
accepted, 2 to 7 return 0x80020016 and 1 is the default. Both threw as
discovered stubs. Other modes and a null output throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 00:44:24 +00:00
JJenkxandClaude Opus 5.5 1add0a5859 fix(libc): follow the console's rand, srand and rand_r
rand and rand_r both used FreeBSD's do_rand (Park and Miller on
state % 0x7ffffffe + 1, minus one), so rand returned values up to
0x7ffffffd and rand(), rand_r() and every seeded sequence differed
from the console. The libc.prx that titles ship (the same code in the
copies of PPSA13934, PPSA07923 and PPSA05916, read from disassembly)
uses two different generators:

- rand steps a 64-bit state, initially 1, as
  state * 0x5851F42D4C957F2D + 1 and returns (state >> 32) & 0x3FFFFFFF,
  so its results stay at or below 0x3FFFFFFF. srand stores the seed
  zero-extended as that state.
- rand_r is the minimal standard generator, state * 16807 modulo
  2^31 - 1 on the signed 32-bit state (1 gives 16807, 282475249,
  1622650073), and a zero state becomes 0x2AE1B767.

guest_math now expects those results: the rand_r chain from 1, the
zero and 0x7FFFFFFF states, rand after srand(1), srand(0) and
srand(0xFFFFFFFF), and rand's range over 1000 calls. Its previous
checks expected FreeBSD's values and rand matching rand_r.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 20:22:30 -04:00
B-HowellandClaude Opus 4.7 a2b59db71a feat(libc): implement strtoq
Add the BSD "quad" `strtoq` export for the libc PRX as a thin wrapper
around `strtoll`, as FreeBSD 11.4 lib/libc/stdlib/strtoq.c does.  The
unsigned sibling `strtouq` is already here as the same alias of
`strtoull`.  Extend the guest wide strings test to probe the signed
path on an under/overflow run and a short positive run with a trailing
non-digit.  Document the export in docs/dev/debt/libc.md with the
registry NID `yUUOxgk8Dmc`; console behavior is unverified beyond the
existing `strtoll` contract.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-10-26 20:19:37 -04:00
Henryisdjfunkyho 42bbc98235 chore: merge main into cancellable timed sleeps 2026-10-26 17:13:30 -07:00
Adrià FranchandClaude Sonnet 5.5 7466744f1d fix(main): windows_crash_stack_words regex crossed by '~' in register dump
Failing run 40410094391 (after #11365, unrelated). The crash report prints [r8] as a string of stack bytes; when it contains '~' (ASLR-dependent) the [^~]* gaps of the PASS regex stop matching. Use .* (matches newlines in CMake regex).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-27 01:12:24 +01:00
MarcZX10 4a25a6560c fix(agc): bind UINT views for multisample float stores 2026-10-26 23:52:45 +00:00
MarcZX10 1ff3696ef0 test(agc): expect zero for masked float image components 2026-10-26 23:52:24 +00:00
MarcZX10 027c6f06a8 fix(agc): bind UINT views for float16 image stores 2026-10-26 23:52:24 +00:00
MarcZX10 9d6b917388 fix(agc): round 16-bit float image stores toward zero 2026-10-26 23:51:54 +00:00
MarcZX100andblawesom f9123c760b test(agc): register full recorder suite with CTest
Register the no-argument recorder executable path so CTest covers the main recorder regression flow in addition to the focused subsets. Preserve the Vulkan-unavailable skip code, cap the test at 30 seconds, and add the Windows libc DLL path used by sibling recorder tests.

This carries forward the test registration proposed in #3354, which was closed by the intake pause. Its author left a handoff, and the current main branch has since incorporated the fixes that made the full recorder run pass.

Co-authored-by: blawesom <[email protected]>
2026-10-26 23:40:59 +00:00
Alexandre Figueiredo 08fa661766 fix(libSceNpCppWebApi): answer finish, abort and getId for never-started transactions as the module does 2026-10-26 23:22:56 +00:00
MaxandClaude Opus 5.5 ff5e67de15 fix(libSceNet): keep the iovec copy empty for a receive without iovecs
Copy the iovec table only when there is one, and receive a datagram
with no iovecs in guest_sce_net: it returns 0 with MSG_TRUNC and the
sender's address.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 00:21:05 +01:00
MarcZX10 76859ffeac feat(libSceNpUtility): declare 2 stubs with shadPS4 signatures
They still throw through NotImplemented_nid_no_patch; only the parameter
lists change. The only source is shadPS4's PS4 prototypes; nothing is measured on a PS5.
2026-10-26 23:20:08 +00:00
Leonardo 82fa4474c1 feat(libSceNetCtl): bound sceNetCtlGetNatInfo probe time and cache only on success 2026-10-27 00:18:19 +01:00
MarcZX10 5377922c50 feat(libSceNpWebApi): declare 2 stubs with shadPS4's signatures
They still throw through NotImplemented_nid_no_patch; only the parameter
lists change. The only source is shadPS4's PS4 prototypes; nothing is measured on a PS5.
2026-10-26 23:17:33 +00:00
harisibrar1 4fe05b3bea Merge remote-tracking branch 'origin/main' into feat/rudp-poll-cancel
# Conflicts:
#	docs/dev/debt/libSceRudp.md
2026-10-26 19:15:46 -04:00
harisibrar1 63ef393ee9 Merge remote-tracking branch 'origin/main' into feat/libressl-ex-data-indices
# Conflicts:
#	core/libs/prx/libSceLibreSsl/include/Api.hpp
2026-10-26 19:14:39 -04:00
Emanuele 5556444f2b test(libc): run the feupdateenv checks on macOS and under Rosetta 2
Two host differences failed all 19 feupdateenv tests on macOS:

- Apple's libc++ looks up /usr/lib/libstdc++.6.dylib with a no-load
  dlopen the first time a process builds a std::logic_error, and that
  failed lookup leaves errno at ENOENT. The null check builds the first
  one, so it saw errno change although feupdateenv never touched it. The
  test now builds one std::invalid_argument on macOS before the checks.
- Rosetta 2 keeps the six MXCSR exception masks set and raises no
  floating-point trap, x87 included. The mask check now expects the SSE
  masks the host keeps, and the pending-trap tests are skipped (exit 77)
  on a host that does not keep an unmasked MXCSR exception. A libc debt
  entry for feupdateenv records it.
2026-10-27 00:08:54 +01:00
simnJS 6988438d77 feat(libSceUsbStorage): pass host volumes through only with APS5_USB_STORAGE_PASSTHROUGH
Unset, ScanHostVolumes returns no volume, so nothing is scanned or
exposed and the guest sees no USB storage, as on main. The test checks
that injected volumes are neither listed nor raised by a rescan with the
switch off, and turns it on for the device cases.
2026-10-27 00:01:56 +01:00
WhiteAssassins 5c9af08324 feat(tools): add optional patch catalog metadata 2026-10-26 19:01:46 -04:00
milescovielloandClaude Opus 5.5 106048ef94 test(libSceFont): cover the render effect slant and weight setters against their getters
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 22:59:16 +00:00
Dean Galvin f733f7dc43 Merge branch 'main' into feat/lchflags 2026-10-27 11:58:22 +13:00
MaxandClaude Opus 5.5 3d2b723f71 fix(libSceNet): receive sceNetRecvmsg through the iovecs it had at entry
sceNetRecvmsg guarded the destinations of the iovec table it saw at
entry, then read the live table again to scatter the received bytes.
When an earlier destination overlapped a later iovec, the received
bytes replaced that iovec and the rest of the data went to an address
that was never guarded, which crashed the host when that address was
not writable. Copy the header and the iovec table once, as FreeBSD
11.4's sys_recvmsg does with copyin and copyiniov, use that copy for
the guards, the scatter and the address, and write the header back
from it as sys_recvmsg's copyout does.

Fixes #11610

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 23:53:11 +01:00
mrfelek 60cf9c3bd3 test(shader): drop the unscaled first-lane refusal check
AI-assisted. Tested by me on my own machine.
2026-10-26 22:53:02 +00:00
milescovielloandClaude Opus 5.5 04db088075 fix(libSceHttp2): report a live context's pool size from sceHttp2GetMemoryPoolStats
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 22:43:01 +00:00
hamb3r f320e359f9 test(agc): add torn descriptor, multi-run rebuild, and unstable epoch tests
Symptom / Log:
- Missing regression coverage in tests/ShaderMemory.cpp for 32-byte T# pendingWrite span unification, full wordwise page reads via readWords(), multi-run and indirect table rebuilds on late GPU wait, second-retry epoch stabilization, and refusal on persistent invalidations.

Root Cause:
- core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp did not cover mid-descriptor or multi-run GPU wait invalidations.

Change:
- Add unit tests in tests/ShaderMemory.cpp covering torn 32-byte T# prevention, full 4096-byte wordwise page readWords(), multi-run ReadRuns and indirect ReadColumn rebuilds on late wait, second-retry stabilization, and std::runtime_error refusal after 3 unstable attempts.

Metric / Verification:
- ctest -R agc_shader_type_zero_image_materialization|agc_shader_memory|agc_shader_table_snapshot_reuse passes with VK_LAYER_KHRONOS_validation and 0 VUID errors.
2026-10-27 01:37:43 +03:00
hamb3r 6a3542dd9f fix(shader): rebuild materialized resource tables on descriptor invalidation
Symptom / Log:
- 26102026_05_33_48.log:L3022-L3034: [gpu] driver failure: compute shader 0x248a05b00: runtime image descriptor is invalid

Root Cause:
- core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp:ReadRuns/ReadColumn/Select/TableSnapshotter::Run/Materialize:L882-L1220 — table materialization did not propagate descriptorScope across table entries and did not rebuild earlier runs or records when a later run or indirect record waited on the GPU and invalidated cached Raw words.

Change:
- Set descriptorScope to the record/descriptor size during ReadRuns, ReadColumn, Select, and TableSnapshotter::Run, rebuild the full table or snapshot across up to 3 attempts when rawInvalidations changes mid-pass, force PendingWrite::Sync on the final attempt via SrtDescriptorForceSync, and refuse if the epoch still fails to stabilize.

Metric / Verification:
- Materialize and SnapshotResourceTables rebuild earlier runs/records when a late wait invalidates Raw words and refuse unstable snapshots.
2026-10-27 01:37:42 +03:00