AGC: a sampled texture's DCC keys are read before recorded GPU writes over them land (Palworld world: texels read as stored) #4552
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by queeeef on 2026-10-12T15:32:17Z.
Palworld (PPSA23126), at character creation and in the world. 19 to 30 textures per run are reported as
mostly 2536x1428 and 1268x714 render targets in pairs (history buffers), plus formats 36 and 50.
The keys are not keys. A local diagnostic dumped the key bytes when that line is printed. For most of these textures they are float data, not DCC codes:
0x3030b6000000 00 80 3frepeated, i.e. 1.0f0x30265c000000 3c ff 7brepeated, i.e. f16 1.0 and 655040x302f890000ed 37 f7 3b 82 38 …Address, or timing?
META_DATA_ADDRESSequals the target'sCB_COLOR_DCC_BASE. The tenth (0x3032180000) had last been bound with another base (0x3033e40000), a target that reused the memory.Recorder::SnapshotWriteOverlaps). The keys are written by GPU work recorded earlier in the same batch, presumably the title's key clears.textureClearKeysreads the keys through a raw pointer, past the flush hook, so it reads the memory's previous contents: the data of the transient heap that had the memory before.ProvedKeyscallsWaitForKeyWritersbefore it reads the keys. The sampled path does not.Proposed fix (PR follows): when the keys read do not decode (not uncompressed, not a clear the format can fill), call
WaitForKeyWritersand read them again. It answers from known fills and stores first, and otherwise waits for the batch that writes the keys. Keys that decode are used as before. With it, the textures read as stored drop from 19 to 30 per run to 2:0x10.The fix does not restore the world's colours in Palworld: that has another cause, still open.
Setup
mainplus the open PRs Palworld needs (#2648) and local changes, the same build with and without the fixAI-assisted (Claude Code)