gpu: skip self-CopyResource when src and dst share host texture #51
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!51
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-51"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@jmal423 on GitHub · 2026-11-25 13:01 UTC · original
jmal423:pr/skip-self-copy-resource→main· +81 −2 · 2 files · 2 commits · openSkips redundant/undefined
CopyResourcecalls whento == from(source and destination resolve to the same host texture).Tested on Windows 11 / AMD Radeon RX 9070 XT:
cargo test -p victory-gpu: 109 passed, 0 failed, 4 ignoredDEVICE_HUNG, 0 crashes.@ -657,3 +657,2 @@) {// shortcut: not between textures without their largest mips.if crate::resource::skipped_mips(dst) + crate::resource::skipped_mips(src) > 0 {// shortcut: not between textures without their largest mips, or self-copy.@gut0to on GitHub · 2026-11-25 14:57 UTC · original
Could you add a focused self-copy regression for this branch? The PR's GPU/game run is useful, but there is no test showing that a CopyResource whose source and destination resolve to the same host resource is skipped without recording a command. AI-assisted review.
@ -657,3 +657,2 @@) {// shortcut: not between textures without their largest mips.if crate::resource::skipped_mips(dst) + crate::resource::skipped_mips(src) > 0 {// shortcut: not between textures without their largest mips, or self-copy.@jmal423 on GitHub · 2026-11-25 15:40 UTC · original
Added in
8773257: \list::tests::copy_resource_skips_same_host_texture\ verifies that \copy_resource\ and \copy_resource_x\ with identical source and destination host textures return early without recording state transitions or a copy command (contrasted against a copy between two distinct host textures on the same list). Verified with \cargo test -p victory-gpu --lib list::tests\ (6 passed).@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-25 13:01 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
@gut0to on GitHub · 2026-11-25 14:57 UTC · original · reviewed
AI-assisted review: I checked the new early return and the verification described in the PR.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.