Repository navigation
Conversation
The #[global_allocator] registration carried no cfg, although its own doc comment says the counters are for diagnostics builds only. A plain release build therefore paid a thread-local lookup and an atomic add on every allocation and every release in the process, the title's own included. The counters are not at fault: they are banked 32 ways and the bank is #[repr(align(64))], so this was never false sharing, just the per-call cost. Measured on an RTX 3060 and an i7-9700 (8 cores, no SMT), Series S, DLSS performance, samples paired by draw count: 13.6% to 19.4% off the frame time across four draw bins, against 7.6% run-to-run noise. The submitting thread, the critical path there, went from 72.5 ms to 56.4 ms. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Tested merged on top of main. With the counting allocator registered only in diagnostics builds, |
|
Tested in a batch on an RTX 3080 Ti + Ryzen 7 5700X, 1440p, DLSS Quality, title ray tracing on (VICTORY_BVH_BUILDER=1), 240 s runs into the prison cell scene. Batch: #552, #550, #548, #547, #544. |
|
Independent desktop confirmation on Ryzen 7 9800X3D + NVIDIA RTX 5090 D (32 GB), Windows 11, (Full disclosure: this run paired Strict clean ticks (skipping first 5 ticks, excluding
Zero crashes, zero visual issues, and confirming Machad3x's note above that gating the two counting-allocator tests on |
Reuse upload scratch and filter unchanged graphics copies, reduce descriptor lock contention, and let safe constant-buffer transfers stay on the GPU. Keep the optional direct constant-buffer path behind F1. Stabilize static sampler order for reuse of the driver's shader pipelines. Expose DLSS Ultra Performance for Series X with the same ultrawide output and HUD. Ports selected changes from trustno1-coder#548, trustno1-coder#700, trustno1-coder#814, trustno1-coder#740, trustno1-coder#958 and fxceless/victory-fork@9e90746. The source bundle preserves the individual commits and credit.
|
Checked both reports against this PR's base, and the failure does not reproduce here — because this PR is a no-op on this repository.
#[cfg(all(windows, feature = "diagnostics"))]
mod copystat;That gate is present at Which makes the change itself inert. The Machad3x and Capt-Speed are both right about their own trees. Machad3x tested a merge of #552, #550, #548, #547, #544 and cites One thing worth re-checking before the batch numbers are used. Capt-Speed's run paired #548 with #542 ( Suggested disposition: close this PR, or repurpose it to carry the test gate for the trees that need it, with the no-op Unrelated, but seen in the same run — are these known failures on main? Both are live D3D12 |
The counting global allocator in
crates/victory-gpu/src/copystat.rsisregistered unconditionally, although its own doc comment says it is for
diagnostics builds only:
In a plain
--releasebuild every allocation and every release in theprocess therefore goes through
own()andbig().own()callsbank(),a thread-local lookup, and then an atomic
fetch_add.The counters themselves are fine: they are banked 32 ways and the bank is
#[repr(align(64))], so this is not false sharing. It is the per-call cost,paid on every
mallocand everyfreein the process, including thetitle's own.
Measurements
RTX 3060 12 GB, i7-9700 (8 cores, no SMT), 32 GB RAM, Windows 11,
GTA VI 1.0.2.1, Series S profile, DLSS performance. Nothing else differs
between the two runs.
The player respawned elsewhere between the runs, so the samples are paired
by draw count instead of compared raw:
Run-to-run noise on this machine is 7.6% (nine samples standing still, after
the shader preload had finished), so all four bins clear it. What makes the
result credible is less the size than the consistency across four different
draw loads.
The gain shows up where the mechanism predicts it. The submitting thread,
the critical path here, went from 72.5 ms to 56.4 ms per frame
(
preparing per frame, the submitting thread).For context on this machine: an
xperfsampled profile over 25 s ofgameplay puts the title's own image at 35.4% of the process, this
translation layer at 33.9%, and driver plus kernel at 30.7%.
The change
#[cfg(feature = "diagnostics")]on the registration, plus#[allow(dead_code)]onCountingso a plain release build stays quiet.The struct and its
GlobalAllocimpl stay compiled because the doc commenton
OWNlinks to [Counting].The feature chain already reaches this crate
(
apps/victory->victory-hle/diagnostics->victory-gpu/diagnostics),so
cargo build --profile diag -p victory --features diagnosticsstill getsthe counting allocator.
Both
cargo check --release -p victoryandcargo check -p victory --features diagnosticspass.🤖 Generated with Claude Code