Design docs cited in the code are missing from the repo (decision 0003, decision 0007, TODO.md) #760

Open
opened 2026-11-26 04:13:56 +00:00 by github-bot · 3 comments
Owner

@⁠Conrage on GitHub · 2026-11-24 09:39 UTC · original

The code cites "decision 0007" 16 times and "decision 0003" 10 times (for example the module docs of crates/victory-gpu/src/texture.rs, shadow.rs and host.rs). crates/victory-hle/src/modules/display.rs:62 refers to "the presentation items in TODO.md". None of these files are in the repo. docs/ only has architecture.md and asset-policy.md.

Could they be published (for example under docs/decisions/, plus the TODO list)? Outside contributors could then see the intended design and the open work, which is what #732 asks for.

AI use: found and written with Claude from reading the code at 8e79c80; not run on hardware.

**@⁠Conrage** on GitHub · 2026-11-24 09:39 UTC · [original](https://github.com/Marvisak/VIctory/issues/760) The code cites "decision 0007" 16 times and "decision 0003" 10 times (for example the module docs of `crates/victory-gpu/src/texture.rs`, `shadow.rs` and `host.rs`). `crates/victory-hle/src/modules/display.rs:62` refers to "the presentation items in `TODO.md`". None of these files are in the repo. `docs/` only has `architecture.md` and `asset-policy.md`. Could they be published (for example under `docs/decisions/`, plus the TODO list)? Outside contributors could then see the intended design and the open work, which is what #732 asks for. _AI use: found and written with Claude from reading the code at `8e79c80`; not run on hardware._
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:13:56 +00:00
Author
Owner

@⁠Ingenioeren on GitHub · 2026-11-24 12:29 UTC · original

I checked the public tree at ffe310e. For anyone following those references, here are the source entry points that fill in the gaps in the current architecture guide:

These links could go directly in docs/architecture.md, with the HDR comment pointing back to a Presentation section.

AI-assisted source review. Verified paths and behavior against the linked revision.

**@⁠Ingenioeren** on GitHub · 2026-11-24 12:29 UTC · [original](https://github.com/Marvisak/VIctory/issues/760#issuecomment-7131507358) I checked the public tree at `ffe310e`. For anyone following those references, here are the source entry points that fill in the gaps in the current architecture guide: - **0003** — [DXIL emission and host bindings](https://github.com/Marvisak/VIctory/blob/ffe310eb2098e52169f4c44db5ffdabf43a72622/crates/victory-shader/src/emit/mod.rs) describes the bindings and wave-size requirements. [Shader cache](https://github.com/Marvisak/VIctory/blob/ffe310eb2098e52169f4c44db5ffdabf43a72622/crates/victory-gpu/src/shader_cache.rs) explains the cache key and invalidation. - **0007** — [Queue submission](https://github.com/Marvisak/VIctory/blob/ffe310eb2098e52169f4c44db5ffdabf43a72622/crates/victory-gpu/src/queue.rs) waits for the host work to finish. [Pipeline workers](https://github.com/Marvisak/VIctory/blob/ffe310eb2098e52169f4c44db5ffdabf43a72622/crates/victory-gpu/src/pipeline/make.rs) explain the per-frame wait budget and dropped work. [Buffer shadows](https://github.com/Marvisak/VIctory/blob/ffe310eb2098e52169f4c44db5ffdabf43a72622/crates/victory-gpu/src/shadow.rs) and [texture uploads](https://github.com/Marvisak/VIctory/blob/ffe310eb2098e52169f4c44db5ffdabf43a72622/crates/victory-gpu/src/texture.rs) describe the current copy and refresh limits. - **HDR TODO** — [Display API](https://github.com/Marvisak/VIctory/blob/ffe310eb2098e52169f4c44db5ffdabf43a72622/crates/victory-hle/src/modules/display.rs#L60-L67) records the immediate prerequisite in the source: HDR stays disabled until the host swap chain supports it. These links could go directly in `docs/architecture.md`, with the HDR comment pointing back to a Presentation section. _AI-assisted source review. Verified paths and behavior against the linked revision._
Author
Owner

@⁠studiostephe on GitHub · 2026-11-24 16:02 UTC · original

The decisions themselves are upstream's to publish, but the gap they leave can be closed from what is already in the repo: the module docs are the current record of each decision's shape.

Appended to docs/architecture.md (verified against ffe310e):

diff --git a/docs/architecture.md b/docs/architecture.md
index 4952df3..1f7d974 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -97,3 +97,35 @@ the lanes take, from structurisation), and accessed with a non-uniform heap
 index in one pass. `victory translate`
 runs every shader it finds (containers, SGD5 files) through these and
 lists what they cannot handle yet.
+
+The code cites two design documents, "decision 0003" (the shader
+translation) and "decision 0007" (the host GPU), which are not in the
+repo. Until they are, the module docs are the current record of each
+decision's shape:
+
+**0003 — shader translation** (`victory-shader`): the stages, in order,
+are SSA (`ir.rs`), control-flow structurisation without EXEC
+(`structure.rs`), I/O raising (`io.rs`), whole-wave sections (`emit/wave.rs`),
+lowering one machine instruction at a time (`emit/lower.rs`), resource
+tracking (`resource.rs`), and DXIL emission with the host bindings
+(`emit/mod.rs`). Translated shaders are kept on disk keyed by the
+container's content and the translator build that made them
+(`victory-gpu::shader_cache`).
+
+**0007 — host GPU** (`victory-gpu`): one device and a direct queue
+(`host.rs`, `queue.rs`), with every submission waited for. Title buffers
+get host copies whose read ranges are refreshed from title memory before
+each submission and whose written ranges go back after it
+(`shadow.rs`, write-watched in `watch.rs`); textures the title writes are
+detiled into their host copies when their content changed (`texture.rs`).
+Pipelines are made by workers, not by the title thread that first records
+a draw with them, within a per-frame wait budget; past it a draw is
+dropped, as an untranslated one is (`pipeline/make.rs`). Compiled host
+pipelines go into the host's pipeline library under the cache folder, and
+the title pipelines a run used are listed for early making on the next
+run (`pipeline/library.rs`).
+
+**Presentation** — HDR output is not done yet: `try_enable_hdr` answers
+"disabled" and the title renders SDR (`victory-hle::modules::display.rs`);
+it reports enabled, with the host display's luminance, once the swap chain
+can present HDR.

Every cited path and behavior was checked against the module doc headers at ffe310e; the commit is ef2d0b2 on a clean main (docs only, one file, +32). If the actual decision documents are published later, this section goes away in their favor.

qwen3.8_27b running locally on an M1 Mac

**@⁠studiostephe** on GitHub · 2026-11-24 16:02 UTC · [original](https://github.com/Marvisak/VIctory/issues/760#issuecomment-7137031521) The decisions themselves are upstream's to publish, but the gap they leave can be closed from what is already in the repo: the module docs are the current record of each decision's shape. Appended to `docs/architecture.md` (verified against `ffe310e`): ```diff diff --git a/docs/architecture.md b/docs/architecture.md index 4952df3..1f7d974 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -97,3 +97,35 @@ the lanes take, from structurisation), and accessed with a non-uniform heap index in one pass. `victory translate` runs every shader it finds (containers, SGD5 files) through these and lists what they cannot handle yet. + +The code cites two design documents, "decision 0003" (the shader +translation) and "decision 0007" (the host GPU), which are not in the +repo. Until they are, the module docs are the current record of each +decision's shape: + +**0003 — shader translation** (`victory-shader`): the stages, in order, +are SSA (`ir.rs`), control-flow structurisation without EXEC +(`structure.rs`), I/O raising (`io.rs`), whole-wave sections (`emit/wave.rs`), +lowering one machine instruction at a time (`emit/lower.rs`), resource +tracking (`resource.rs`), and DXIL emission with the host bindings +(`emit/mod.rs`). Translated shaders are kept on disk keyed by the +container's content and the translator build that made them +(`victory-gpu::shader_cache`). + +**0007 — host GPU** (`victory-gpu`): one device and a direct queue +(`host.rs`, `queue.rs`), with every submission waited for. Title buffers +get host copies whose read ranges are refreshed from title memory before +each submission and whose written ranges go back after it +(`shadow.rs`, write-watched in `watch.rs`); textures the title writes are +detiled into their host copies when their content changed (`texture.rs`). +Pipelines are made by workers, not by the title thread that first records +a draw with them, within a per-frame wait budget; past it a draw is +dropped, as an untranslated one is (`pipeline/make.rs`). Compiled host +pipelines go into the host's pipeline library under the cache folder, and +the title pipelines a run used are listed for early making on the next +run (`pipeline/library.rs`). + +**Presentation** — HDR output is not done yet: `try_enable_hdr` answers +"disabled" and the title renders SDR (`victory-hle::modules::display.rs`); +it reports enabled, with the host display's luminance, once the swap chain +can present HDR. ``` Every cited path and behavior was checked against the module doc headers at `ffe310e`; the commit is `ef2d0b2` on a clean `main` (docs only, one file, +32). If the actual decision documents are published later, this section goes away in their favor. qwen3.8_27b running locally on an M1 Mac
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:50 UTC · original

Automated triage for the maintainers.

Confirmed on main: the code cites "decision 0003", "decision 0005" and "decision 0007" in module docs across crates/victory-gpu and crates/victory-shader, and crates/victory-hle/src/modules/display.rs points at TODO.md, but docs/ holds only architecture.md and asset-policy.md, and there is no TODO.md. Whether to publish the decision records and the TODO list is up to the maintainers.

@⁠studiostephe's comment carries a patch that summarises the decisions in docs/architecture.md from the module docs. Pull requests are open to everyone, so please open one if you want it considered (it would be replaced if the real decision documents are published). Related: #732 (what work is open).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 03:50 UTC · [original](https://github.com/Marvisak/VIctory/issues/760#issuecomment-7152296315) <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-24T16:02:47Z at=2026-11-25T03:50:53Z --> Automated triage for the maintainers. Confirmed on `main`: the code cites "decision 0003", "decision 0005" and "decision 0007" in module docs across `crates/victory-gpu` and `crates/victory-shader`, and `crates/victory-hle/src/modules/display.rs` points at `TODO.md`, but `docs/` holds only `architecture.md` and `asset-policy.md`, and there is no `TODO.md`. Whether to publish the decision records and the TODO list is up to the maintainers. @⁠studiostephe's comment carries a patch that summarises the decisions in `docs/architecture.md` from the module docs. Pull requests are open to everyone, so please open one if you want it considered (it would be replaced if the real decision documents are published). Related: #732 (what work is open). --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
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#760
No description provided.