Repository navigation
perf(agc): take a storage image's generation baseline only when its guest bytes are settled - #2791
Merged
oneandonlydean merged 1 commit intoOct 10, 2026
Conversation
…uest bytes are settled An upload of a storage image up to 1 MiB reads the surface's guest bytes into a baseline (boykopovar#1599), which a later write-back compares against for blocks the CPU stamped. When a unit shadow, another image's pending results or a recorded GPU store covers the surface, that read goes through the flush hook: the shadow is published and the worker waits for the GPU, although the upload itself runs on the GPU from the import. The baseline is now taken only when nothing of that kind overlaps the surface. Otherwise the image has none, and its write-back keeps the CPU's bytes for stamped blocks, the rule before boykopovar#1599. TechnicalDebt's entry names the condition. agc_storage_baseline_settled creates a storage image over a watched host import with a recorded store pending over part of it and checks that the upload did not submit the open batch; without the change the baseline read syncs on that store. agc_unchanged_cpu_stamps (boykopovar#1599) still passes. PPSA14632 (LEGO Horizon Adventures) refreshes such images about 870 times per 10 s from queue 0 dispatches: the hook's recorded-store syncs go from about 3400 waiting 4.0 s to about 630 waiting 0.3 s per 10 s, and a direct dispatch's device call from 356 to 107 us. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
9 tasks done
Contributor
|
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
No title was run. 🤖 Addressed by Claude Code |
9 tasks done
Contributor
|
Checked on Windows with Hollow Knight: Silksong (PPSA12544), the title whose boxed menu letters #1599 fixed. Setup: Windows 11 Pro (26300), i7-11800H, RTX 3060 Laptop (driver 617.42), WinLibs GCC 15.2.0 r7, Release.
🤖 Generated with Claude Code |
MichalSy
added a commit
to MichalSy/AnyPS5
that referenced
this pull request
Oct 10, 2026
Adapt upstream PRs boykopovar#1315, boykopovar#2791 and boykopovar#2792 to the current descriptor ABI and synchronization paths. Bound immutable binding plans to 1024 entries while retaining live resource addresses and specialization identity. Keep real CPU writebacks and fault completion active. Capture generation baselines only over settled guest bytes. Add focused cache, texture baseline and copy synchronization regressions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
#1599 keeps a baseline of a storage image's guest bytes (images up to 1 MiB) when its layers get their generation, so a write-back can store the GPU results over CPU-stamped blocks whose bytes didn't change. The upload takes it with
GuestMemory::ReadCommitted, also on the host-import path, where the upload itself runs on the GPU.That read goes through the flush hook. When a unit shadow, another image's pending results or a recorded GPU store covers the surface, the hook publishes the shadow and the worker waits for the GPU on every such upload. Stack from PPSA14632, sampled at those waits:
Driver::dispatch→ShaderResources::buildComplete/Revalidate→lookupStorageTexture→StorageTexture::Refresh→upload→ (generation stamp) →ReadCommitted→FlushForAccess.The baseline is now taken only when nothing of that kind overlaps the surface (
StorageTexture::guestBytesSettled:AnyShadowedOverlaps,AnyPendingOverlaps,Recorder::PendingWriteOverlaps). Otherwise the image has no baseline, and its write-back keeps the CPU's bytes for stamped blocks, the rule before #1599. The TechnicalDebt entry from #1599 now names the condition.New ctest
agc_storage_baseline_settled(agc_driver_recorder_tests --settled-baseline-only): it creates a storage image over a watched host import while a recorded store is pending over part of it, and checks that the upload did not submit the open batch. Without this change it fails ("an upload over a pending recorded store submitted the open batch to read its generation baseline").agc_unchanged_cpu_stamps(#1599) still passes, so settled surfaces keep the baseline.Tested
Linux (Arch), RX 9070 XT, RADV, Release:
maindb343a9 plus perf(agc): sync only the source for DMA_DATA copies into host-only memory #1157, feat(agc): depth planes sampled as 2D arrays, cubes and integer views #425, perf(agc): read a fast-cleared surface's guest bytes only when the import is compared #2699, feat(agc): vertex clip and cull distances #423/feat(agc): render layered draws into 3D color targets #1077 and local stand-ins needed to reach gameplay), steady state per 10 s:On its own this barely moves presents (~100 → ~104 per 10 s): the GPU wait moves to DMA_DATA copies, which #2792 addresses.
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