Repository navigation
perf(gpu,hle): Phase 1-3 CPU & GPU pipeline optimizations (-45% frame time, -48% GPU list time) - #1053
Open
x0sman wants to merge 2 commits into
Open
perf(gpu,hle): Phase 1-3 CPU & GPU pipeline optimizations (-45% frame time, -48% GPU list time)#1053x0sman wants to merge 2 commits into
x0sman wants to merge 2 commits into
Conversation
…t time) Hardware-verified on RTX 5070 Laptop GPU (8 GB) in 95s 3D gameplay (0 crashes). Includes upstream PRs (#1677, fxceless#987, fxceless#188, fxceless#610) plus Phase 1-3 changes: - descriptor/host.rs: lock-free AtomicU64 + 64-striped slot_locks/kept in HostHeap::mirror - host.rs & queue.rs: victory-reaper background thread for COM/late-wait drops; Held::Present 2nd MPO plane support for VICTORY_ASYNC_PRESENT=1 - xmem.rs: XMemMapPhysicalPagesScatter single-lock hoisting, no-op skipping, exact 64 KiB placeholder fast path (preserving 64 KiB page independence) - shadow.rs: move D3D12 buffer allocations (shared_buffer, card_for, window_card_for, place_for) outside BUFFERS/LOOSE write locks - draw.rs, host.rs, indirect.rs, list.rs: 2-slot isolated indirect_window_scratch ring synced with draw::State::windows, remove post-clamp global UAV(None) barrier, use targeted uav_barrier_for(src/count) via UAV cleanliness tracking, default VICTORY_TEXTURE_STAGE_MB=48 Measured 1000 Hz profile (baseline -> Phase 3): - usual frame: 183.2 ms -> 102 ms (-45%) - GPU all other lists: 70.3 ms -> 36.4 ms (-48%) - GPU card busy: 47% -> 68% - shadow RwLock wait: 93.46 ms (P1+2) -> 0.00 ms (-100%) - execute_indirect: 167.05 ms (P1+2) -> 78.10 ms (-53%)
# Conflicts: # crates/victory-gpu/src/draw.rs # crates/victory-gpu/src/shadow.rs # crates/victory-gpu/src/watch.rs
|
Tried on one machine: RTX 3070 8 GB, 16 GB RAM, Series S profile. The tree was
Result: a 142 ms median against 144 and 155 ms for two runs without it. That is within this machine's run-to-run spread, so I could not see the −45 % here. Most of what the PR removes may already be gone on this tree with those switches. No errors. The xmem tests (25) pass. AI-assisted (Claude Code). No game data attached. |
ExoCalibra
added a commit
to ExoCalibra/victory-exo
that referenced
this pull request
Nov 25, 2026
…_mip, title_bytes)
PiloteCode
pushed a commit
to PiloteCode/victory-fork
that referenced
this pull request
Nov 25, 2026
VICTORY_SKIP_BINK=1 skips the movies that play once (the intro); VICTORY_SKIP_BINK=all also the looping ones. Unset, nothing changes. The title's own Bink DLL still opens each movie. The exports a player loop calls on an open movie (BinkWait, BinkDoFrame*, BinkNextFrame, BinkGoto, BinkShouldSkip, BinkClose) are bound to wrappers; on the first of these calls for a movie that is skipped, the movie is put on its last frame, and from then on nothing is decoded, so the title's own end-of-movie check ends it at once. Whether a movie loops is read from its open flags at that first call, after any BinkSetWillLoop. In a run of the title with VICTORY_SKIP_BINK=1, the one movie it opened (3840x2160, 450 frames, not looping) was skipped. The idea comes from XCL PR fxceless#1053 (xcl-dev/xcl); the code is written anew for VIctory's loader. Assisted-by: Claude Code (Claude Opus 5.5)
triippywhale
pushed a commit
to triippywhale/victory-fork
that referenced
this pull request
Nov 25, 2026
…ws are found under a shared lock (after fxceless fxceless#1053) A buffer's or a window's host copy was made (a committed buffer: a driver call of milliseconds) under BUFFERS' exclusive lock or LOOSE's mutex, and every ask outside a buffer took LOOSE's mutex even to find a window made long ago: the recording threads took turns. fxceless measured 93 ms of lock wait a frame gone with this part of fxceless#1053. - LOOSE is a read-write lock; an ask that finds its window shares it. - One maker at a time (MAKING_BUFFER, MAKING_WINDOW), so a copy is still made once; the host buffer is made under no lock of the tables. - In-place copies are still opened under the exclusive lock, where in_place_let_go takes them out. - A buffer the title gave up while its copy was made: the copy is retired and the ask is looked up once more. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017V7WBBU55HJVgqSgZRhMqc
triippywhale
pushed a commit
to triippywhale/victory-fork
that referenced
this pull request
Nov 25, 2026
…kes no lock (after fxceless fxceless#1053) HostHeap::mirror took the heap's one mutex for every descriptor a list bound, to find, nearly always, that the slot was made from the very record the title still has there. What each slot was made from is now also kept in an atomic per slot, published once the slot is written and its resource kept, and zeroed before a slot is made anew or made null: a look that finds its key there returns the view without the lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017V7WBBU55HJVgqSgZRhMqc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hardware-verified performance & stability optimizations for heavy D3D12 workloads (tested in 95s live 3D gameplay on RTX 5070 Laptop GPU 8 GB / 7,123 MiB VRAM budget, 0 crashes).