fix(gpu): round send buffers in 64 MiB steps so a send over 2 GiB is not a 4 GiB buffer (#3532) #4135
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!4135
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/4135/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?
@t91a60 on GitHub · 2026-11-30 16:34 UTC · original
t91a60:orchestrator/send-buffer/round-64mib→main· +56 −4 · 1 files · 1 commits · closed without mergingWhat
send::memoryrounded every send buffer up to the next power of two, with an 8 MiB floor:A submission that sends a little over 2 GiB therefore took a 4 GiB buffer. Per #3532 some cards/drivers kill the device on the attempt (D3D12's largest buffer is 4 GiB - 64 KiB) instead of refusing it.
Change (
crates/victory-gpu/src/host/send.rs)MAX_SEND), the largest D3D12 makes. Rounding the top sliver would land on 4 GiB, so it takes the cap instead.None, the same answer a failed allocation gives today:host::card_beforethen falls back to the older upload path instead of asking the device for an impossible buffer.SPAREis still matched on the requested size (m.size >= size), so any spare at least that big is taken, and a 64 MiB step still finds the previous frame's buffer.Tests
Three unit tests added beside the code:
a_send_a_little_over_two_gib_is_not_made_a_four_gib_buffersend_buffers_round_up_in_steps_of_64_mib(never smaller than the request, always a step or the cap)a_send_past_the_largest_buffer_has_none_and_the_last_sliver_is_cappedVerification
UNVERIFIED — no Rust toolchain on the machine this was written on (
cargo,rustcandrustupare all absent), so these could not be run here:The diff is one file, 56 insertions and 4 deletions, with no new dependencies. Please let CI be the gate before merge.
Fixes #3532.
@t91a60 on GitHub · 2026-11-30 16:37 UTC · original
Closing as superseded:
mainalready has this fix.memory()no longer doubles past the small sizes. Incrates/victory-gpu/src/host/send.rsonmain,made_for()now:LEAST,STEP),BIG),That landed after this branch's base (
c71899d9) in1ecaa98a("Sends: ... made in 64 MiB steps past 64 MiB") and8b801739("... memory past 256 MiB is never kept").1ecaa98a's message names the same failure this PR was written for: "one of 2112 MiB at load at 4 GiB, which one upload buffer may not be." It is why this branch both conflicts and repeats the change.Issue #3532 was also closed as not planned by @trustno1-coder at 15:30 UTC on 2026-11-30, before this PR was opened (16:34 UTC).
No tests were run here: this machine has no Rust toolchain installed.
The branch
t91a60:orchestrator/send-buffer/round-64mibis left in place and can be deleted.Pull request closed