Repository navigation
perf(agc): draws that differ only in user data reuse their shape's decode and stages - #494
Conversation
|
Thanks, the data-only path reads right to me. The same shape means the same registers apart from the user words and merged pointers, the copied decode re-reads exactly those, and a stage is only reused when its own user words are unchanged and its captured reads validate. So the result should match a full decode and compile. Two things before I'd take it:
A small one: this commit drops |
5c30b5f to
795b8bc
Compare
|
Thanks. Both points and the includes are done in 795b8bc, on top of a rebase onto current
The rebase had one conflict: I haven't measured the |
|
Thanks, both points are done in 795b8bc. The shape is only passed when It conflicts with main now in |
|
Rebased onto current |
795b8bc to
9f52b1e
Compare
|
Rebased onto current |
9f52b1e to
35c8550
Compare
35c8550 to
cf9195e
Compare
|
Took over the rebase onto #5216, as announced. Pushed on top of your commit:
|
5fe165d to
94ea410
Compare
|
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.
|
A data-only hit (boykopovar#494) reused a cached stage only when every user data word of the stage was unchanged. A stage records the user words it depends on when it is captured: the words its SRT walk reads (GetUserData), the words its binding layout forwards into shader data, and the vertex fetch table words of its vertex stage info. A cached stage is now a candidate when only words outside that set changed; its captured memory is validated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A data-only hit (boykopovar#494) reused a cached stage only when every user data word of the stage was unchanged. A stage records the user words it depends on when it is captured: the words its SRT walk reads as values or bases (SrtUserDataUse), the words its binding layout forwards into shader data (userDataRegisterReads), and the vertex fetch table words of its vertex stage info. A cached stage is now a candidate when only words outside that set changed; its captured memory is validated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A data-only hit (boykopovar#494) reused a cached stage only when every user data word of the stage was unchanged. A stage records the user words it depends on when it is captured: the words its SRT walk reads as values or bases (SrtUserDataUse), the words its binding layout forwards into shader data (userDataRegisterReads), and the vertex fetch table words of its vertex stage info. A cached stage is now a candidate when only words outside that set changed; its captured memory is validated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A data-only hit (boykopovar#494) reused a cached stage only when every user data word of the stage was unchanged. A stage records the user words it depends on when it is captured: the words its SRT walk reads as values or bases (SrtUserDataUse), the words its binding layout forwards into shader data (userDataRegisterReads), and the vertex fetch table words of its vertex stage info. A cached stage is now a candidate when only words outside that set changed; its captured memory is validated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A data-only hit (boykopovar#494) reused a cached stage only when every user data word of the stage was unchanged. A stage records the user words it depends on when it is captured: the words its SRT walk reads as values or bases (SrtUserDataUse), the words its binding layout forwards into shader data (userDataRegisterReads), and the vertex fetch table words of its vertex stage info. A cached stage is now a candidate when only words outside that set changed; its captured memory is validated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A data-only hit (boykopovar#494) reused a cached stage only when every user data word of the stage was unchanged. A stage records the user words it depends on when it is captured: the words its SRT walk reads as values or bases (SrtUserDataUse), the words its binding layout forwards into shader data (userDataRegisterReads), and the vertex fetch table words of its vertex stage info. A cached stage is now a candidate when only words outside that set changed; its captured memory is validated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A data-only hit (boykopovar#494) reused a cached stage only when every user data word of the stage was unchanged. A stage records the user words it depends on when it is captured: the words its SRT walk reads as values or bases (SrtUserDataUse), the words its binding layout forwards into shader data (userDataRegisterReads), and the vertex fetch table words of its vertex stage info. A cached stage is now a candidate when only words outside that set changed; its captured memory is validated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A data-only hit (boykopovar#494) reused a cached stage only when every user data word of the stage was unchanged. A stage records the user words it depends on when it is captured: the words its SRT walk reads as values or bases (SrtUserDataUse), the words its binding layout forwards into shader data (userDataRegisterReads), and the vertex fetch table words of its vertex stage info. A cached stage is now a candidate when only words outside that set changed; its captured memory is validated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A data-only hit (boykopovar#494) reused a cached stage only when every user data word of the stage was unchanged. A stage records the user words it depends on when it is captured: the words its SRT walk reads as values or bases (SrtUserDataUse), the words its binding layout forwards into shader data (userDataRegisterReads), and the vertex fetch table words of its vertex stage info. A cached stage is now a candidate when only words outside that set changed; its captured memory is validated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A data-only hit (boykopovar#494) reused a cached stage only when every user data word of the stage was unchanged. A stage records the user words it depends on when it is captured: the words its SRT walk reads as values or bases (SrtUserDataUse), the words its binding layout forwards into shader data (userDataRegisterReads), and the vertex fetch table words of its vertex stage info. A cached stage is now a candidate when only words outside that set changed; its captured memory is validated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A data-only hit (boykopovar#494) reused a cached stage only when every user data word of the stage was unchanged. A stage records the user words it depends on when it is captured: the words its SRT walk reads as values or bases (SrtUserDataUse), the words its binding layout forwards into shader data (userDataRegisterReads), and the vertex fetch table words of its vertex stage info. A cached stage is now a candidate when only words outside that set changed; its captured memory is validated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A data-only hit (#494) reused a cached stage only when every user data word of the stage was unchanged. A stage records the user words it depends on when it is captured: the words its SRT walk reads as values or bases (SrtUserDataUse), the words its binding layout forwards into shader data (userDataRegisterReads), and the vertex fetch table words of its vertex stage info. A cached stage is now a candidate when only words outside that set changed; its captured memory is validated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A data-only hit (boykopovar#494) reused a cached stage only when every user data word of the stage was unchanged. A stage records the user words it depends on when it is captured: the words its SRT walk reads as values or bases (SrtUserDataUse), the words its binding layout forwards into shader data (userDataRegisterReads), and the vertex fetch table words of its vertex stage info. A cached stage is now a candidate when only words outside that set changed; its captured memory is validated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
Split out of #291, as discussed there. It builds on #493 (merged), which keys draws on the user words each stage reads.
A draw that misses the cache often differs from an earlier draw only in user data, for example a per-object constant buffer pointer. Such a draw decoded and compiled from scratch. Now:
APS5_NO_DRAW_DATA_HITS=1disables it.APS5_VERIFY_DRAW_DATA_HITS=1also decodes and compiles everything in full and throws when the results differ.APS5_TRACE_DRAW_CACHEcounts why keys missed (new registers, user words only, evicted, never inserted), and the profile line counts data-only hits and reused or compiled stages.#291's time-based failure memo is not part of this: #422 memoizes source failures already, and a skip that ends on a timer isn't exact.
Tested
Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB DDR5-5600, MinGW-w64 GCC 15.2.0.
ctest: everything that passes onmainhere passes.maina56c905 (2026-10-13), starting from gjonn's rebase of this series onto 6ac63bf (thanks). On Windows (MinGW GCC 15.2, RTX 5080) the wholeagc_*suite passes on the top of the series: 483 tests, 1 skipped (agc_driver_stencil_ref_export).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🤖 Generated with Claude Code