Repository navigation
perf(gpu): compose quick descriptor sync with disjoint spans - #689
Merged
pragyaangaur merged 7 commits intoNov 28, 2026
Merged
pragyaangaur merged 7 commits into
pragyaangaur merged 7 commits into
Conversation
Adapt VIctory-macOS pragyaangaur#538 (75efbe4) to the page-bucketed hulls from pragyaangaur#675. Revalidate the shadow lookup epoch before using a pre-resolved buffer or its descriptor template. Co-authored-by: gdemontalivet <guillaume@demontalivet.com>
GDemay
marked this pull request as ready for review
November 28, 2026 10:55
ZebeastSantaCruz83142069
added a commit
to ZebeastSantaCruz83142069/VIctory-macOS831
that referenced
this pull request
Nov 28, 2026
Upstream took pragyaangaur#688, pragyaangaur#689, pragyaangaur#694-pragyaangaur#697, pragyaangaur#700, pragyaangaur#701 and new loader and HLE switches overnight. Conflicts: - bindless.rs: our slot vector, net range counting and timing stay; upstream's pragyaangaur#701 fix lives in CopySpans and merged cleanly; its heap walk cache (VICTORY_HEAP_WALK_CACHE) joins our uploads walk. - host.rs: list steps timed upstream's way (refreshes and slots one in 16); prep phases counted in nanoseconds, the flight trace's per-thread phases too; the frame report keeps our uploads-by-step line and gains upstream's evicting line. - Our runs of table slots now ask VICTORY_SLOT_ONCE first, so upstream's switch reaches the batched path. - run.rs: VICTORY_PROFILE and VICTORY_GUARD_LOOKUP both start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Integrate gdemontalivet's quick descriptor synchronization (#538) with disjoint bindless spans (#675). This companion branch can be incorporated into #538. Both switches remain opt-in and work together, including with fast census.
Resolve eligible SRV and constant-buffer data once per unique page record before taking the heap's descriptor lock. Keep the existing template and page-read batching, validate live records and view generations, and retry quick results whose shadow topology changed. Preserve ordered span endpoints and interior-edit hull generation behavior. Retire displaced arena slices with the GPU work that can still read them.
Performance
Apple M5, 24 GiB, macOS 27.0 (26A428), CrossOver Wine 11.0 via Rosetta, D3DMetal 4.0 beta 3, rustc 1.98.1, Windows gnullvm release. Upstream baseline
5b57b119c5a134e05a8990b7ea7d9247d85f49d9; measured candidate578a18dfba33c418953075be8adfa0431e6aeb8a. Exact PR head39ef2c0807d1aebe059dc5fa1a5ad29ad84dc569adds test updates and formatting with the same production logic. A six-pair release confirmation on that head reduced the page median from 10.090 to 8.440 ms and the submission median from 23.625 to 20.834 ms.Both lanes enable disjoint spans and use main's fast batched sync. The candidate enables quick sync. Medians below are from 12 interleaved fresh-process samples per lane after two discarded warm-ups. The lock, copy and RSS rows use a separate five-sample diagnostic run per lane.
Complete-submission ranges were 22.838–24.802 ms and 19.489–21.751 ms. Heap-sync ranges were 10.298–11.512 ms and 7.775–8.124 ms. Page-benchmark ranges were 10.34–10.67 ms and 8.41–8.90 ms. With quick sync off and disjoint spans on, the candidate's page median was 10.535 ms. With both switches off the separate six-pair control was 10.480 → 10.575 ms (+0.9%).
Submission timing includes preparation, queue execution and the completion fence. Pipeline initialization, list recording and readback assertions are outside that interval. Quick view data is page-local and the bindless map lives with its heap. Peak RSS includes Wine and the backend, so it does not isolate retained registry memory. These synthetic workloads do not establish in-game performance.
Verification
The D3DMetal acceptance fixture writes tracked title heap records as bytes, submits compute through the production heap sync, and checks the GPU outputs. It also checks that the quick path published resolved records when enabled. The exact PR head passed all eight fresh-process combinations of quick sync, disjoint spans and fast census, plus quick off/on with gated early sync, totaling 84 dispatches and 924 checked dwords. Fresh-process checks of the separate
mapsandviewsmodes added 16 dispatches and 176 checked dwords. Coverage includes generation reuse, concurrent rewrites, raw/typed/structured/constant-buffer views, widened and aliased views, and texture and UAV fallbacks.Run the strict fixture from a configured checkout.
WINEDLLOVERRIDES='d3d12,d3d12core,dxgi=b' \ VICTORY_QUICK_SYNC=1 VICTORY_DISJOINT_SPANS=1 VICTORY_CENSUS_FAST=1 \ VICTORY_RAW_STRUCTURED=1 VICTORY_SYNC_FAST=1 VICTORY_PLACED_AT_ONCE=0 \ tools/macos/test-wine.sh --release --locked -p victory-gpu --lib \ descriptor::host::sync_acceptance::watched_descriptor_records_reach_gpu_readback \ -- --exact --ignored --nocapture --test-threads=1Set each of the first three switches to 0 and 1 in fresh processes for the matrix. For early sync add
VICTORY_FLIGHT1=1 VICTORY_SYNC_EARLY=1 VICTORY_PREP_AHEAD=0. Runbench_sync_slots_1_5m_fast_vs_legacyand use itsfastresult for page timing. Runbench_watched_descriptor_submissionswith--ignoredfor submission timing. Build both release test binaries first, then alternate without compiling during sampling.Exact-head local gates passed, including the native workspace (841 passed, 23 ignored), Windows-target Clippy with default and all features, the full Wine/D3DMetal workspace (705 passed and 31 ignored in the GPU unit suite), and the asset policy. The two ignored synthetic fixtures were run explicitly. The local DXGI probe did not enumerate a WARP adapter. Windows CI is the separate native Windows lane.
The exact head also passed the full GPU unit suite under Wine with quick sync, disjoint spans, and fast census enabled. The optional optimized GPU suite hit the same unrelated function-pointer identity assertion as optimized main, with quick sync both off and on. The required Wine workspace suite, the explicit optimized GPU readback fixture, and the optimized benchmarks passed.
Windows CI passed default Clippy, diagnostics Clippy, and workspace tests on the exact PR head.