GPU: one aligned copy per unaligned SRV range per list (follow-up to #986) #1260
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1260
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1260/head"
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?
@DaemonSimon on GitHub · 2026-11-24 16:52 UTC · original
DaemonSimon:fix-986-copy-once→main· +173 −11 · 3 files · 2 commits · closed without mergingDepends on: #986 (this branch is #986 plus one commit; only the last commit is new).
What
#986 copies an unaligned buffer SRV's bytes into fresh scratch memory for every draw that reads it. In the world that adds up fast: about 286k copies (35 GB) within a few minutes. GTT filled to 15 GB, RADV refused further submissions ("not enough memory") and the device was removed.
This commit makes draws of one command list that read the same unaligned range share a single aligned copy, kept until the list is reset. The fix #986 brings (no shader reading address 0 through an empty view) is unchanged.
Result
Testing
cargo check -p victory-gpu --target x86_64-pc-windows-msvcon this branch (#986 + this commit) is clean.AI-assisted: written and tested with Claude Code.
🤖 Generated with Claude Code
@justlovett0 on GitHub · 2026-11-24 17:32 UTC · original
Verified on Win10 21H2 / RTX 3080 (driver 621.24) stacked with #986 and #1267: world went ~1 fps → 20 fps, copies 270–400 MB/frame → 0.4 MB, and the ~2–3 min device removal disappeared (0 in a ~2.3 min world run). Combined result and setup detailed on #986. AI use: Qwen Code (model name not disclosed); user-confirmed.
@BitWuehler on GitHub · 2026-11-24 20:06 UTC · original
Confirmed on Linux (
GE-Proton11-14viaumu-run) + NVIDIA RTX 5080 (driver 620.73.04, CachyOS7.3.6-1-cachyos, retail1.0.2.1,diagbuild):#994 + #177 + #454 + #1267(plus a localMIN_DYNAMIC = 1 << 18#747 test).buffer view not on an element of its host copywarning (offset=10561216 element=12) seen on our earlier#206run dropped to0.0x887A0006), and 0 kernel Xids/OOMs over ~4.5 min of active world rendering (up toframe=1443, median2,076draws/frame, before a silent title hang withVICTORY_NO_WATCHDOG=1).(Detailed A/B metrics posted in #1267 and #747. AI-assisted log summary; own retail copy, no game files or raw logs attached.)
@Marvisak on GitHub · 2026-11-25 00:35 UTC · original
Automated triage for the maintainers. Closing because this change is already in
main, ormainhas since replaced the code it patches.Follow-up to #986 (one aligned copy per range per list); main keeps one copy per view range held by its slot (shadow::exact).
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed