Skip to content

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

Closed
Dufftwt wants to merge 1 commit into
Marvisak:mainfrom
Dufftwt:docs/gpu-memory-diagnosis-testing
Closed

Dufftwt wants to merge 1 commit into
Marvisak:mainfrom
Dufftwt:docs/gpu-memory-diagnosis-testing

Conversation

@Dufftwt

@Dufftwt Dufftwt commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

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.
@Zipettte

Copy link
Copy Markdown

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).

@Marvisak

Copy link
Copy Markdown
Owner

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 Marvisak closed this Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants