agc-driver: write-back drops GPU results of full 64 KiB blocks of 1920x1080 render targets (PPSA12544 backgrounds garbled) #1970
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 lubaxe on 2026-10-09T03:26:09Z.
Summary
On Windows with an RTX 5090, PPSA12544 (Hollow Knight: Silksong) reaches gameplay in
tut_01, but its background layers render as colored noise. The HUD and prompts draw correctly. WithAPS5_EAGER_WRITEBACK=1the scene renders correctly at the same frame rate (about 5 fps).The log repeats
storage image ...: guest memory changed while GPU results were pending; keeping the CPU's blocksfor three 1920x1080 render targets. Unlike #865 (now limited to the partial 64 KiB edge blocks of the glyph atlas), these images start 64 KiB aligned. The blocks kept for the CPU are interior blocks, which the full-block rule inStorageTexture::Refresh(droppable) drops whole. #1918 does not change this.Setup
mainf1451396with #846 and #425, plus two fixes needed to reach gameplay: #1968 and #1969. The registered type-4 shader that #1836 defers was handled by an equivalent local change.--windows --module-dir Media/Plugins.Results
Each run was played (or left to play the intro) into
tut_01.APS5_NO_TEXTURE_CACHEplus 9 other cache and recipe switchesAPS5_NO_TEXTURE_CACHE,APS5_NO_SAMPLED_FROM_STORAGE,APS5_NO_RESIDENT_TARGETS,APS5_NO_TEXTURE_HASHtut_01loads (see below)tut_01(see below)opening_sequence:[videoout] presentation failed: AGC driver: null or misaligned addressTrace
APS5_TRACE_FLUSH=1 APS5_TRACE_DCC_KEYS=1 APS5_TRACE_UPLOAD=1, for one of the three images (the other two,0x217de0000and0x218650000, show the same pattern):originalValidis 0, so there is no baseline to compare the CPU's bytes against, unlike the 1 MiB limit #1599 uses.Not established
Whether the CPU actually changes those bytes. Forcing the GPU results for full blocks crashed at the first flip of the opening sequence. So at least some of the stamped ranges hold real CPU data, possibly memory the title reused. A byte comparison like #1599 or #1918, extended to full blocks, looks like the next step, but an 8.4 MiB baseline per render target may be too costly per frame.
Whether the crash is related. With lazy write-back the title crashed 3 times while
tut_01loaded or ran:Background Job.Worker 2at+0x1a5771d, a write to0x18. This happened twice, once on an oldermain(084aeeb6).UnityGfxDeviceWorkerat+0x1a57ad7, a read.It never crashed with eager write-back. The one lazy run without #1918 reached gameplay without crashing. That is a correlation, not a confirmed cause.
(Investigated with AI assistance: Claude Code. The runs were on my machine.)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T04:20:12Z.
Two follow-up approaches are now open: #1995 proposes an opt-in writeback of all pending storage images at each flip; #1997 extends #1918’s byte-baseline merge to full 64 KiB blocks. #1994 separately adds an opt-in Windows import-watch mode and was enabled in #1995’s reported successful Silksong run. I asked #1995 for an ablation of the two flags, since the reported good run used both. #1997 explicitly leaves native CI, exact Silksong reproduction, Windows GPU validation and performance measurements pending. Neither approach is validated by upstream CI yet, so the issue remains unresolved pending those results and maintainer choice.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T04:40:12Z.
Update after #1995 supplied the requested four-way Silksong run matrix (Windows 11, RTX 5090, same build/stack, each allowed up to 180 s):
APS5_STORE_AT_FLIP=1alone renderedtut_01correctly for 180 s at 56 presents/10 s;APS5_WRITE_WATCH_IMPORTS=watchalone reached 600 presents/10 s but crashed at 55 s while loadingtut_01; both together rendered correctly for 180 s at 600 presents/10 s. The no-switch run crashed at 23 s in this matrix, and frame dumps may change timing. This substantially strengthens #1995 as a tested workaround for the reported corruption and shows #1994 is not safe alone. It is still author-reported hardware evidence, not upstream validation. #1997 remains a separate full-block merge candidate; its Linux/Windows CTest is still running, and its description says the exact Silksong reproduction and performance validation remain pending. I am keeping the issue open until the candidates have CI and maintainers choose a path.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T04:43:04Z.
Another status update: #1997 now has successful native Linux and Windows Build/CTest runs on its current head (including the additional conventions run). Its author has explicitly withdrawn the full-block merge as a proposed fix for this issue: the new allocator-reuse evidence shows the byte baseline cannot prove that memory still belongs to the image. The PR remains a draft/reference branch, and the exact Silksong reproduction plus performance testing remain unverified there. #1995 has the four-way hardware matrix but still has no upstream checks. The issue therefore has a strong tested runtime workaround candidate, but no merged or maintainer-selected resolution yet.
Imported from boykopovar/AnyPS5. Originally posted by orbz22 on 2026-10-10T06:56:21Z.
A data point from a newer
main, on Windows with NVIDIA:tut_01renders correctly for me with the default (lazy) write-back and no extra switches.maind70b8998+ #1836 + #1968 + #1969 + #846 (+ #1599 in the later runs), relinked with--windows --module-dir Media/Plugins.APS5_STORE_AT_FLIP, noAPS5_WRITE_WATCH_IMPORTS, noAPS5_EAGER_WRITEBACK.tut_01(Moss Grotto) the background layers are intact.APS5_DUMP_FRAMESevery 300 presents, plus window captures. There is no colored noise, and the HUD and Hornet draw normally.guest memory changed while GPU results were pending; keeping the CPU's blocksappears 8 times in a 150 s run intotut_01. It names storage images at 0x260371000, 0x2603e0000, 0x262090000, 0x2629d0000 and 0x263310000; the last four are 64 KiB aligned. So the kept blocks still occur, but they did not show up as visible damage in these scenes here.This is not a bisect, so I can't say which change between
f1451396andd70b8998matters, or whether timing on this machine just avoids it.Windows 11, RTX 3060 Laptop (NVIDIA 616.92), WinLibs GCC 15.2.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-10T09:28:38Z.
#1995 is merged as the opt-in
APS5_STORE_AT_FLIP=1, and orbz22 sees no garbled backgrounds with the default write-back on a newer main. Doestut_01still garble for you on current main without switches?Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T02:08:34Z.
Closing: no answer since 10-10 on whether
tut_01still garbles on current main without switches; orbz22 sees it intact. Reopen with a frame from current main if it does.