Repository navigation
Conversation
Independent Windows-target build check for the Mimalloc commandsMEASURED. I checked
A second agent independently checked the linked binaries, PDBs and feature graphs and reran the Wine smoke checks. CPU-only build and CLI smoke test using no game files. AI-assisted with OpenAI Codex. |
KelboLive
left a comment
There was a problem hiding this comment.
The commands are valid — mimalloc is a real opt-in feature (d3d12/apps/leonida/Cargo.toml:26-39, with default: [] in cargo metadata), so this is not a renamed-option bug and both edited commands run against existing features and profiles.
The reason is wrong, though, and that is the part that will be quoted:
- The only measurement in the tree is per-frame on the submitting thread — "a quarter of the submitting thread's running time was in the heap … the same view took 95 ms a frame against 78 with it" (
d3d12/scripts/build-nvidia.ps1:14-15) — not "the system-heap cost on every cold shader translation" (line 237). A repo-wide search forcold shaderfinds only your new line. Quote the measurement, or drop the mechanism;AGENTS.md:67-72asks exactly that of a D3D12 frame-rate claim. - The page says "Everything below this line is upstream VIctory's own README, unchanged" (
:158-159), and both of your edits are below that line. Either update that sentence or move the commands above it. - "Parity with
build-nvidia.ps1" is allocator-only: that script builds--profile diag --features diagnostics[,dlss],mimalloc(:16,:19,:25), whiled3d12/Cargo.toml:81/:88andd3d12/docs/replay.md:11still saydiagnosticsalone, andd3d12/README.md:403-404describes the same script without mimalloc. Say "the same allocator", or align those three places too (and note the script also passes--locked, which the edited commands do not). - "fxceless builds" in the title is shorthand for this page, not a build type — there is no
fxcelessfeature or target in anyCargo.toml. Fine as prose, but not as a build instruction.
Also: the branch is 262 commits behind main, so the "Based on current main" box is not true today; merge main in before this lands. Links and paths all resolve; the only style wart is that the new d3d12/scripts/... path is repo-root-relative in a page whose other links are doc-relative.
aslan2142
left a comment
There was a problem hiding this comment.
The --features mimalloc / --features diagnostics,mimalloc build commands themselves are valid, but requesting changes on two factual inaccuracies flagged by @KelboLive:
- Unmeasured performance rationale (
d3d12/docs/README-fxceless.md:235-237): The added text cites "avoid paying the system-heap cost on every cold shader translation", whereas the actual measured reason ind3d12/scripts/build-nvidia.ps1:14-15is per-frame heap overhead on the submitting thread ("a quarter of the submitting thread's running time was in the heap (profile of 2026-11-27), and the same view took 95 ms a frame against 78 with it"). PerAGENTS.md, please quote the measured basis rather than inventing an unmeasured mechanism. - Contradicts upstream-unchanged header (
d3d12/docs/README-fxceless.md:158-159): Both edits fall below the line stating "Everything below this line is upstream VIctory's own README, unchanged". Please either update that notice or document themimallocbuild commands above it.
(AI-assisted review.)
VERIFY-2755 — Linux, Fedora 45, Rust 1.98.1, no GPU device, no game filesVerdict: PASS. Every factual claim in the new text checks out against the code — the feature exists, the build script uses it, and it does change the allocator. One phrase in the rationale attributes the cost to something other than what the repository's own measurement says. Head 1. The changeTwo build commands in the archived upstream README gain cargo build --release -p leonida --features mimalloc
cargo build --profile diag -p leonida --features diagnostics,mimallocand the text above them says the feature "selects the process allocator used by the NVIDIA build path; keep it enabled for parity with 2. The feature exists, and it reaches the allocatorThe chain from the command line to the // With `mimalloc` the process allocates through mimalloc. On Windows with
// diagnostics, copystat's counting allocator wraps the same backend instead.
#[cfg(all(feature = "mimalloc", not(all(windows, feature = "diagnostics"))))]
#[global_allocator]
static HEAP: mimalloc::MiMalloc = mimalloc::MiMalloc;One thing worth checking, because the // crates/leonida-gpu/src/copystat.rs:392-395
#[cfg(feature = "mimalloc")]
const INNER: mimalloc::MiMalloc = mimalloc::MiMalloc;
#[cfg(not(feature = "mimalloc"))]
const INNER: std::alloc::System = std::alloc::System;So both build lines in the pull request do put mimalloc behind the process's allocations: the release build uses it directly, the 3. The parity claim holds
$features = 'diagnostics,mimalloc'
$features = 'diagnostics,dlss,mimalloc' # with the DLSS SDK
try { cargo build --locked --profile diag -p leonida --features $features } …and the 4. The repository's own measurement of the same thing
5. One phrase to reconsiderThe new text says the feature is worth having "to avoid paying the system-heap cost on every cold shader translation". The repository's own measurement does not say that: it attributes the heap cost to the submitting thread's running time and to a frame (95 ms against 78 ms) — not to the shader translation. The translation is not something the measurement isolates. The direction of the claim is right (the system heap is expensive here, and mimalloc is what the NVIDIA build uses), but the place the cost is attributed to is narrower than, and different from, what the repository measured. I would either say "on the submitting thread" as the script does, or leave the reason to the script's comment. 6. The document tests are greenThe repository has a documentation check suite, and this pull request changes a document: 7. What I did not check
AI-assisted: MiniMax M3.1 Flash. |
Claimed in the coordination issue as: DOCS-D3D12-MIMALLOC-BUILD
Depends on: none
Fixes: none
What and why
The fxceless runtime guide documented release and diagnostic builds without
mimalloc, while the maintained NVIDIA build script enables it. The commands now include the feature, and the guide explains the parity/performance reason so users do not accidentally choose the slower system allocator for cold shader translation.Tested
git diff --check— passed.python -I scripts/check_no_game_data.py d3d12/docs/README-fxceless.md— passed.GPUs tested: n/a.
AI-assisted: yes.
Checklist
mainand merges cleanly.