fix(gpu): never make a send buffer past D3D12's largest, 4 GiB - 64 KiB (#3532) #4149
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!4149
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4149"
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:49 UTC · original
t91a60:orchestrator/send-buffer/largest-send→main· +25 −2 · 1 files · 1 commits · closed without mergingWhat
#3994 (merged) took send buffers off powers of two:
made_for()doubles to 64 MiB, goes in 64 MiB steps to 256 MiB (BIG), and past that makes the buffer at the send's own size in 64 KiB steps.That last branch has no upper bound. A send in the last sliver before the limit therefore asks for a buffer of exactly 4 GiB, and D3D12's largest buffer is 4 GiB - 64 KiB. Per #3532, some cards/drivers kill the device on the attempt instead of refusing it.
Change
crates/victory-gpu/src/host/send.rs:MAX_SEND = (4 << 30) - (64 << 10).memory()answersNonewhenmade_for(size)would exceed it, before any buffer is asked for.host::card_beforethen takes the older upload path, as it does for any failed allocation.The 64 MiB-step rounding itself — the other half of #3532 — is already on
mainin #3994; this PR only adds the cap.Tests
a_send_past_the_largest_buffer_is_not_made_one:made_for()at the last sliver (4 GiB - 32 KiB → 4 GiB, above the cap), at the cap, and just past 2 GiB.Verification
UNVERIFIED — no Rust toolchain on the machine this was written on (
cargo,rustcandrustupare absent), so these were not run:One file, +25/−2, no new dependencies. CI should be the gate before merge.
Refs #3532.
@t91a60 on GitHub · 2026-11-30 16:57 UTC · original
Closing as superseded.
#3532 is already fixed on
mainby merged PR #3994. Incrates/victory-gpu/src/host/send.rs,made_for()no longer doubles pastSTEP: it goes in 64 MiB steps up toBIG(256 MiB), and past that makes the buffer at the send's own size in 64 KiB steps, with memory past 256 MiB never kept. That removes the 4 GiB request this PR was about before it can be made.The cap-only follow-up proposed here — a
MAX_SENDguard before a buffer is asked for — is not needed on top of that, so nothing from this branch is being carried forward.Thanks for the write-up and the test; the 4 GiB vs. 4 GiB - 64 KiB analysis is what pointed at the rounding half that #3994 addresses.
No code changes made; the branch is left as is.
Pull request closed