Commit Graph
2496 Commits
Author SHA1 Message Date
fdfawef324andClaude Opus 5.5 9f96444c4a feat(libSceNpManager): register NP state callbacks and report signed-out from sceNpCheckCallback
sceNpRegisterStateCallback and sceNpRegisterStateCallbackA stored nothing,
the unregister calls always succeeded and sceNpCheckCallback did nothing,
so a title that waits for its NP state callback never learned the user's
state. #1277 reports that Minecraft Preview (PPSA19639) needs the callback
(stop 2).

sceNpRegisterStateCallbackA now keeps up to 8 callbacks and returns the
slot plus 1. A null callback returns INVALID_ARGUMENT, a callback that is
already registered CALLBACK_ALREADY_REGISTERED and a ninth one
CALLBACK_MAX (0x8055001D). sceNpUnregisterStateCallbackA returns
INVALID_ARGUMENT for an id outside 1..8 and CALLBACK_NOT_REGISTERED for an
empty slot. The legacy sceNpRegisterStateCallback keeps one callback with
the same errors. The rules follow shadPS4
src/core/libraries/np/np_manager.cpp @15abf68c9b52 (RegisterStateCallbackA
and UnregisterStateCallbackAById L857-L901, the legacy pair L981-L1005,
ORBIS_NP_STATE_CALLBACK_MAX L36) and np_error.h L38.

Each registration is marked pending. sceNpCheckCallback takes the pending
registrations under the lock and calls them after releasing it, on the
calling thread, with SIGNED_OUT for the initial user 0x10000000. For the A
form this follows KytyPS5 src/libs/network.cpp @9e41d8320a27
(NpRegisterStateCallbackA L4021-L4034 marks the registration pending,
NpCheckCallback L3959-L3974 delivers it once). KytyPS5 never calls the
legacy callback (NpRegisterStateCallback and NpUnregisterStateCallback,
L4009-L4019, do nothing). The legacy callback is called as
(user, SIGNED_OUT, nullptr, userdata), as in shadPS4, which passes an NpId
only for SIGNED_IN (L823, L938-L940).

shadPS4 queues SIGNED_OUT from the user service login event instead
(DispatchPendingNpStateCallbacks L903-L962), and the same event calls the
reachability callback once with UNAVAILABLE (L922-L931, L959-L961). The
reachability callback is still not called here. These differences and the
unmeasured console behaviour are recorded in
docs/dev/debt/libSceNpManager.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:12:19 -04:00
Adrià 922abe6a4e Merge pull request #5892 from WallisSkill/fix/cat-quest-3-ppsa15065
perf(agc): compare sampled snapshots outside the write watch only after a write-watch mark
2026-10-15 00:05:10 +02:00
Adrià 596a0d70aa Merge pull request #5472 from eljackjoestar-cmd/codex/rgba8-uint-force-degamma
fix(shader): decode forced degamma on biased RGBA8_UINT samples
2026-10-15 00:01:33 +02:00
Dean 8ae436891a Merge pull request #5181 from ThatsLeo/perf/shader-compact-resource-plans
perf(shader): keep only evaluable branch conditions in resource plans
2026-10-15 10:56:57 +13:00
Adrià 6870cc26ba Merge pull request #5492 from billythemenace2/fix/shader-lds-add-f32-denormals
fix(shader): flush ds_add_f32 denormals and NaNs as the hardware does
2026-10-14 23:53:34 +02:00
Adrià 038c83b9ba Merge pull request #5446 from Nesyth/fix/agc-depth-surface-from-storage-writes
fix(agc): start a new depth surface from the storage writes over its plane
2026-10-14 23:51:42 +02:00
Dean 9bec202332 Merge pull request #5517 from ps54all/feat/libsceajm-opus-family255-multistream
feat(ajm): decode Opus mapping family 255 with several channels
2026-10-15 10:48:06 +13:00
SorabandClaude Opus 5.5 404075b0a6 perf(agc): compare sampled snapshots outside the write watch only after a write-watch mark
On Windows every direct host import leaves the write watch, and a sampled
texture snapshot over it was compared with guest memory at every lookup:
its generation stays 0, so UnchangedSince never holds. ASTRO BOT
(PPSA21564) compared about 31 GB per 10 s at the title.

