Repository navigation
host: keep refreshes in front across title writes that miss them (VICTORY_KEEP_AHEAD, off by default) - #4
Conversation
…EEP_AHEAD) A buffer copy into title memory at submission, done there or at its place in the lists, cleared every copy brought up to date ahead of the submission's steps. Each copy the later lists refresh was then added, flushed and looked at again, though the write touched a few bytes of title memory: on Vice-Tay, 85 to 89 % of a frame's refreshes were found to copy nothing. With VICTORY_KEEP_AHEAD=1 (off by default) such a write drops only the copies whose refreshed range holds one of its bytes, and clears the one-entry ahead cache. Pending refreshes are still done before the write, and textures are checked again after it. A write into memory that views of physical pages show drops all of them, as before. Work that may write anywhere (Step::Run) is unchanged. Ported from the Vice-Tay change, where it measured +9.5 % (A B B A, 120 s cutscene) on a Ryzen 7 5700X3D with single-channel DDR4-3200 and an RX 7800 XT. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
I checked the byte-range predicate in |
|
RX 9070 XT (RDNA4) check of this change rebased onto current tip (
The diagnostics split line shows the mechanism is live here, about 27 title writes per frame keep the ahead copies and 0 are dropped. So no win on this card and this tip, hitches run about double the control and neither run reaches the cadence floor the control sits at. That fits the effect being traffic bound: single-channel DDR4 saves real refresh work, on this box the skipped refreshes were already cheap. Thanks for the clean port. AI-assisted (Hermes Agent) |
Your in-place work (
5e6fec2,4c210de,0a07538andPORT_BUFFERS) helped my build a lot, so here is something back. It is a port of the refresh-side change I'm proposing for Vice-Tay, adapted to this tree'sBatch.Most refreshes in a frame copy nothing: on Vice-Tay I counted 85 to 89 % of them coming back empty. The cause is
Batch::title_written. When a submission copies a few bytes into title memory, either a buffer copy at submission or a placed copy withfree, it clears every copy thatrefresh_front/refresh_aheadalready brought up to date. Each later list then refreshes them all again.With
VICTORY_KEEP_AHEAD=1(off by default), such a write drops only theaheadentries whose range holds one of its bytes, and resetslast_ahead:inplace::shown_bytesreports as shown elsewhere drops everything, as today;Step::Runis unchanged;Measured on Vice-Tay: Ryzen 7 5700X3D, one DDR4-3200 module (single channel), RX 7800 XT, Windows 11, Series S. A 120 s cutscene, A B B A: 10.94 → 11.98 fps (+9.5 %), preparation −9.9 %, copies −20.6 %.
I haven't run this tree in game with the switch yet. The port keeps the same logic and adds the
last_aheadreset this tree needs. Off by default, nothing changes.Tests:
a_title_write_drops_only_the_ranges_ahead_it_touches(inmod batch). Checks:cargo test -p victory-gpu --lib --lockedgives 396 passed, 0 failed, the new test included (Windows 11, MSVC).cargo clippy -- -D warningsstops on 7 lints thatmainalready has (list.rs,draw.rs,descriptor/host.rs,host/panel.rs,host/place.rs,watch.rs), none inhost.rs;cargo fmt --checklikewise only flags untouched files.— El_Santo
AI-assisted (Claude Code): tested on my machine, text drafted with Claude.
🤖 Generated with Claude Code