Docs: ARCHITECTURE.md - module map, generated files, XCL_* variables #596

Open
Kaairim wants to merge 1 commit from upstream-pr/601 into main
Kaairim commented 2026-11-24 02:19:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kaairim on 2026-11-24T02:19:41Z.


HANDOFF.md is 1854 lines and the XCL_* variables are spread over doc comments. This adds a short map for new contributors; it rewrites nothing in HANDOFF.md or docs/specs/.

What is in it

  • docs/ARCHITECTURE.md (~190 lines): how xcl run works (launcher → host → loader → resolver → HLE → recompiler), a module map (console DLL → module → what it does → where its tests are), the generators in scripts/, the XCL_* variables for running and testing (each with the file that reads it), and where to start

Tested

  • Windows 11 (26300); docs only. Each module description comes from the module's own header comment, and the variables' meanings from the code that reads them (spot-checked: XCL_SPLIT_WAVE64, XCL_UMA_MB, XCL_DXIL_CACHE, XCL_LAZY_PSO, XCL_FRAME_DUMP, XCL_DUMP_SHADERS)
  • The two commands it shows were not run here (no Rust toolchain); they are the ones in AGENTS.md / README.md

Not tested

  • Whether the maintainer wants such a file under docs/ – happy to move or trim it

AI use

  • Claude Code with Claude Opus 5.5: found the gap while analysing the repository, wrote the change and this description; a second Claude Opus 5.5 agent reviewed the diff. I read every line.

Improvements by William "kaairim" Deivid (wdcore).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5464844312 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/601). Originally posted by [Kaairim](https://github.com/Kaairim) on 2026-11-24T02:19:41Z. --- HANDOFF.md is 1854 lines and the `XCL_*` variables are spread over doc comments. This adds a short map for new contributors; it rewrites nothing in HANDOFF.md or docs/specs/. **What is in it** - `docs/ARCHITECTURE.md` (~190 lines): how `xcl run` works (launcher → host → loader → resolver → HLE → recompiler), a module map (console DLL → module → what it does → where its tests are), the generators in `scripts/`, the `XCL_*` variables for running and testing (each with the file that reads it), and where to start **Tested** - Windows 11 (26300); docs only. Each module description comes from the module's own header comment, and the variables' meanings from the code that reads them (spot-checked: `XCL_SPLIT_WAVE64`, `XCL_UMA_MB`, `XCL_DXIL_CACHE`, `XCL_LAZY_PSO`, `XCL_FRAME_DUMP`, `XCL_DUMP_SHADERS`) - The two commands it shows were not run here (no Rust toolchain); they are the ones in AGENTS.md / README.md **Not tested** - Whether the maintainer wants such a file under docs/ – happy to move or trim it **AI use** - Claude Code with Claude Opus 5.5: found the gap while analysing the repository, wrote the change and this description; a second Claude Opus 5.5 agent reviewed the diff. I read every line. Improvements by William "kaairim" Deivid (wdcore). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DavidM1911 commented 2026-11-25 13:05:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T12:55:44Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7163050655 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/601#issuecomment-7163050655). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T12:55:44Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
RavenCurseBurg commented 2026-11-26 02:08:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-26T02:06:21Z.


Checked the map at d7c88b566f41d56b893aa077f82b8305caab6645 against both its own source tree and main b49be1836844. Using git ls-tree -r --name-only <rev> and git show <rev>:<path>, I resolved all 31 reader references for 28 environment variables, the four generator/output pairs and five relative Markdown link occurrences.

Six reader references point to tests/*.rs under the document's stated path convention. All four distinct files are actually in crates/xcl/tests/ on both revisions. The generator/output pairs and Markdown links resolved on both. I also checked the defaults in config.rs, host.rs and gpu/recomp/dxc.rs: automatic UMA is 4095 MiB for advanced title memory and 2048 otherwise, and the compile-thread setting is clamped to 1–64.

Documentation-only correction. After the edit all 31 referenced paths resolve and contain the quoted variable on both revisions. git diff --check passed. This was a source-reference check on Windows build 26100, i7-13700, Python 3.14.3. OpenAI Codex (GPT-6) wrote and ran the check and prepared the edit. Runtime behavior and the full test suite were not exercised.

<!-- greyfinch-sync:ivall/xcl:comment:7180464119 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/601#issuecomment-7180464119). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-26T02:06:21Z. --- Checked the map at `d7c88b566f41d56b893aa077f82b8305caab6645` against both its own source tree and main `b49be1836844`. Using `git ls-tree -r --name-only <rev>` and `git show <rev>:<path>`, I resolved all 31 reader references for 28 environment variables, the four generator/output pairs and five relative Markdown link occurrences. Six reader references point to `tests/*.rs` under the document's stated path convention. All four distinct files are actually in `crates/xcl/tests/` on both revisions. The generator/output pairs and Markdown links resolved on both. I also checked the defaults in `config.rs`, `host.rs` and `gpu/recomp/dxc.rs`: automatic UMA is 4095 MiB for advanced title memory and 2048 otherwise, and the compile-thread setting is clamped to 1–64. [Documentation-only correction](https://github.com/RavenCurseBurg/xcl/commit/2604439e1e53570d0b9f9be4bf2877f459bab64e). After the edit all 31 referenced paths resolve and contain the quoted variable on both revisions. `git diff --check` passed. This was a source-reference check on Windows build 26100, i7-13700, Python 3.14.3. OpenAI Codex (GPT-6) wrote and ran the check and prepared the edit. Runtime behavior and the full test suite were not exercised.
github-actions[bot] commented 2026-11-30 08:41:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:41:04Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7273213899 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/601#issuecomment-7273213899). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:41:04Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 03:47:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:47:49Z.


Triage (#1607) – head d7c88b5

No open or merged PR adds an architecture map; docs/ARCHITECTURE.md does not exist on main. The paths, generators and XCL_* variables it lists all exist on main.
It is already behind main in places: no entry for hle/bcpack/ and scripts/gen_bcpack_victory_tables.py (generated tables.rs), the direct DXIL backend in gpu/dxil/, or hle/d3d12x/build_queue.rs (pipeline worker priorities), and pso_async.rs is described as it was before those changes. Worth a refresh before merging.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7300071798 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/601#issuecomment-7300071798). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:47:49Z. --- **Triage (#1607)** – head d7c88b5 No open or merged PR adds an architecture map; docs/ARCHITECTURE.md does not exist on main. The paths, generators and XCL_* variables it lists all exist on main. It is already behind main in places: no entry for `hle/bcpack/` and `scripts/gen_bcpack_victory_tables.py` (generated `tables.rs`), the direct DXIL backend in `gpu/dxil/`, or `hle/d3d12x/build_queue.rs` (pipeline worker priorities), and `pso_async.rs` is described as it was before those changes. Worth a refresh before merging. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/601:upstream-pr/601'
git switch 'upstream-pr/601'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/601'
git switch 'upstream-pr/601'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/601'
git switch 'upstream-pr/601'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/601'
git switch 'main'
git merge --squash 'upstream-pr/601'
git switch 'main'
git merge --ff-only 'upstream-pr/601'
git switch 'main'
git merge 'upstream-pr/601'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
xcl-dev/xcl!596
No description provided.