Fix D3D12 device removal on oversized constant buffer views #28
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/28"
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?
Imported from uiliannn/VItoriaBr. Originally posted by GAD15 on 2026-11-25T15:57:52Z.
On 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.