Restore bindless plan invalidation for writes #220
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!220
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-220"
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?
@KernelSmoker on GitHub · 2026-11-26 02:22 UTC · original
KernelSmoker:codex/fix-issue143-bindless-writes→main· +3 −7 · 1 files · 1 commits · openSummary
Restore write-range changes as a reason to rebuild the bindless plan. This covers both a slot changing its written range and a written slot disappearing, matching the pre-
705a2d0invalidation behavior implicated by the bisect in #143.Validation
cargo check --locked --offline --target x86_64-pc-windows-gnu -p victory-gpu --lib— passed (Windows GNU library compile check; compile evidence only).git diff --check— passed.@adrianmjim on GitHub · 2026-11-26 19:53 UTC · original
Tested on Windows 11 with an RX 7900 XT (RDNA3, driver 32.0.32029.2010), native build. Head
078c6b1, base4f62c2a. Other jobs were running on the machine, so timings are noisy. The game is not installed here, so this says nothing about whether #143 is fixed.What the change is:
705a2d0. It leaves out the other two files of705a2d0:current().VICTORY_AMBIENT_SKYor the live file is set.plan.writes. The only reader isBatch::prepare_bindless(src/host.rs:2953), behindif writes && cfg!(test). So in game this PR only changes when the plan is rebuilt.use_slot, up toWRITE_CAP). So base already rebuilds when a slot moves outside the plan's merged reads. The gated cases are:cfg!(test), andremakehas|| cfg!(test)(descriptor/host.rs:1989). So no ordinary test can tell them apart.Lib tests (
cargo test -p victory-gpu --lib, debug, 20 interleaved runs each):bindless_plan_is_remade_only_when_slots_changefailure (first.reads.len()was 0). PR: 15 ok, 5 singlewatch::testsfailures. As said above, the two test binaries behave the same.descriptor::alone: 16/16 in 10 runs on each side.Local test (not pushed): I made the
cfg!(test)sites inbindless_plan()switchable to release behaviour, with the same patch on both sides.Cost, same patch, release, 6 interleaved runs. Setup: 60,000 CBV slots plus 64 UAV slots inside the read memory. 4 UAV slots switch range every frame, for 64 frames.
This is a synthetic setup, not a game measurement. For comparison, the
705a2d0message reports 13-22 ms vs 2.4-5.4 ms a frame in game.Overlap with #199 (head
3469dd5):plan_dirty(). That function has its own(cfg!(test) && self.writes_dirty)(host.rs:854). With this PR's lines applied on #199, only theVICTORY_PLAN_REUSE=0path changes.plan_dirty()gate removed as well: 64 plan builds, all plans current, 136 us median per call in debug. For comparison, this PR alone is about 67 ms per call in debug.On #143:
rx9070xt(81ebb7b) shares no history with main. Its crates/ has noBindlessPlanorbindless_plancode, and its history never had any. So this block was not rewritten there; it never existed on that branch.Not tested: in game, RDNA4, the D3D12 debug layer, WARP, clippy. I can share the local test patch.
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.