victory-gpu: skip repeated dynamic descriptor slot searches after failure #2394
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!2394
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2394"
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?
@bartikele on GitHub · 2026-11-25 12:40 UTC · original
bartikele:gpu-dynamic-slot-search-cache→main· +79 −12 · 1 files · 1 commits · openSummary
o_run (the smallest run size that failed to allocate since the last
elease) and per-frame ailed_walks inside HostHeap's DynamicSlots state (crates/victory-gpu/src/descriptor/host.rs).
slots fails, subsequent requests for >= n slots return None immediately until a
elease frees slots, and full failed walks are capped at 8 per presented frame (crate::queue::presented(), un-gated from diagnostics in crates/victory-gpu/src/queue.rs).
Inspired by Belobug's VIctory-Belobug-AMD (788ea46).
Verification
@qtLkz on GitHub · 2026-11-25 12:44 UTC · original
Tested on NVIDIA: RTX 4070 Ti (Ada), driver 621.01, Windows 11 Pro build 26300, Rust 1.98.1 pinned, base main
940d32f.cargo test -p victory-gpu --locked descriptor::host::tests -- --test-threads=1This PR alone: 5 passed, 1 failed, the same result you got.
dynamic_failed_search_is_cached_until_releaseanddynamic_search_can_find_a_run_across_the_cursorpass. The one failure is the pre-existing heap cap (dynamic_slots_are_held_until_released,NumDescriptors >= HEAP_VIEWSat host.rs:1526), which this PR does not cause.This PR merged on top of #2315 + #2322 (the NVIDIA heap-cap fix, see #2317): merges cleanly, 7/7 pass, including
dynamic_slots_are_held_until_releasedandthe_clamp_bound_fits_in_a_host_heap. So the new cached-failure logic also works with the clamped heap that NVIDIA gets.AI-assisted (Claude).
@bartikele on GitHub · 2026-11-25 13:25 UTC · original
Thank you @AndyLatimer for catching that! You're completely right — capping failed walks per frame would drop draws later in the same frame even after releases free the heap.
Updated gpu-dynamic-slot-search-cache with your upper-bound
o_run update on
elease:
elease, guard.no_run is updated to guard.no_run.max(left + (end - at) + right + 1) over the newly merged free run, keeping larger tables fast-failing when only small fragments are freed while immediately allowing tables that fit once enough contiguous slots are released.
Verified:
@Marvisak on GitHub · 2026-11-25 15:01 UTC · original · edited 2026-11-25 22:17 UTC
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main:mainhas moved since the last triage, and the branch now conflicts incrates/victory-gpu/src/descriptor/host.rs. It will be reviewed again once it is rebased onto currentmain.Previous verdict for this head: merge candidate.
Generated by Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.