Descriptors: a null constant buffer view description writes a null view (port of Marvisak#2449) #646
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T02:39:26Z.
The 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.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Machad3x on 2026-11-28T03:20:23Z.
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.