Twin copies: a whole copy into a held twin goes subresource by subresource (follow-up to #3792) #4040
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Mikey970 on 2026-11-30T15:05:03Z.
Fixes #
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.