GPU descriptor: write null CBV when create_cbv description is null #1574
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!1574
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1574/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?
@geiyiliyabumo on GitHub · 2026-11-24 19:22 UTC · original
geiyiliyabumo:fix/gpu-cbv-null-desc→main· +55 −12 · 2 files · 1 commits · closed without mergingSummary
Fixes
create_cbvsilently ignoring a nullD3D12_CONSTANT_BUFFER_VIEW_DESCpointer instead of overwriting the destination descriptor slot with a null CBV (tracking issue #1242,VIC-BT-016).Per the D3D12 specification,
ID3D12Device::CreateConstantBufferView(NULL, DestDescriptor)creates a null CBV descriptor, replacing any prior view atDestDescriptor. Previouslycreate_cbvskippedrecord(...)whendescwas null, leaving stale CBV/SRV/UAV entries active in CPU view tracking and host descriptor heaps.Changes
crates/victory-gpu/src/descriptor.rs: AddView::NullConstant(non-buffer) and record it increate_cbvwhendescis null, overwriting any prior view athandle. Add synthetic unit testnull_cbv_overwrites_an_existing_view.crates/victory-gpu/src/descriptor/host.rs: HandleView::NullConstantinmakeandnull_forvianull_cbv(CreateConstantBufferView(None, at)), clearing any previously retained host resource in that slot. Add live D3D12/WARP regression testnull_cbv_is_mirrored_without_a_buffer.Verification
cargo test -p victory-gpu --lib descriptor: 9/9 passed on AMD Radeon RX 9060 XT (RDNA4) and WARP (--features diagnostics).cargo clippy -p victory-gpu --all-targets -- -D warnings(default &--all-features): clean.cargo xtask policy: 154 files OK.AI-assisted; synthetic tests only, no game files.
@Marvisak on GitHub · 2026-11-25 00:42 UTC · original
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #1298. Same null-CBV-description fix as the smaller #1298, built on a host null CBV (CreateConstantBufferView) that no longer matches main, where constant buffers are raw views.
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