The first commit drained the device for every label recorded while any
copied writer was listed, including labels nowhere near it. CPU-copied
writers also occur in default runs, so that could cost a drain per label
in normal play.
While a copied writer is listed, a label of 8 bytes or less (every
RELEASE_MEM, the fence WRITE_DATAs) is now not recorded on the GPU at all.
A completion action of the open (or newest in-flight) batch stores it when
that batch is reaped (AfterCompletions with storedOnGpu false, reason 5).
Completions run in push order and batches finish front-first, so it lands
after every earlier write-back without a drain. The existing GPU store
plus completion re-store path would not keep this order: its GPU store is
visible to a polling title before the write-back runs, and its re-store
runs only over a write-back that overlapped the label itself.
Recorder::PendingCompletionStores counts the guest stores completions
still have to make (not end-of-pipe deliveries or write-backs). While it
is not zero, later small labels follow the same route even after every
writer was written back, so a later GPU label cannot become visible
before an earlier completion store or land under it at one address.
Stores over 8 bytes keep the GPU store and go behind the completions only
over a copied writer's range or a pending completion store of their own
range. Queue 0 reaps while it spins on REWIND, so a title polling such a
label there cannot wait forever. The debt entry lists what this still
leaves out of order (larger stores and GPU-made DMA_DATA copies away from
those ranges, and a nested sync from inside a write-back).
APS5_DRAIN_COMPLETION_LABELS=1 brings back the drain (reason 2); a second
ctest entry runs the test with it.
CopiedWriterLabelOrder now skips with a line naming
minStorageBufferOffsetAlignment when the device binds the record at
+0x1004 in place (alignment 4, AMD's driver and RADV) and nothing is
written back. Above 4 the write-back count still fails the test. A new
pass checks the order across batches: a later label to the address of a
pending completion store is not visible before it and is not overwritten
by it at the reap.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Implement sceNpWebApi2AddWebTraceTag with the (int64_t request_id, const char* value) signature from shadPS4. Validates that value is not null, accepts any request id, and acts as a silent stub matching the other offline request functions.
The shader disk cache source version hashed raw file bytes, so one commit
checked out with CRLF in one worktree and LF in another produced two
versions and emptied the cache and pipeline journal. Hash the text with
CRLF folded to LF.
sceAjmDecWVorbisCreateHeaderPacket checks its 0x48-byte parameter as the
PS5 module does and writes a five-entry length table, a Vorbis
identification header from the parameters, an empty comment header and
the setup packet.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
The PS5 module's sceAudioOut2LoTerminate stops the low-latency service
and returns 0 whether or not it runs; sceAudioOut2LoInit starts no
service here. sceAudioOut2InitializeEx stores its argument and runs
sceAudioOut2Initialize.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
The PS5 module returns 0x80A00002 for a null pointer and otherwise
clears the 0x134C-byte program info before filling it from the system
service. Nothing is broadcast here, so the info stays zero.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
The PS5 module keeps one mastering-initialized flag. A repeated
initialization returns 0 before the flags are checked; otherwise
sceAudioOut2MasteringInit accepts only 0 and sceAudioOut2MasteringInitEx
also bit 31, and other flags return 0x80268201. Term, GetState and
SetParam return 0x80268203 before initialization, GetState returns
0x8026800C for a null state and SetParam 0x80268205 for flags above 1.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
A read of memory inside a stale D32 Z_X depth plane (FlushDepthPlanes) stored
the whole plane: a copy of the depth image into the mirror, MarkWholeWritten
and a write-back of every byte. In Super Meat Boy 3D (#8840) a read-only
buffer ending about 3 KiB inside a stale 3840x2160 plane makes
ShaderResources::Revalidate flush ~1000 times per 5 s, each one moving
31.9 MiB, bound by transfer bandwidth.
A depth surface now tracks its plane as 64 KiB units, each one 128x128 tile
of the mirror's block units: a stale bit and a write generation per unit
replace memoryStale and the plane-wide syncedGeneration.
- FlushDepthPlanes stores only the stale units the range overlaps: the depth
to mirror copy takes one region per unit rectangle (UnitRects, from the
mirror's slice windows), the mirror marks just those units written
(MarkUnitsWritten) and the write-back covers their hull. The other units
stay stale and the plane stays registered. Stale bits are cleared only
after the copy was recorded, and the stored units' generations advance
only when FlushPending stored them. A depth fast clear still pending at
the store rewrites the whole image, so it makes every unit stale first.
- SyncFromMemory copies from the mirror only the units the guest wrote since
their own generation (one ChangedBlocks scan; untracked memory counts as
unwritten, as WrittenSince did), so a guest write into one unit no longer
replaces GPU depth that is still unstored in the others.
- Flushes followed by a retire keep the whole-plane store: the color target
flush in Draw and a written storage view (DepthPlaneScope::Whole). The
retire of an overwritten surface in DepthSurfaceTexture first stores its
remaining stale units the guest did not write.
- A mirror without block units (APS5_NO_BLOCK_TRACKING, unaligned base)
falls back to the whole-plane copy, and APS5_DEPTH_PLANE_WHOLE_STORE=1
tracks the plane as one unit, the previous behaviour.
- DepthPlaneStoreCounts reports stores, units and bytes stored.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
MD4, MD5, SHA1, SHA224, SHA256, SHA384 and SHA512 Init/Update/Final and
the SHA256 one-shot threw. They now hash as LibreSSL does, on the
caller's MD4_CTX, MD5_CTX, SHA_CTX, SHA256_CTX and SHA512_CTX laid out as
in LibreSSL's md4.h, md5.h and sha.h, so a context copied or inspected
by the title stays valid: the bit count in Nl/Nh, the partial block in
data with its length in num, and md_len selecting the truncated digest.
Final pads and clears the buffer as LibreSSL's sources do.
Cases that differ between LibreSSL versions throw: SHA256 with a null
digest buffer and SHA512_Final with the SHA-512/224 or SHA-512/256
length. The test checks the RFC 1320, RFC 1321 and FIPS 180 vectors over
several chunk sizes, the context fields, copied contexts and those
cases.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>