The lookup now keys such a snapshot by UntrackedHint, NewestStamp,
ForgetSerial and the recorder's newest write note, taken before the
snapshot is read or compared, as StorageTexture::compareUntracked does,
and skips the compare while the key is unchanged and no recorded work
writes the surface. The byte compare still decides after any mark.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 23:30:29 +02:00
eljackjoestar-cmd 76eb60af61 fix(shader): decode forced degamma on biased RGBA8_UINT samples 2026-10-14 23:25:53 +02:00
Adrià 0ae1deb850 Merge pull request #5906 from TheAggie/perf/agc-draw-snapshot-reuse
perf(agc): reuse draw snapshots across draws that nothing wrote between
2026-10-14 23:10:06 +02:00
Adrià f2aa48a8e2 Merge pull request #5402 from codingreapermaps/feat/agc-fractional-even-partitioning
fix(agc): accept fractional-even tessellation partitioning
2026-10-14 22:57:20 +02:00
Adrià ffbc26c7d0 Merge pull request #5264 from hugodearaujo/fix/pad-vibration-mode-errors
fix(libScePad): check scePadSetVibrationMode's arguments in the console's order
2026-10-14 22:56:29 +02:00
Adrià 799982fac6 Merge pull request #5236 from David-cmrg/fix/systemservice-loadexec-exit-like-shell
fix(libSceSystemService): end LoadExec exit without running guest exit handlers
2026-10-14 22:54:40 +02:00
Adrià 6a8ba98b50 Merge pull request #5176 from n-delic/feat/ds-ordered-count
feat(shader): add GDS ordered counts and ordered-append dispatches
2026-10-14 22:52:36 +02:00
Adrià 6ff02d2119 Merge pull request #5477 from LeandroLP23/fix/agc-copy-data-register-source
fix(agc): copy a shader, context or user config register to memory with COPY_DATA
2026-10-14 22:50:24 +02:00
Adrià 33001cebda Merge pull request #5466 from fdfawef324/codex/stencil-export-emulation
feat(agc): replay proven finite stencil reference exports
2026-10-14 22:49:30 +02:00
Adrià 0a9a32646e Merge pull request #5461 from eljackjoestar-cmd/codex/single-level-volume-bias
fix(shader): sample single-level volumes through biased 2D accesses
2026-10-14 22:49:08 +02:00
billythemenace2andClaude Opus 5.5 731575c802 fix(shader): flush ds_add_f32 denormals and NaNs as the hardware does
ds_add_f32 and ds_add_rtn_f32 now follow the measured hardware: both
operands are flushed to a signed zero when bit 0 of the f32 denormal field
is clear and the result when bit 1 is clear, the sum is rounded to nearest
even, a NaN data operand is stored quieted, else a NaN old value is stored
quieted, and +inf + -inf stores 0xffc00000. Measured on gfx1010 and, in
#5492, on gfx1031.

The new MemoryInfo field is stored in the shader disk cache (field count
31, minimum record 79 bytes, FormatVersion 34). The parts that depend only
on the data operand are computed once, before the CAS loop.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 22:48:34 +02:00
Adrià 2077b5383a Merge pull request #5456 from billythemenace2/fix/shader-2d-compare-on-1d-tsharp
fix(shader): compare through 2D image_sample_c on 1D T#s
2026-10-14 22:48:28 +02:00
Adrià 03f49fcf2e Merge pull request #5445 from nicolasabosch/fix/agc-sample-undrawn-msaa
fix(agc): sample a multisampled texture no draw rendered to from its uniform color memory
2026-10-14 22:47:11 +02:00
Scott SchusterandClaude Opus 5.5 98ce8af56d perf(agc): reuse draw snapshots and moved word buffers across draws that nothing wrote between
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:45:17 +02:00
Adrià 4e210a1064 Merge pull request #5314 from XairRrR/fix/shader-front-face-all-bits
fix(shader): honour SPI_BARYC_CNTL.FRONT_FACE_ALL_BITS for the front-face input
2026-10-14 22:43:51 +02:00
Adrià FranchandClaude 5d9def64e4 docs(debt): record COPY_DATA from a register and the dispatch registers it reads
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 22:11:52 +02:00
Adrià FranchandClaude d8e97a7697 fix(recompiler): move stencil artifacts to cache format 35
Main's flatVolumeLineCompatible change also took format 34 with another layout, so entries of either would load as the other.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 22:09:03 +02:00
fdfawef324andCodex 97a0a4d098 refactor(agc): separate stencil replay from its follow-up topics
Move bounded vertex folding and empty-image feedback into separate topics. Keep the replay coverage proof, stage contracts, finite-reference tests and mapped cache regressions; version the stencil layout separately as format 34.

