Repository navigation
perf(agc): maintain draw fingerprints on register writes - #1312
Conversation
|
Rebased on Fedora 44 Release: |
a144cbb to
913404d
Compare
913404d to
c9e08e6
Compare
adriadam10
left a comment
There was a problem hiding this comment.
Not mergeable as is, and I can't rebase it mechanically:
- It conflicts with
main: #639 replacedcompileDrawStagewithmaterializeDrawStage(built from invocations prepared at registration), so the draw path this PR extends no longer exists. As @oneandonlydean already noted, the retained compile results from #1311 have to be redone on top of it, and this PR sits on that work. - Please rebase the stack bottom-up (#1311 first, then this PR) onto current
mainand keep this PR to its own commit. - Please post before/after numbers for this change alone against current
main(the fingerprint maintenance on register writes), not against the pre-#639 tree: with shader compilation at registration, the per-draw cost profile changed. - Re-run the draw-plan, driver, graphics and PM4 tests after the rebase, including the debug fingerprint-vs-recomputation check.
Happy to review again once it's on top of main.
c9e08e6 to
748d8d3
Compare
|
Reworked this directly on main Register-key differential/mutation tests, PM4, graphics and prepared graphics pass with For an isolated comparison, I compiled separate benchmarks using main's exact register container and this branch's container. Six ABBA runs per side, pinned CPU, process CPU time, including writes: 24 live user words cost 1.386 → 0.144 µs; with 256 additional writes, 3.028 → 2.032 µs. Intermediate 1/16/64-write cases also improve. These are warm component numbers; the body no longer relies on combined-fork Helgen evidence or implies a measured title gain. Full Linux/Windows CI still needs the collaborator-dispatched workflow. AI-assisted update. Artifact correction: the title runtime copies were subsequently found to contain the same patched main AGC library. The saved PRESS ANY BUTTON frame therefore validates the main + experimental NGS integration, not #1312 or #1313. The CTests/CPU benchmarks used the new unpatched builds and remain valid. The earlier PR-specific title claim is withdrawn; corrected results follow. Corrected runtime result: the NID-patched #1312 library has SHA-256 |
|
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.
|
adriadam10
left a comment
There was a problem hiding this comment.
Checked on current main: merged tree builds, agc_driver_graphics, agc_driver_pm4, agc_driver_prepared_* and the new agc_driver_register_key pass. The new test does not compile without the change, and dropping the fingerprint update in Registers::erase makes it fail ("incremental fingerprint missed a mutation"). The Reference proxy also keeps any raw uint32_t& write from bypassing the fingerprint at compile time.
Note: #4943 touches DrawRegisterKey.cpp too and conflicts with this one, so whichever lands second needs a rebase. Merging once the full Build is green.
|
The full Build failed on Windows only in Added on top of your commit, rebased on current main:
Merging once the full Build is green on the new head. |
748d8d3 to
9b19909
Compare
Track mutations against the current draw dependency mask and preserve device and shader registry identity in the draw key. Validate mutations, projected masks, PM4 packets and prepared graphics against full recomputation. Written with AI assistance.
…ibling tests The Windows build failed to start it (0xc0000135, DLL not found).
… Windows The sibling AGC driver tests get this through the agcTest loop; without it the test exits 0xc0000135 (DLL not found) on Windows.
|
The full Build on the previous head still failed on Windows only in Added on top of your commit, rebased on current main:
Merging once the full Build is green on the new head. |
9b19909 to
dd49e1d
Compare
What
Maintain draw-register fingerprints on writes, using the current draw dependency ranges. Runtime user words stay live; device serial and shader registry identity remain in the final key. Copy, restore, erase, clear and PM4 writes keep the fingerprint consistent.
APS5_VERIFY_REGISTER_KEYS=1checks it against full recomputation.Rebuilt directly on main
d146ec1b6, removing the old #1311 stack and its draw-plan API. This is a single-topic, seven-file change using the current prepared-shader draw path.Tested
Fedora 44, GCC 16.2.1, Release:
No new isolated in-game performance claim. Plain main currently stops this Skyrim boot at unsupported NGS reverb channel conversion; a shared experimental NGS integration baseline is being checked separately. Windows and full platform CI were not run locally; those require the repository's collaborator-dispatched workflow.
Checklist
Title artifact correction
A binary-hash audit found that the earlier title runtime copies all contained the same patched main AGC library. Those runs establish the main + experimental NGS baseline only. They do not validate #1312/#1313 in-game. The separately built CTests and CPU benchmarks used the new unpatched libraries/source and remain valid. The earlier PR-specific title claim is withdrawn; corrected results follow.
Verified runtime rerun
Corrected runtime result: the NID-patched #1312 library has SHA-256
a15e22c1b1305f79ab39089c7640ab9b6dd0fb9e6bffc0910d053cddfc7d51eb, differs from baseline, and contains the fingerprint verification code./procconfirms the game loaded that file and the shared experimental NGS library. A fresh 120-second run withAPS5_VERIFY_REGISTER_KEYS=1reported at least 1,706 register-key lookups, no fingerprint mismatch, and presented frames. It stopped at the imposed timeout (124). No performance comparison is claimed with this verification enabled.