GPU: share one state-prelude allocator across host lists #3643
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3643"
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 Marvisak/VIctory. Originally posted by Luislariosss on 2026-11-28T01:48:08Z.
Every
HostListpreviously allocated and kept twoID3D12CommandAllocators: one for its own recording and one for its state prelude. Because state preludes only record at submission under the submission lock (one list at a time) andexecutewaits for each submission to finish before returning, all preludes can safely share a single allocator reset once per submission.Changes
Host.HostListprelude allocator, halving command-allocator memory across retained/idle lists.host::tests::the_prelude_allocator_resets_between_submissions_onlyverifying single reset per submission, list reuse, and multi-prelude execution.Verification
cargo xtask policy(191 files ok)cargo clippy -p victory-gpu --all-targets -- -D warnings(default and--features diagnostics)cargo test -p victory-gpu --lib host::(36/36) andlist::Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-28T03:13:58Z.
Independent WARP verification for #3643 by Gemini 4 Neon.
63bcca43c6a00a758510398fa43096ce7e4f7df0and PR head63f337ca8e1e432ab0fbc8ef94618ae89d9612f4merge cleanly (fast-forward) to tree4d860f0ce26d9550ef361d76c1fca14cd9a58b52.VICTORY_WARP=1andVICTORY_D3D12_WARP=1set. Thevictory-gputest process loadedd3d10warp.dll10.0.26100.9818(d3d12.dll/d3d12core.dll10.0.26100.9818), with Windows SDKdxil.dll1.8.2502.11onPATH(not loaded byvictory-gpuunit tests).victory-gpuunit tests (passed / failed / ignored) went from 231 / 0 / 1 on clean base to 232 / 0 / 1 on the merged tree (same ignored synthetic benchmarkobject::tests::benchmark_private_data_release), with doctests 0 / 0 / 0 on both. The newhost::tests::the_prelude_allocator_resets_between_submissions_onlytest passed (1 / 0 / 0), and--features diagnostics --lib host::passed (37 / 0 / 0).cargo clippy -p victory-gpu --tests -- -D warningsand--all-targets --features diagnostics -- -D warnings) andcargo xtask policy(191 files ok) passed.crates/victory-gpu/src/host.rsgrew from 181,915 to 192,180 bytes.crates/victory-gpu/src/host.rs. No blocking defects found:Host::executeholdsself.submittedfrom preparation through fence completion and only locksself.preludesduring sequential prelude recording (dropping it beforeExecuteCommandLists), preserving D3D12's single-recording-list and post-wait reset invariants including underdiagnosticsper-list timing groups; pooling distinct prelude lists per submission also avoids clobbering ifrunsrepeats aHostList. Non-blocking notes:Preludes::listdoes a redundantClose()+Reset()on newly created lists (legal, keeps a uniform path), and a test-only caught panic betweenpreludes.list()andlist.Close()would leave that list open. Pairwise merges with openhost.rsPRs#3641(31374faf) and#3644(c06688f1) both conflict incrates/victory-gpu/src/host.rs(shared test insertion point,Host/HostListfields, and constructors).Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-29T21:34:47Z.
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head
63f337c(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.the_prelude_allocator_resets_between_submissions_only.--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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.