GPU/draw: skip repeated output target bindings #1215

Open
github-bot wants to merge 1 commit from github-bot/gh-1215 into main AGit
Owner

@⁠nicolasveilleux on GitHub · 2026-11-26 00:18 UTC · original
nicolasveilleux:perf/reuse-output-target-binds → main · +163 −4 · 2 files · 1 commits · open

Skip redundant output-target binds when the ordered color views and the depth view match the last binding on this command-list recording. Match original descriptor contents and retained host resource identities, not the title's descriptor handles. Keep normal binding for changed views, invalidate on replay and reset, and leave the experiment off by default (VICTORY_REUSE_TARGET_BINDS=1).

Adapted from avatarmanz/VIctory-7900XTX ca1d519, inspired by FQY55kai/ZJOU-VICTORY acf478b8.

Validation

Native Windows 11 / i7-10700F / RTX 2070 Super:

  • Target-binding regression passed with typed null RTVs, including rewriting the descriptor at the same address, changing target order, unbinding and replaying.
  • Isolated recording and submission benchmark, 20 paired samples after warmup. For 1 / 1,024 / 16,384 identical typed null RTV requests, median times were 0.0812 -> 0.0819 / 0.2074 -> 0.1032 / 2.5502 -> 0.4571 ms. The repeated workload recorded one native bind with the option enabled.
  • Public code and synthetic fixtures only. No measured effect on gameplay FPS.
**@⁠nicolasveilleux** on GitHub · 2026-11-26 00:18 UTC · [original](https://github.com/fxceless/victory-fork/pull/1215) `nicolasveilleux:perf/reuse-output-target-binds` → `main` · +163 −4 · 2 files · 1 commits · open Skip redundant output-target binds when the ordered color views and the depth view match the last binding on this command-list recording. Match original descriptor contents and retained host resource identities, not the title's descriptor handles. Keep normal binding for changed views, invalidate on replay and reset, and leave the experiment off by default (VICTORY_REUSE_TARGET_BINDS=1). Adapted from [avatarmanz/VIctory-7900XTX ca1d519](https://github.com/avatarmanz/VIctory-7900XTX/commit/ca1d519f18ccece3daf2b05191a43fae17ac6f91), inspired by FQY55kai/ZJOU-VICTORY acf478b8. ## Validation Native Windows 11 / i7-10700F / RTX 2070 Super: - Target-binding regression passed with typed null RTVs, including rewriting the descriptor at the same address, changing target order, unbinding and replaying. - Isolated recording and submission benchmark, 20 paired samples after warmup. For 1 / 1,024 / 16,384 identical typed null RTV requests, median times were 0.0812 -> 0.0819 / 0.2074 -> 0.1032 / 2.5502 -> 0.4571 ms. The repeated workload recorded one native bind with the option enabled. - Public code and synthetic fixtures only. No measured effect on gameplay FPS.
Adapt avatarmanz/VIctory-7900XTX ca1d519f18ccece3daf2b05191a43fae17ac6f91, itself inspired by FQY55kai/ZJOU-VICTORY acf478b8. Compare actual view descriptions and retained host identities, not title descriptor handles. Keep opt-in and avoid temporary heap allocation on cache hits.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:59:40 +00:00
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-26 00:37 UTC · original

I tested this alongside #1212 on an RX 7900 XT, Ryzen 7 9700X, RADV 26.3.1 and Wine 11.22. Both runs used the same binary, including #1200, and reached the first room. With target-bind and root-CBV reuse on, it counted 699 accepted presents in 73.92 s (9.46 FPS). With both off it counted 731 in 73.57 s (9.94 FPS). One pair on a shared desktop leaves the frame-time effect unresolved.

Across the measured intervals, the enabled build skipped 7,689 target binds and recorded zero root-CBV cache hits. Pipeline retention stayed enabled on both sides. The target-rewrite and command-list replay test passed on the physical adapter. For anyone combining these with the retained-capacity reset from #1059, both new recording caches need clearing on reset. Tested source and counters.

**@⁠UwUCammie** on GitHub · 2026-11-26 00:37 UTC · [original](https://github.com/fxceless/victory-fork/pull/1215#issuecomment-7178947611) I tested this alongside #1212 on an RX 7900 XT, Ryzen 7 9700X, RADV 26.3.1 and Wine 11.22. Both runs used the same binary, including #1200, and reached the first room. With target-bind and root-CBV reuse on, it counted 699 accepted presents in 73.92 s (9.46 FPS). With both off it counted 731 in 73.57 s (9.94 FPS). One pair on a shared desktop leaves the frame-time effect unresolved. Across the measured intervals, the enabled build skipped 7,689 target binds and recorded zero root-CBV cache hits. Pipeline retention stayed enabled on both sides. The target-rewrite and command-list replay test passed on the physical adapter. For anyone combining these with the retained-capacity reset from #1059, both new recording caches need clearing on reset. [Tested source and counters](https://github.com/UwUCammie/victory-amd/tree/bench/radv-recording-reuse).
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/draw.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1215/head:github-bot/gh-1215'
git switch 'github-bot/gh-1215'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1215'
git switch 'github-bot/gh-1215'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1215'
git switch 'github-bot/gh-1215'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1215'
git switch 'main'
git merge --squash 'github-bot/gh-1215'
git switch 'main'
git merge --ff-only 'github-bot/gh-1215'
git switch 'main'
git merge 'github-bot/gh-1215'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.