GPU/HLE: pipelined startup reads and pooled small buffers, rebased onto main #2667
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!2667
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2667"
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?
@kais7654 on GitHub · 2026-11-25 17:46 UTC · original
kais7654:perf/startup-load-upstream→main· +1367 −99 · 8 files · 4 commits · openRebases #2427 by @imjustprism onto current main (
67e8ae1), authorship preservedcommit by commit. This carries the measured startup numbers of the original PR
forward:
(same bytes read; RX 9070 XT, game folder on a 7200 rpm drive, per the
original report on top of
940d32f).The rebase points:
placed.rs(pooled 16 MiB heaps for small shared buffers) coexists withmain's
placement.rs— main's is for textures, this one for CPU-mappedshared buffers;
Host::shared_bufferkeeps main's diagnostics GPU-uploadheap preference where a pool slot does not apply.
eddde73, "reads into physical pageswait for the title's Submit") is integrated into the overlap scheduler: an
explicit Submit releases the held reads, a queue that submitted itself
keeps its page reads held until then, and a moved read returns its count
for a per-read wake (
Scheduler::submit_and_wake).finish's now must-use return.The two narrow edges from the review's reading stand as written (the placed
resource's deferred teardown on a fast re-take;
dropped_flagsstaying asconservative as it is) — flagged for _
Local check: clippy --workspace --all-targets -D warnings with and without
--all-features; victory-hle 162/162 (28 dstorage tests including the held and
overlap suites), victory-gpu 207 passed (the two heap-cap failures that
#1943's fix owns), victory-shader 266 passed (the NVIDIA machine trio of
#2317).
@kotekompotek on GitHub · 2026-11-25 17:57 UTC · original
Note: this is the rebase of #2427 which I reviewed in depth earlier (files.rs buffered opens, dstorage overlapped reads + per-worker events + reused staging buffers, placed.rs small-buffer pool) — that review's analysis stands; the measured 49→21 s cold-launch figure came with honest methodology. Re-checking the rebase-specific hunks would still be worth a maintainer look, but the underlying design was verified.
@kais7654 on GitHub · 2026-11-25 18:26 UTC · original
Thanks @kotekompotek. For the maintainer's pass on the rebase-specific
hunks, these are the three places where the rebase touches more than
moving lines:
crates/victory-gpu/src/lib.rs—mod placed;(this PR's small sharedbuffers) now sits next to main's
mod placement;(wbkepler's texturepools). They do not share code;
Host::shared_bufferresolves the two— pool slot first, then the committed fallback with main's
diagnostics GPU-upload heap preference preserved (host.rs, the
#[cfg(feature = "diagnostics")] let heapblock inside the new&'static selfsignature).crates/victory-hle/src/modules/dstorage.rs— main's held queue(
eddde73) is integrated into the overlapped scheduler:submitreturnsthe read count for
submit_and_wake's per-read wake,submit_as(id, explicit)keeps main's semantics (an explicit Submit releases the heldreads, a self-submit leaves its page reads held, statuses behind a held
read wait with it). The two pre-existing test suites (held queue +
overlap) both pass on this merge, which was the intended proof.
The held-queue test adopts the overlapped
finish's now must-usereturn (
let _ = l.finish(...)), nothing else changed in tests.Everything else is a clean cherry-pick of d08323e^..d08323e with
imjustprism's authorship preserved per commit.
@fuzeofficlal on GitHub · 2026-11-25 18:37 UTC · original
Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP verification and code review of
df7cb800(on13f91ca):Verification (
rustc 1.98.1MSVC)cargo xtask policy: 185 files ok.cargo clippy --locked -p victory-gpu -p victory-hle --all-targets -- -D warnings: 0 warnings.cargo clippy --locked -p victory-gpu --all-targets --features diagnostics -- -D warnings: 0 warnings.cargo test --locked -p victory-hle --lib: 162 passed, 0 failed, 0 ignored.VICTORY_D3D12_WARP=1):cargo test --locked -p victory-gpu --features diagnostics --lib -- --test-threads=1-> 212 passed, 0 failed, 1 ignored (all 14 newplaced::testspass).cargo test --locked -p victory-gpu --features diagnostics --lib placed::tests -- --test-threads=1-> 14 passed, 0 failed (0.36s).victory-gpu --features diagnostics --lib -- --test-threads=1-> 210 passed, 2 failed, 1 ignored (1.93s). The only 2 failures are the pre-existing RTX 5090 1M view-heap cap baseline failures (#1744:dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views).Code Review Notes
dstorage.rs,files.rs): OverlappedReadFilewith per-worker manual-reset events,CancelIoEx+ volatileInternal == STATUS_PENDINGdrain on error,stagingstarvation wakeup (starved->notify_all),kernel_will_writeguard lifetime, anddropped_flagsscoping (CreateFileW,GENERIC_READ, non-overlapped only) all look sound.placed.rs,host.rs,shadow.rs): Leaf-lock discipline (Pool::slotsnever held across D3D12 heap/resource creation or drop), 64 KiB alignment andwrite_byteszeroing of[0..width_bytes.max(1)), and fence-deferred retirement viaID3DDestructionNotifierlook solid.crates/victory-gpu/src/host.rs:3230-3240):Host::shared_buffercallsself.small_buffers.buffer(width_bytes)before checking#[cfg(feature = "diagnostics")] self.copies_in_video_memory(), soVICTORY_COPIES_IN_VIDEO_MEMORY=1still places<= 64 KiBbuffers in the system-memoryWRITE_BACKpool instead ofGPU_UPLOAD. Checkingcopies_in_video_memory()first would keep that diagnostic switch consistent across all buffer sizes.dstorage.rsmerge ordering: touchesLanes::submit_as/Lanealongside #2617 (plain reads held behind a heldStatusfence).@Marvisak on GitHub · 2026-11-25 22:23 UTC · original
Automated triage for the maintainers.
Proposed close. This branch repackages #2427 (imjustprism's small-buffer pool, buffered pack opens in
files.rs, and the DirectStorage scheduling and overlapped reads indstorage.rs) as a new PR. #2427 is still open, merged cleanly intomainwhen it was last triaged, and its author is answering that triage. The triage on #2427 asked for the four changes to be split into separate PRs and for their relation to #1457 and #234 to be explained. This branch keeps them bundled, about 1,400 lines in one PR, so it does not address that and only adds a second copy to track. The rebase work aroundmain's held queue (submit_as/submit_and_wake) is better offered to imjustprism on #2427 or on the split PRs.This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the
triage: proposed closelabel.Generated by Claude Code
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.