Repository navigation
feat(agc): store pending storage-image results at each flip with APS5_STORE_AT_FLIP - #1995
Conversation
|
The regression evidence is unusually strong, especially the page-write trap and title run. One remaining attribution gap: the reported correct 60 fps run uses both |
|
Thanks, here is the four-way result. Same build for all four:
Earlier runs without either switch on the same stack:
So:
One caveat: the frame dumps themselves change timing, which probably explains why the neither-switch run failed earlier here (23 s) than without dumps (in (AI-assisted: Claude Code; the runs are on my machine.) |
|
Thanks, this four-way matrix closes the attribution gap. It shows |
|
The new check in |
ebb28dd to
4d0042b
Compare
|
Thanks, both addressed in 4d0042b (on top of a rebase onto
Also: on current (AI-assisted: Claude Code.) |
4d0042b to
1cbf28d
Compare
|
Same as #1969: it conflicts with main in |
…_STORE_AT_FLIP Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stead of FlushAllPending Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1cbf28d to
3221ae8
Compare
|
Rebased onto current |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
…-at-flip feat(agc): store pending storage-image results at each flip with APS5_STORE_AT_FLIP
What
Addresses #1970. Pending storage-image results are stored only when something reads their memory. PPSA12544 frees render targets after its GPU work, and Unity's allocator reuses that memory. A write trap on the image pages caught
HollowKnight.exe+0x1a578feand+0x1a57931writing block headers at page boundaries (+0x1fe000, then+0x1fdff8) into a 1920x1080 target while its results were pending. The late store then:+0x1a5771d,+0x1a57ad7) whiletut_01loads.On hardware the results land as the GPU writes them, before the title can reuse the memory.
APS5_STORE_AT_FLIP=1stores every pending result when a display buffer is flipped (PresentDisplayBuffer), through the existingStorageTexture::FlushAllPending, which had no caller. A title has to wait for GPU work before reusing its memory, so a flip is a point where the results are due at the latest. Storing them at the title's own waits (labels, fences) would be the general fix; it is recorded in TechnicalDebt.md as unimplemented. Off by default.Tested
storeAtFlipTestsinagc_driver_graphics(ctest) checks the switch: unset is off,1is on, and0, empty,trueand11are rejected. With the oldgetenv(...) != nullptrcheck it fails.PresentDisplayBufferneeds a swapchain, so the flip call itself is covered only by the title runs. (Updated in 4d0042b after review; rebased ontomaind70b899.)ctest: 487 of 488 passed. The failure isagc_driver_pixel_lds, which also fails on unmodifiedmainon this GPU.APS5_WRITE_WATCH_IMPORTS=watch:tut_01loaded in 3 of 4 runs.tools/check_conventions.py --base origin/mainpasses.Conflicts with #1994 only in
docs/user/USAGE.md. I'll rebase whichever merges second.Update (
maind70b899): #1994 is closed, since #2096 restores the frame rate onmain. With this flag alone, PPSA12544 runs gameplay at 600 presents / 10 s with correct rendering (Windows 11, RTX 5090, with #846, #425, #1836, #1599, #1968 and #1969).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code