GPU/draw: skip repeated output target bindings #1212

Open
nicolasveilleux wants to merge 1 commit from upstream-pr/1215 into main
nicolasveilleux commented 2026-11-26 00:18:17 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by nicolasveilleux on 2026-11-26T00:18:17Z.


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.
<!-- greyfinch-sync:fxceless/victory-fork:issue:6616545152 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1215). Originally posted by [nicolasveilleux](https://github.com/nicolasveilleux) on 2026-11-26T00:18:17Z. --- 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.
UwUCammie commented 2026-11-26 01:06:16 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by UwUCammie on 2026-11-26T00:37:26Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7178947611 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1215#issuecomment-7178947611). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-26T00:37:26Z. --- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1215:upstream-pr/1215'
git switch 'upstream-pr/1215'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1215'
git switch 'upstream-pr/1215'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1215'
git switch 'upstream-pr/1215'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1215'
git switch 'main'
git merge --squash 'upstream-pr/1215'
git switch 'main'
git merge --ff-only 'upstream-pr/1215'
git switch 'main'
git merge 'upstream-pr/1215'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!1212
No description provided.