Twin copies: a whole copy into a held twin goes subresource by subresource (follow-up to #3792) #4040
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4040
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4040"
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?
@Mikey970 on GitHub · 2026-11-30 15:05 UTC · original
Mikey970:pr/twin-whole-copy→main· +96 −9 · 2 files · 1 commits · openFixes #
What it changes
Follow-up to #3792 (merged): a gap found in review after the merge (note on #3792). #3792 left out a whole
CopyResourceinto a placed twin whose host copy is laid out differently from the source's, for example a twin made of held levels only (it begins at a later level). That avoided the refused copy, but the twin kept stale contents. The layout check also compared the twin with the destination's host texture (to), not withfrom, the source the copy actually reads.Now in
copy_resource(list.rs):from). When they are laid out alike, it is oneCopyResourceas before.CopyTextureRegion. Each subresource is mapped withhost_targetat both ends, covering every level, array slice and plane (resource::whole_copy_pairs, built onheld_pairs).twin_copy_left_out, whywhole copy, no level held alike).How it was tested
VICTORY_WARP=1); not yet measured in-game. IN-GAME-ON-MAIN: pending.a_whole_copy_into_a_held_twin_takes_the_levels_both_hold: a twin that begins at level 3 of 11 takes title levels 3–10 of each slice from a full source at their own indices; a held source gives only what it holds; nothing held at one end gives no copy.a_copy_into_a_held_copy_takes_its_own_levelanda_placed_copy_target_keeps_the_stencil_planestill pass.cargo testpassed for the crates it touches: yes, the targetedvictory-gputests above. Clippy onvictory-gpu --all-targetsadds no warnings. The CIcheckfailure (unwind_copyinvictory-loader) is pre-existing onmain. Onmainc71899d9thevictory-gpulib tests do not compile: twocard_passcalls inhost.rstests lack the newcaptureargument. I passed[0; 3]locally to run the tests above; that change is not part of this PR.Checked for overlap
dstandsrchost copies, not the copy into placed twins.🤖 Generated with Claude Code
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.