victory-gpu: binary-search gone set and skip unused sort (NEW-493) #3566
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!3566
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3566"
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?
@cloph-dsp on GitHub · 2026-11-27 18:01 UTC · original
cloph-dsp:fix/new493-gone-set→main· +23 −3 · 2 files · 1 commits · openDepends on: #1633
Claim: NEW-493 (original claim by @borosf; PR #3250 closed unmerged on 2026-11-27, so the item is free under the board rule).
This re-applies the two small CPU-side optimizations from the closed PR with a focused regression test.
crates/victory-gpu/src/descriptor/host.rs:HostHeap::evictcollects the gone pointers into aVec<usize>, sorts it once per call, and usesbinary_searchinstead of aHashSet::containsprobe for each kept slot.crates/victory-gpu/src/resource.rs:choosereturns the idle set immediately whenoveris already 0, skipping therest.sort_by_keythat only feeds the least-recently-used pick.resource::tests::choose_keeps_only_idle_when_nothing_is_over_budgetto pin the no-over-budget result.Validation (Windows, Rust 1.100.0/MSVC, per-worktree
CARGO_TARGET_DIR=D:\Victory-Contrib\target-new493):cargo test --locked -p victory-gpu --lib -- resource::tests::choose_keeps_only_idle_when_nothing_is_over_budget --exact --test-threads=1 --quiet→ 1 passed, 0 failed, 232 filtered, exit 0.git diff --check HEAD→ exit 0.AI-assisted: Hy4 flash. GPU/driver: N/A (CPU-only paths). No game data, assets, extracted shaders or DRM involved.
@oni-swr on GitHub · 2026-11-27 18:27 UTC · original
Independent verification of #3566 at head
dbf9a004ef6b2e3d58b54aa8fa4209e4b032e9bd, base63bcca43c6a00a758510398fa43096ce7e4f7df0. AI-assisted: verification by Claude Code (Claude Sonnet 5.5).Environment: Windows 11 build 26200, WARP d3d10warp.dll 10.0.26100.9818 (no physical GPU),
VICTORY_WARP=1andVICTORY_D3D12_WARP=1, Windows SDK 10.0.26100 dxil.dll.Ran
cargo test -p victory-gpu --lib --features diagnostics --locked -- --test-threads=1:choose_keeps_only_idle_when_nothing_is_over_budget)cargo clippy -p victory-gpu --all-targets --features diagnostics --locked -- -D warnings: clean on base and on headControl: the new test also passes on base (1 passed, 0 failed). That is expected, because both changes keep the behaviour. It pins the
over == 0result but is not a regression test, so it cannot fail on base.Review: no correctness problem found. In
choosethe early return atresource.rs:1669gives the same result as before, since the old loop broke immediately whenover == 0. InHostHeap::evictthe sortedVecwithbinary_searchhas the same membership semantics as theHashSet, and the sort happens once per call. I did not measure the speed-up. WARP has no real descriptor or texture load, so the performance claim is untested here.@futurepro62 on GitHub · 2026-11-27 22:04 UTC · original
NVIDIA full-suite run, to go with the reports above by oni-swr, since none of them names a GPU run. Tested exact head
dbf9a00(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 867 passed, 0 failed, 10 ignored.choose_keeps_only_idle_when_nothing_is_over_budget.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
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.