Deep-dive architecture and subsystem documentation #10

Open
opened 2026-12-06 00:20:06 +00:00 by github-bot · 0 comments
Owner

@⁠VictoryX-dev on GitHub · 2026-12-03 02:57 UTC · original

Problem

docs/ARCHITECTURE.md gives contributors a high-level crate map and overview of the runtime, but several complex subsystems — especially the shader IR/structurizer pipeline (victory-shader), D3D12.X descriptor/write-watch invariants (victory-gpu) and virtual memory/section mapping (victory-hle::modules::xmem) — would benefit from focused deep-dive guides with sequence and state diagrams.

Known Evidence

  • Observed in repository:
    • victory-gpu alone spans dozens of modules (host.rs, shadow.rs, descriptor.rs, draw.rs, watch.rs, queue/behind.rs, list/thin.rs, texture.rs, residency.rs).
    • victory-shader implements SSA lifting (ir::build), EXEC-mask structurization (structure), waterfall-loop resource tracing (resource) and DXIL emission (emit).
    • Many critical invariants live only in scattered inline doc comments.
  • Engineering target: Lower onboarding time for new systems and graphics contributors from days to hours.

Approaches That Did Not Work

  • Copying raw internal session notes into public docs: Internal notes frequently mix preliminary hypotheses, unverified numbers and machine-specific paths. Public architecture docs must be derived directly from verified source code and explicitly separate measured facts from design targets.

Relevant Source Modules

  • docs/ARCHITECTURE.md
  • runtime/crates/victory-gpu/src/lib.rs
  • runtime/crates/victory-gpu/src/shadow.rs
  • runtime/crates/victory-gpu/src/descriptor.rs
  • runtime/crates/victory-gpu/src/queue/behind.rs
  • runtime/crates/victory-gpu/src/watch.rs
  • runtime/crates/victory-shader/src/lib.rs
  • runtime/crates/victory-hle/src/modules/xmem.rs
  • runtime/crates/victory-loader/src/lib.rs

Expected Contribution

  • Author focused subsystem guides under docs/ (for example, docs/SHADER_TRANSLATION.md, docs/MEMORY_AND_WATCH.md or docs/DESCRIPTOR_PUBLICATION.md) verified against the live Rust code.
  • Add clear state-transition and ownership diagrams (Mermaid flowchart / sequenceDiagram / stateDiagram-v2) documenting fence lifetimes, resource retirement and descriptor revisions.
  • Keep all documentation strictly title-neutral and compliant with the repository asset policy.

Acceptance Criteria

  • Every module path, struct name and invariant cited matches the current codebase.
  • All Mermaid diagrams render cleanly on GitHub light and dark themes.
  • Zero proprietary title, executable, SDK or machine-path references appear anywhere in the docs.
**@⁠VictoryX-dev** on GitHub · 2026-12-03 02:57 UTC · [original](https://github.com/VictoryX-dev/VictoryX/issues/10) ## Problem `docs/ARCHITECTURE.md` gives contributors a high-level crate map and overview of the runtime, but several complex subsystems — especially the shader IR/structurizer pipeline (`victory-shader`), D3D12.X descriptor/write-watch invariants (`victory-gpu`) and virtual memory/section mapping (`victory-hle::modules::xmem`) — would benefit from focused deep-dive guides with sequence and state diagrams. ## Known Evidence - **Observed in repository:** - `victory-gpu` alone spans dozens of modules (`host.rs`, `shadow.rs`, `descriptor.rs`, `draw.rs`, `watch.rs`, `queue/behind.rs`, `list/thin.rs`, `texture.rs`, `residency.rs`). - `victory-shader` implements SSA lifting (`ir::build`), EXEC-mask structurization (`structure`), waterfall-loop resource tracing (`resource`) and DXIL emission (`emit`). - Many critical invariants live only in scattered inline doc comments. - **Engineering target:** Lower onboarding time for new systems and graphics contributors from days to hours. ## Approaches That Did Not Work - **Copying raw internal session notes into public docs:** Internal notes frequently mix preliminary hypotheses, unverified numbers and machine-specific paths. Public architecture docs must be derived directly from verified source code and explicitly separate measured facts from design targets. ## Relevant Source Modules - `docs/ARCHITECTURE.md` - `runtime/crates/victory-gpu/src/lib.rs` - `runtime/crates/victory-gpu/src/shadow.rs` - `runtime/crates/victory-gpu/src/descriptor.rs` - `runtime/crates/victory-gpu/src/queue/behind.rs` - `runtime/crates/victory-gpu/src/watch.rs` - `runtime/crates/victory-shader/src/lib.rs` - `runtime/crates/victory-hle/src/modules/xmem.rs` - `runtime/crates/victory-loader/src/lib.rs` ## Expected Contribution - Author focused subsystem guides under `docs/` (for example, `docs/SHADER_TRANSLATION.md`, `docs/MEMORY_AND_WATCH.md` or `docs/DESCRIPTOR_PUBLICATION.md`) verified against the live Rust code. - Add clear state-transition and ownership diagrams (Mermaid `flowchart` / `sequenceDiagram` / `stateDiagram-v2`) documenting fence lifetimes, resource retirement and descriptor revisions. - Keep all documentation strictly title-neutral and compliant with the repository asset policy. ## Acceptance Criteria - [ ] Every module path, struct name and invariant cited matches the current codebase. - [ ] All Mermaid diagrams render cleanly on GitHub light and dark themes. - [ ] Zero proprietary title, executable, SDK or machine-path references appear anywhere in the docs.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-06 00:20:07 +00:00
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/VictoryX-dev--VictoryX#10
No description provided.