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 <[email protected]>
EVENT_WRITE (PM4 opcode 0x46) with event type SAMPLE_STREAMOUTSTATS1-3
(0x01-0x03) or SAMPLE_STREAMOUTSTATS (0x20) failed submission validation
with "EVENT_WRITE event type 1 is not implemented". Minecraft Preview
(PPSA19639, discussion #1277, stop 9) submits a 2-dword type-1 packet
while entering a world, and the GPU thread aborted intermittently.
The four values are VGT_EVENT_TYPE entries in Linux
drivers/gpu/drm/amd/include/navi10_enum.h L14155-14188 at
0fcb05b72344f40806cbe810de8872f1698bf053.
drivers/gpu/drm/amd/amdgpu/nvd.h L326-347 at the same commit documents
these events only with the sampling index (3, or
EVENT_INDEX__SAMPLE_STREAMOUTSTATS* 8-11 on gfx10), followed by
ADDRESS_LO/HI. The 2-dword index-0 packet has no destination dwords, and
what the CP does with it is neither documented nor measured. AnyPS5 does
not emulate the VGT stream-out counters, so there is nothing to sample.
Packet execution already skips EVENT_WRITE.
These event types are now accepted on the graphics queue as 2-dword
packets with event index 0. The sampling indices 3 and 8-11 throw that
stream-out statistics sampling to memory is not implemented, before the
size and reserved-bit checks. Other indices, other sizes and the compute
queue still throw.
sceAgcDcbEventWrite ignores the address for every event type except 0x38
and 0x39, so a call with one of these event types and an address now
builds a packet that validates and writes nothing. This is recorded in
docs/dev/debt/libSceAgcDriver.md with the unmeasured hardware behaviour.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A 2D image_sample_l through a 1D T# now takes the 1D runtime mode, as
image_sample_lz already does, instead of failing the runtime image
interface. Measured on RDNA2 (gfx1036) with tools/hw-oracle against the
same sample with DIM 1D: u inside, on and past the edges, v of 0, 0.5, 1,
-0.25 and 3, LOD -1 to 6 on a 5-level R32_FLOAT texture, point, linear and
linear-mip filtering, wrap, clamp and border addressing, and HEIGHT or
DEPTH 3. All 4725 rows matched: the 1D T# decides the addressing and v is
ignored.
The execution test samples a 5-level 1D T# with distinct mip contents at
LODs -1 to 6, fractional ones included, with u inside, on and past the
edges, under point filtering with wrap and clamp and linear filtering with
linear mips and wrap, clamp and border addressing. Every result must match
the same image_sample_l with DIM 1D bit for bit; point-filtered results
must also be the expected texel of the expected level, and linear-mip
results the blend of the two levels the LOD selects.
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 <[email protected]>
Accept every creation rate listed by the public decoder research in
libSceOpusDec and libSceOpusCeltDec, resampling FFmpeg's 48 kHz output.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Crimson Desert (PPSA25286) calls scePadSetVibrationMode(handle, 5)
at start-up, and main rejects any mode above 3 with
SCE_PAD_ERROR_INVALID_ARG (0x80920001). The title then carries on
with the call failed.
The modes are not documented. SharpProspero names 1 (advanced) and 2
(compatible); mode 3 was accepted for PPSA21480. The call now also
accepts 5, which a shipped title passes, and keeps rejecting the values
no title has been seen to use (4, 6 and above). The mode is stored as
before and has no other effect.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sceSysmoduleGetModuleInfoForUnwind called VirtualQuery and GetMappedFileNameA on every call. VirtualQuery on a large image section costs time proportional to the section (2 us for 16 KiB, 51 us for 8 MiB, 167 us for 32 MiB), and a title that unwinds exceptions while loading calls it for every frame of every throw.
The region and file name of an address inside an image of the Windows loader's module list are kept per region and used while the loader still reports the same image (base, time stamp and size). Other addresses are queried every time.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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) <[email protected]>
The Windows error for a refused FindFirstChangeNotification was one string shared
by WatchParent and WatchContents, so the log could not tell which handle or path
was denied. Build it from the watcher, the path the API was given and
GetLastError instead.
Still throws: the EVFILT_VNODE attach path is vfs_kqfilter, which returns only
EINVAL, ENOMEM or 0, with EBADF from fget before it, and consults no directory
permission, so no FreeBSD errno stands for a host that refuses to notify.
The README no longer embeds history.svg; it links history.html, which the progress page also links.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's flatVolumeLineCompatible change also took format 34 with another layout, so entries of either would load as the other.
Co-Authored-By: Claude <[email protected]>
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 <[email protected]>
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 <[email protected]>
A draw with PA_SC_AA_CONFIG.MSAA_NUM_SAMPLES > 0 and
PA_SC_MODE_CNTL_0.MSAA_ENABLE clear threw. On GFX10 and later the bit
is what makes the rasterizer use the programmed sample locations; with
it clear the draw now keeps the target's sample count with every sample
at the pixel center. Points, lines, a depth target and
alpha-to-coverage still throw.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>