Repository navigation
perf(agc): read DCC keys behind the driver's own pending key store without a wait - #458
Merged
oneandonlydean merged 1 commit intoOct 3, 2026
Conversation
…thout a wait A CB metadata pass (and a resident target's register-clear check) read the DCC keys with CurrentDccKeys, which waited for the GPU whenever recorded work wrote the key range. In the intro video of PPSA21564 about 800 passes per 10 s waited about 1.8 ms each, and every one of those waits was behind a key store whose result the driver already knew: its own uncompressed key store, or a title fill of uniform keys recorded on the GPU. Pending-write notes now carry a serial in recording order, and the key memo remembers the note of the store it describes. When the newest pending note over the keys is that store's own note, nothing recorded after it writes the keys, so they read as the store's keys without a wait. Any later writer, a range the store does not cover, or a unit shadow over the keys waits as before.
9 tasks done
12 tasks done
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
A CB metadata pass (and a resident target's register-clear check) reads the DCC keys with
CurrentDccKeys, which waits for the GPU whenever recorded work writes the key range (SyncThrough). In the intro video of PPSA21564 about 800 passes per 10 s waited about 1.8 ms each, and every one of those waits was behind a key store whose result the driver already knew: its own uncompressed key store (StoreUncompressedOnGpu), or a title fill of uniform keys recorded on the GPU (NoteKeysFillOnGpu).Recorder::noteWriteandnoteWriteOn).LastWriteNote, taken right after the store is noted).CurrentDccKeysasksNewestWriteNotefor the newest pending write over the keys. When that is the store's own note, nothing recorded after the store writes the keys, so they read as the store's keys without a wait.Tested
BUILD_TESTING=ONandctestpass (145/145).pendingKeyStoreTestsinagc_driver_recorder_tests(GPU, run by hand like the rest of that executable): after a pending uncompressed key store, the keys (and a range inside them) read as uncompressed while the store is still pending; a later writer over part of the keys makes the read wait and the store lands; the keys of a pending fill read as the fill's keys without a wait, and a later, wider writer is waited for. With thePendingStoreKeysline removed fromCurrentDccKeysit fails with "reading keys the driver's own pending store wrote waited for the GPU".Recorder.*; each merges cleanly with this branch.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)