Co-Authored-By: Codex <noreply@openai.com>
2026-10-14 22:08:48 +02:00
fdfawef324andCodex 77521f7ad2 feat(agc): replay proven finite stencil reference exports
Preserve instance and triangle order with one dynamic-reference shader pipeline. Require bounded references, complete export coverage, replay-safe mask control and resources; refuse unsupported side effects and feedback.

Co-Authored-By: Codex <noreply@openai.com>
2026-10-14 22:08:35 +02:00
Adrià FranchandClaude ade067251c docs(debt): move the single-level volume bias line off the end of the section
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 21:58:28 +02:00
eljackjoestar-cmd 89777fcaa1 fix(shader): sample single-level volumes through biased 2D accesses 2026-10-14 21:58:18 +02:00
billythemenace2andClaude Opus 5.5 0851c08b60 fix(shader): compare through 2D image_sample_c on 1D T#s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 21:54:00 +02:00
Adrià FranchandClaude f093cf4975 docs(debt): record sampling a multisampled texture no draw rendered to
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 21:42:20 +02:00
David-cmrg 2dd7f2b0e3 fix(libSceSystemService): end LoadExec exit without running guest exit handlers 2026-10-14 21:41:22 +02:00
Adrià 31d951edea Merge pull request #5375 from billythemenace2/fix/shader-3d-access-on-1d-tsharp
fix(shader): read 1D T#s through 3D image_sample and image_load accesses
2026-10-14 21:40:54 +02:00
Adrià 4b11b97ebb Merge pull request #5096 from sguckiran/main
fix(libkernel): convert local time with the host time zone
2026-10-14 21:38:24 +02:00
XairRrR 8dbf06798c fix(shader): honour SPI_BARYC_CNTL.FRONT_FACE_ALL_BITS for the front-face input
The front-face VGPR was always +1.0 / -1.0, which is its form only while
FRONT_FACE_ALL_BITS is clear (current Mesa reads it with fgt 0 / fsign).
With the bit set, as Mesa 22.0 RADV programs it, a back face reads 0 and
a front face non-zero: ACO then tests it with v_cmp_lg_u32 0. Uncharted:
Legacy of Thieves Collection (PPSA05684) sets the bit and its two-sided
cloth shaders test v_cmp_lt_u32 0, so -1.0 (0xbf800000) made every back
face a front face: the insides of the menu skeleton's rags kept their
front normals and were lit white by the spot light behind them.

The pixel stage info now carries the bit (request version 26, cache and
draw keys), the decode reads SPI_BARYC_CNTL when FRONT_FACE is an active
input, and the translator turns the builtin into 0xffffffff / 0. The
exact front value is not measured (docs/dev/debt/shader.md).

