Descriptors: a null constant buffer view description writes a null view (port of Marvisak#2449) #646
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!646
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-646"
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?
@kibagami-nc on GitHub · 2026-11-28 02:39 UTC · original
kibagami-nc:fix/null-cbv-clears-the-slot→main· +27 −4 · 1 files · 1 commits · merged 2026-11-29 08:16 UTCThe problem
When the title passes a null description,
create_cbv(crates/victory-gpu/src/descriptor.rs) leaves the slot as it was. The view written there before stays live, and its host slot keeps showing it.D3D12's
CreateConstantBufferViewwith a nullpDescwrites a null view. A title that clears a slot this way and later reads it through an index gets the old buffer.The change
A null description records
View::Constant(0, 0). The host already makes such a view as a null view:shadow::find(0, 0)finds no host copy, somake_twinnedgivesNone;make_atand the mirror then writenull_for(a null buffer view).This is a port of makmatvey's fix (Marvisak/VIctory#2449, VIC-BT-016 in Marvisak/VIctory#1242), adapted to this tree.
Tests
descriptor::tests::a_null_cbv_clears_the_view_there_before. It covers a null CBV after a CBV and after an SRV in the same slot. Before the change it fails, because the oldConstant(0x1_0000_1000, 256)is still read.descriptor::tests: 13 passed.cargo test -p victory-gpu --locked --lib: 442 passed. The 2 failures were the indirect tests that then failed onmain;mainhas fixed them since (9b712a6).cargo clippy -p victory-gpu --all-targets -- -D warnings: nothing indescriptor.rs. It still stops on the dead-code lintsmainhas.Checked by others
Machad3x (Windows 11, RTX 3080 Ti 12 GB, Ryzen 7 5700X) ran this with three other changes on their NVIDIA base: Series X, the title's ray tracing on, 240 s.
No game files, dumps or extracted data are included.
@Machad3x on GitHub · 2026-11-28 03:20 UTC · original
Tested on Windows 11, RTX 3080 Ti 12 GB, Ryzen 7 5700X, Series X profile, title ray tracing on, 240 s run (cherry-picked onto our NVIDIA base with three other changes).
Kept.