Docs: the GPU path, diagnosing GPU problems, and testing #1064

Closed
github-bot wants to merge 1 commit from gh-pr/1064/head into gh-pr/1064/base
Owner

@⁠Dufftwt on GitHub · 2026-11-24 15:25 UTC · original
Dufftwt:docs/gpu-memory-diagnosis-testing → main · +337 −1 · 4 files · 1 commits · closed without merging

What's missing

docs/ has the architecture overview and the asset policy. How the GPU side works lives in module docs across victory-gpu, and how to diagnose a GPU failure or test a change lives in issue threads. Testers keep rediscovering the same things there: which switch tells a never-ending loop from a refused pipeline, why a pipeline is refused on one card and not another, what the frame line's numbers mean, what CI runs, and how to test from Linux.

What this adds

  • docs/gpu.md: one submission from title memory to the host GPU and back. It covers host copies of buffers, textures and descriptor heaps, write watching and guarded views (including why kernel reads are announced), the refresh, snapshot, copy-back and completion order, how the title's ordering commands map to host barriers, pipelines made on first use by workers and kept in the library, wave sizes and loop limits in translated shaders, and indirect clamping. It points to the modules that hold the details.
  • docs/diagnosing-gpu-problems.md: how to read the 5-second frame line and the frame presented lines. Then step by step, with the switches the README already lists: a removed device or black screen (DRED, list timing, the loop-limit test, skipping a pipeline, WARP), a refused pipeline (the debug layer's reasons, including the 64-lane wave size refused by 32-lane GPUs, and victory translate --validate), a missing image (capture and target dumps), and a title crash. It ends with what a report should hold and what it must not (asset policy).
  • docs/testing.md: what tests skip without a GPU, dxil.dll or a console compiler, the process-wide state GPU tests share, the three commands CI runs, how to write a test for a fix (fails on main, deterministic races, synthetic data), and working from Linux (Clippy for the Windows target, Windows runs on a fork, Wine baselines).
  • README.md: links to the three, from the intro, Getting started and Debugging.

Everything describes main at ffe310e. I checked each statement against the code: log lines, thresholds (50 ms lists, 250 ms submissions), the loop limit, the wave-size rule in emit::lower, the barrier mapping in list.rs, the CI workflow, and the kernel-read callers.

Tests

  • cargo xtask policy: 157 files ok.
  • The relative links and their anchors resolve (../README.md#debugging, gpu.md#shaders, architecture.md#shaders, asset-policy.md).
  • Nothing from the game is in these files: no shader hashes, title offsets or game names.

Not covered: behavior that open PRs change. When one of them lands, the doc should follow: #1024 (copy-back writes), #1025 (announced kernel reads), #725 (glc coherence), #439 and #192 (wave64 on 32-lane hosts).

Related: #580 (contributor onboarding, CONTRIBUTING.md), #387 and #439 (docs for their own changes), #994 and #1011 (Linux run guides). None covers these topics.

**@⁠Dufftwt** on GitHub · 2026-11-24 15:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/1064) `Dufftwt:docs/gpu-memory-diagnosis-testing` → `main` · +337 −1 · 4 files · 1 commits · closed without merging ## What's missing `docs/` has the architecture overview and the asset policy. How the GPU side works lives in module docs across `victory-gpu`, and how to diagnose a GPU failure or test a change lives in issue threads. Testers keep rediscovering the same things there: which switch tells a never-ending loop from a refused pipeline, why a pipeline is refused on one card and not another, what the frame line's numbers mean, what CI runs, and how to test from Linux. ## What this adds - **`docs/gpu.md`**: one submission from title memory to the host GPU and back. It covers host copies of buffers, textures and descriptor heaps, write watching and guarded views (including why kernel reads are announced), the refresh, snapshot, copy-back and completion order, how the title's ordering commands map to host barriers, pipelines made on first use by workers and kept in the library, wave sizes and loop limits in translated shaders, and indirect clamping. It points to the modules that hold the details. - **`docs/diagnosing-gpu-problems.md`**: how to read the 5-second frame line and the `frame presented` lines. Then step by step, with the switches the README already lists: a removed device or black screen (DRED, list timing, the loop-limit test, skipping a pipeline, WARP), a refused pipeline (the debug layer's reasons, including the 64-lane wave size refused by 32-lane GPUs, and `victory translate --validate`), a missing image (capture and target dumps), and a title crash. It ends with what a report should hold and what it must not (asset policy). - **`docs/testing.md`**: what tests skip without a GPU, `dxil.dll` or a console compiler, the process-wide state GPU tests share, the three commands CI runs, how to write a test for a fix (fails on `main`, deterministic races, synthetic data), and working from Linux (Clippy for the Windows target, Windows runs on a fork, Wine baselines). - **`README.md`**: links to the three, from the intro, Getting started and Debugging. Everything describes `main` at `ffe310e`. I checked each statement against the code: log lines, thresholds (50 ms lists, 250 ms submissions), the loop limit, the wave-size rule in `emit::lower`, the barrier mapping in `list.rs`, the CI workflow, and the kernel-read callers. ## Tests - `cargo xtask policy`: 157 files ok. - The relative links and their anchors resolve (`../README.md#debugging`, `gpu.md#shaders`, `architecture.md#shaders`, `asset-policy.md`). - Nothing from the game is in these files: no shader hashes, title offsets or game names. **Not covered:** behavior that open PRs change. When one of them lands, the doc should follow: #1024 (copy-back writes), #1025 (announced kernel reads), #725 (`glc` coherence), #439 and #192 (wave64 on 32-lane hosts). Related: #580 (contributor onboarding, `CONTRIBUTING.md`), #387 and #439 (docs for their own changes), #994 and #1011 (Linux run guides). None covers these topics.
docs/gpu.md follows a submission from title memory to the host GPU and
back: host copies, write watching and guarded views, refresh, copy-back
and completion, how the title's ordering commands map to host barriers,
pipelines, shader wave sizes and loop limits, and indirect clamping.

docs/diagnosing-gpu-problems.md reads the frame line and walks through
a removed device, a refused pipeline, a missing image and a title crash
with the existing switches, and says what a report should hold.

docs/testing.md covers what tests skip, what CI runs, tests for fixes,
and working from Linux. The README links all three.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:18:43 +00:00
github-bot closed this pull request 2026-11-26 04:18:43 +00:00
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 16:30 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at dc134c3: cargo test --workspace passes, 342 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 16:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/1064#issuecomment-7137762773) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at dc134c3: `cargo test --workspace` passes, 342 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:31 UTC · original

Automated triage for the maintainers. Closing because it does not change behaviour the project needs (formatting, guards for cases that cannot occur, or notes and translations that cannot be kept current).

Three new docs pages (330 lines) describing how the GPU layer works and how to diagnose it: long design documentation, which the repo keeps out, and already stale against tonight's GPU changes.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 00:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/1064#issuecomment-7148593666) Automated triage for the maintainers. Closing because it does not change behaviour the project needs (formatting, guards for cases that cannot occur, or notes and translations that cannot be kept current). Three new docs pages (330 lines) describing how the GPU layer works and how to diagnose it: long design documentation, which the repo keeps out, and already stale against tonight's GPU changes. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1064
No description provided.