victory-gpu: clear descriptor slot on CreateConstantBufferView null desc #562
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/Belobug--VIctory-Belobug-AMD!562
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-562"
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?
@SalmanBarkat on GitHub · 2026-11-27 11:30 UTC · original
SalmanBarkat:fix/create-cbv-null-desc→a-publier· +22 −4 · 1 files · 1 commits · openSummary
View::Constant(0, 0)increate_cbv()(crates/victory-gpu/src/descriptor.rs) whendescis null instead of skippingrecord()and leaving the previous view in the descriptor slot.View::Constant(0, 0)as a null constant buffer view.null_cbv_clears_a_stale_viewunit test verifying both a prior CBV and a prior SRV are cleared on a nullcreate_cbv.Verification
cargo clippy --workspace --all-targets --locked -- -D warnings(passed)cargo clippy --workspace --all-targets --all-features --locked -- -D warnings(passed)cargo test --locked -p victory-gpu descriptor::tests::null_cbv_clears_a_stale_view -- --exact --nocapture(1 passed, 0 failed)cargo test --locked -p victory-gpu --lib -- --test-threads=1(397 passed, 0 failed, 34 ignored)cargo test --locked -p victory-gpu --all-features --lib -- --test-threads=1(446 passed, 0 failed, 34 ignored)cargo test -p xtask --locked(9 passed, 0 failed)@lvndrpup on GitHub · 2026-11-27 12:54 UTC · original · reviewed
Tested on an RTX 3060 Ti (Windows 11, debug build), base
4eb6cfdagainst headd12ff1a.4eb6cfdd12ff1anull_cbv_clears_a_stale_view, copied onto baseConstant(0x1_0000_1000, 256)cargo test -p victory-gpu --lib descriptor::cargo test -p victory-gpu --lib, one rununchanged_ranges_are_known, the #534 race between tests, which #539 (and #382, #462) fix; nothing this PR touchescargo clippy -p victory-gpu --all-targets -- -D warnings, with and without--all-featuresThe host side needs no change, as the description says. Outside a table,
make_atfalls back tonull_forwhenshadow::find(0, 0)finds nothing. In a table (draw.rs:3621), the view becomes a 0-byte constant buffer view over scratch (constant_bytes(0)is 0), andcopy_mappedreturns early on the 0-byte fill. I didn't draw through either path.It conflicts with #549 only where both add a test at the end of
mod tests; keeping both resolves it. It merges cleanly with the other open PRs ondescriptor.rsthat still merge witha-publier(#578, #530, #471, #453, #62).@MamaLeVrai on GitHub · 2026-11-27 15:56 UTC · original
Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At
d12ff1a:victory-gpu397 passed, 0 failed, 34 ignored.AI-assisted (Claude Code); no game data.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.