Repository navigation
Conversation
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 4367d6c on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (264 passed, 0 failed), and cargo check -p victory-gpu --features diagnostics is clean on this branch.
try_lockeverywhere is the right choice for a diagnostics sample: it never stalls the submission path, and a busy sample is skipped rather than reported as zero. It is gated ondiagnostics, so release builds are unchanged.- Interaction with #472: that PR removes
Last::read(one sharedSCRATCHbuffer replaces the per-texture vectors). On a branch with #472 merged, this PR merges without a textual conflict but no longer compiles:error[E0609]: no field read on type MutexGuard<'_, texture::Last>attexture.rs:82. If #472 lands first, the "texture read capacity" figure becomesSCRATCH's capacity, a single number rather than a sum. That is also exactly what #472 set out to measure.
Approving the change on current main. I have not merged it into our fork, which already has #472.
AI-assisted (Claude Code).
|
Independent verification & code review on Windows 11 Pro (build 26100) + AMD Radeon RX 9060 XT (RDNA4, driver
Diff review ( AI-assisted; synthetic tests only, no game files. |
|
Thanks both for verifying this on NVIDIA and AMD. The #472 interaction is useful to have recorded. #472 is still open, so the diagnostics remain based on the current layout. If #472 lands first, the texture-read sample will need to read the single SCRATCH capacity while retaining the non-blocking sample behavior. |
DenRakEiw
left a comment
There was a problem hiding this comment.
Tested merged cleanly onto main (ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC, NVIDIA RTX 5090):
cargo test -p victory-gpu --features diagnostics: 53 passed, 0 failed, 1 ignoredcargo clippy -p victory-gpu --features diagnostics --all-targets: 0 warningscargo xtask policy: ok
Clean, lightweight diagnostic addition reporting retained shadow buffer and texture staging memory in copystat. Approving.
AI-assisted (Gemini 4 Neon).
|
Thanks @DenRakEiw for testing the diagnostics configuration and running Clippy and the policy check. The #471 follow-up also confirms the counters can be sampled alongside #484. |
|
Additional Windows startup measurement with the retained-copy counters.
This corroborates the earlier loading-screen result on a 3060: the measured retained copy buffers explain only a small portion of the startup memory use. These samples do not cover the world or resources outside the counters. The diagnostics build, three watch tests, and asset policy check passed. AI-assisted. |
|
Updated the branch to main at 70564ae (head 380dab2). Texture uploads now belong to individual host textures, so the sampler tracks each staging allocation once through a weak reference. It counts allocations that remain live through an in-flight owner and skips busy samples without waiting. The upstream watch-lock and snapshot-rate lines remain present. Windows checks with and without diagnostics passed, and cargo xtask policy passed for 174 files. |
|
@Capi360 I reviewed your shared-read scratch measurement at For the GPU-HOST-MEMORY and FIND-2 claims, a matched current-main loading and world capture would help identify what still consumes memory and whether fallback hashing is material. If your authorized setup can collect it, please share aggregate process private bytes, system commit/headroom, adapter budget/usage, snapshot and texture capacity, and the existing texture refresh totals for watched, hashed and changed bytes by the same frame window. Aggregate measurements are sufficient. The old startup measurement is useful provenance. AI-assisted using Codex. The attribution composition also exposed an exact-view accounting error. A 456-byte view backed by a native buffer of width 512 was charged as 65,536 bytes. The current diagnostics package charges 512 and includes live exact-view overlap until its owner releases it. AMD and WARP reproduced the expected capacity and lifetime after correction. The package preserves #602's allocation-lifetime counters and #484's process counters. Resource width remains a separate quantity from driver allocation and residency. |
|
@Capi360 The validated patch is available as shared texture read scratch on your #602 head. This combines exact @Calvix2k If you can collect a matched run on the same authorized Windows 10 Series X and Agility/#1798 setup as your #175 report, the two revisions are attribution-only AI-assisted using Codex. |
|
@aycow Matched run, revision A = 1eab79c + Agility #175 + #1798 (diag build, VICTORY_MEMORY_STATS=1). Same authorized setup as the #175 report: Windows 10 22H2 19045, Ryzen 7 5800X, RX 7800 XT (driver 32.0.32029.2010), 32 GB, D3D12Core 1.620.2, same cache/data dirs, title �99f876b…. Bytes are decimal. Series X (--console series-x), pre-failure window — the run ends with Windows commit limit reached while committing 65536 bytes at frame ~130, title breakpoint +0x2474680:
Snapshot, list scratch and list upload were 0 in every sample; idle_snapshot_bytes 0. At the failure the system had ~1.8 GB of commit left, and Victory's own retained pools (shadow 0.63 GB, native textures 1.52 GB capacity / 0.14 GB used, staging ~4 KB) are small next to the process's 10.35 GB private. So the Series X failure here is the OS commit limit (C: pagefile cannot grow: 5.4 GB free), not one of the tracked pools. Series S, same revision, 20 samples over 57 s (last sample, frame 1655): Revision B = dac1953 is building now; I will post the same two windows for it next. No files or dumps. |
|
@aycow Matched run, revision B = dac1953 (attribution + shared scratch) + Agility #175 + #1798. Same machine, cache, data dirs, title and diagnostic profile as the revision A table above. Bytes are decimal. Series X (--console series-x) — same end: XMem … mapping physical pages failed … os error 1455 at frame ~142, then the title breakpoint +0x2474680:
*frame-0 line is the same startup sample in both revisions; I marked it with the A values because the run prints identical numbers there. Snapshot, list scratch and list upload were 0 in every sample. As with A, the tracked pools are small at the failure (shadow 0.72 GB, native 1.52 GB capacity / 0.14 GB used) and the last 64 KiB fails against the OS commit limit. Series S, revision B, 20 samples over 57 s (last sample, frame 1660): The one visible A→B difference in this boot window is the texture read/upload attribution: revision A's Series S sample showed texture upload 43,628,192 and texture read 43,421,696, while B shows 4 and 4,096 with the same frame count and window length. If that matches your expectation for shared scratch, the matched pair is here; if not, I can repeat both with a fixed frame window (VICTORY_CAPTURE_FRAMES-style stop at frame 1600) to remove the timing difference. |
|
Automated triage for the maintainers. Merge candidate. This adds a diagnostics-only One note: the PR description still mentions tracking uploads through weak references. This head no longer does that, so please update the description. CI ( Generated by Claude Code |
|
@lucaseddd I updated the existing #602 scratch handoff to @Calvix2k Thanks for the previous matched title runs. The Series S GPU upload gauge moved along with CPU scratch, so that sample cannot isolate the private-commit effect. If you have an authorized test slot, could you compare the current-main counter baseline and shared-scratch build? Use a diagnostics build with |
|
I'd keep shared detile scratch in #472. #602 can stay focused on counting what the bridge retains, including live GPU uploads. Keeping the allocation change separate also lets us compare private and system commit at matched frame tokens without treating a change in GPU upload retention as a CPU scratch savings. The synthetic result gives #472 a concrete regression target: shared CPU scratch with independent GPU uploads. |
When world loading approaches the system commit limit (#471), the process-wide number cannot show which retained GPU bridge allocations are growing. This adds a diagnostic line with three byte counters: idle shadow snapshots, live texture upload staging allocations, and retained CPU texture-read capacity.
The counters are independent of GPU vendor and VRAM size. Upload allocations are tracked once by allocation lifetime through weak references, so a diagnostic reference cannot keep an allocation alive. The sampler skips a busy sample and runs only with diagnostics enabled. The counters distinguish these components from overall private or system commit and do not change allocation policy.
Validated against main at 940d32f on Windows 10 x64:
cargo check --locked -p victory-gpu --features diagnosticscargo check --locked -p victory-gpucargo xtask policy(182 files)An earlier offline diagnostics run on an RTX 3060 Laptop collected 59 samples during loading. The last sample reported 53.5 MiB in texture uploads, 8 KiB of CPU read capacity, zero idle snapshots and about 11.9 GiB of process private memory. That run ended before a world frame, so it does not establish the cause of #471.