Fix source offsets in upcopy readback #1530
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!1530
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1530"
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?
@Gauss999 on GitHub · 2026-11-28 21:19 UTC · original
Gauss999:patch-3→main· +92 −22 · 1 files · 2 commits · merged 2026-11-29 08:16 UTCSummary
src_atanddst_atoffsets in theUprecordsrc_atonly for source readback, anddst_atfor destination, base, and reportingTests
up_keeps_copy_offsets_independentunit test; CI awaits approval.@babuakhil on GitHub · 2026-11-28 22:14 UTC · original
Built and ran this on Windows, since it hadn't been run yet: Windows 11, Rust 1.98.1 (pinned), applied on current
main(d4b5d51); cherry-picks cleanly.--all-features) reports nothing inupcopies.rs--features diagnostics:up_keeps_copy_offsets_independentpasses, and all 25replaytests passHeads-up for CI: like the rest of
replay, this is#[cfg(all(windows, feature = "diagnostics"))]. Without the feature the test doesn't exist (cargo test -p victory-gpu --lib -- upcopiesruns 0 tests), so CI'scargo test --workspace --lockedwon't run it.The fix reads right. On
main,upsdropssrc_atinto the.., and the readback then asks for the source at the destination's offset (asked.push((self.objects[&src].res.clone(), at, len))withat = dst_at). So for any copy withsrc_at != dst_at, the "comes" words are read from the wrong place. Here the source is read atsrc_at, and the destination, its base, the reported word offsets and the declared pieces all stay ondst_at, as before.One gap in the test: it checks that
Up::newputs each field in its place, but not the readback, which is where the bug was. It couldn't fail onmaineither, sinceUpdoesn't exist there. A test that pins the three ranges the readback asks for (destination and base atdst_at, source atsrc_at), for example by moving theaskedpushes into a small function, would catch this coming back. Not a blocker.Not checked: a replay run with a real capture, which this path needs (I have no capture to run).
@Gauss999 on GitHub · 2026-11-28 22:50 UTC · original
Applied the non-blocking feedback from @babuakhil. The new
Up::readbackhelper is used to extendasked, and the regression test now checks all three(resource, offset, length)entries with distinct offsets (src_at = 0x80,dst_at = 0x200): destination and base read atdst_at, while source reads atsrc_at. The original fix remains intact, includingdst_atfor reported word offsets and declared pieces.I have not run a local build/test or a real-capture replay; this update was made through the web editor.
@babuakhil on GitHub · 2026-11-28 23:04 UTC · original
Re-checked with
de61ce5ond4b5d51(Windows 11, Rust 1.98.1): builds, clippy (--all-features) reports nothing inupcopies.rs, and with--features diagnosticsup_keeps_copy_offsets_independentpasses with the newreadbackassertions (25/25replaytests). The test now pins the source atsrc_atand the destination and base atdst_at, which is what the fix is about. Looks good to me; still not run against a real capture.