Fix D3D12 device removal on oversized constant buffer views #28
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/uiliannn--VItoriaBr!28
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/28/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?
@GAD15 on GitHub · 2026-11-25 15:57 UTC · original
GAD15:fix/constant-buffer-view-limit→main· +27 −1 · 2 files · 1 commits · merged 2026-11-25 16:49 UTCOn Windows 11 with an RTX 4060 Ti 8 GB, the release build reached the opening scene and then lost the D3D12 device with
DXGI_ERROR_INVALID_CALL. The descriptor batch logged immediately before removal included a constant buffer view of 1,087,744 bytes. D3D12 allows a shader to address at most 64 KiB through a CBV.This change caps the range used to mirror a constant buffer and the range copied into a dynamic descriptor table. It keeps the 256-byte host alignment and handles empty and null-address views without copying from them.
I rebuilt the release and ran the same game files on the same PC. The opening scene rendered past the point of the original device removal. The targeted regression test passed on Windows using the descriptor size from the failing run.
cargo test --release --locked -p victory-gpu --lib constant_view_from_world_load_fits_the_deviceRelated upstream report: Marvisak/VIctory#1640.