AI-assisted: yes
2026-10-14 21:37:48 +02:00
Adrià 358e218a4c Merge pull request #5083 from Dripl1x/codex/secondary-loadexec
fix(libSceSystemService): pass LoadExec arguments as the whole guest argv
2026-10-14 21:37:44 +02:00
Adrià b6406a1715 Merge pull request #5792 from SaloQT/feat/prebuilt-shader-packs
feat(recompiler): load prebuilt shader packs before the writable cache
2026-10-14 21:26:42 +02:00
Nahid DelicandClaude Opus 5.5 3a7e82a178 fix(shader): address ordered counts by offset0 alone
On ds_ordered_count M0 holds the ordered wave ID, not a GDS address as
for ds_append: radeonsi and ACO pass the wave ID as the intrinsic's
pointer and keep the counter address in offset0. Reading M0 as the base
and size skipped the add whenever M0[15:0] was 0, so every wave got the
same range. The test now runs the ordered pass with M0 = 0 and M0 = 7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:23:52 +02:00
Nahid DelicandClaude Opus 5.5 46a1cc0fc3 feat(shader): add GDS ordered counts and ordered-append dispatches
ds_ordered_count adds the first active lane's value to a GDS counter and
returns the previous value, like ds_append adds the lane count. Waves are
not serialized in launch order: each still gets its own range. Ordered
swap and multi-dword counts stay refused. DISPATCH_DIRECT and
DISPATCH_INDIRECT accept ORDERED_APPEND_ENBL (bit 3) of the initiator.
Compute shaders of MXGP 26 (PPSA30839) use both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:23:52 +02:00
ThatsLeo 26f0331094 perf(shader): keep only evaluable branch conditions in resource plans
A plan copied every control-flow condition with all its operands, though one
that depends on a vector register is never evaluated. Such conditions are
dropped, and the copied values live in one arena without use lists.
2026-10-15 08:22:09 +13:00
Dean b1d07f8b12 Merge pull request #3607 from itsbo5/feat/libSceNpCommerce-dialog-open2
feat(libSceNpCommerce): implement sceNpCommerceDialogOpen2
2026-10-15 08:19:19 +13:00
codingreapermapsandClaude Opus 5.5 f8e8aca5c1 fix(agc): accept fractional-even tessellation partitioning
VGT_TF_PARAM.PARTITIONING 3 now compiles to Vulkan's fractional-even
spacing, which radeonsi programs as PART_FRAC_EVEN. Its factors are
bounded at 64 like integer partitioning; Vulkan raises the remaining
ones to at least 2, the D3D11 range for this mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:16:21 +02:00
Dean 4c1de0c0ca Merge pull request #4706 from TripyFox/fix/3274-indirect-calls
feat(shader): link callees of calls whose target is loaded from a table
2026-10-15 08:15:26 +13:00
Adrià a050f856f1 Merge pull request #5233 from hugodearaujo/fix/user-service-lifecycle
fix(libSceUserService): report initialization the way the console does
2026-10-14 21:07:55 +02:00
Adrià b0a4753de1 Merge pull request #5230 from hugodearaujo/fix/inherit-creator-priority
fix(libkernel): give an inheriting thread its creator's priority
2026-10-14 21:07:30 +02:00
Adrià 9811e9d4b7 Merge pull request #5218 from YossiYad/fix/guest-arena-mapping-hint
fix(libkernel): fall back below a mapping hint with no room above it
2026-10-14 21:05:23 +02:00
Adrià 066442c961 Merge pull request #5143 from xXPBSXx/fix/mprotect-unmapped-einval-v2
fix(libkernel): fail sceKernelMprotect over an unmapped range with EINVAL instead of aborting
2026-10-14 21:05:05 +02:00
Adrià c70051255c Merge pull request #5077 from 0xRickx/fix/libscevideodec2-coded-size
fix(libSceVideodec2): report the coded picture size
2026-10-14 21:03:52 +02:00
Adrià 5922a728c6 Merge pull request #5020 from xXPBSXx/fix/socket-fd-flags
fix(libkernel): answer F_GETFD and F_SETFD on a guest socket
2026-10-14 21:03:19 +02:00
Adrià 16d7ad035c Merge pull request #4933 from nicolasfalesy/fix/libkernel-poll-scenet-sockets
fix(libkernel): poll libSceNet sockets with the host wait
2026-10-14 21:02:57 +02:00
Dean 3bb8b6c198 Merge pull request #5760 from oneandonlydean/fix/storage-gpu-store-saved-bytes
fix(agc): save the bytes a GPU-side store writes outside the write watch
2026-10-15 07:58:34 +13:00