README: document XCL_TWO_PASS_MB #3555

Open
romeawayfromhome-rgb wants to merge 1 commit from upstream-pr/3555 into main
romeawayfromhome-rgb commented 2026-12-01 01:13:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by romeawayfromhome-rgb on 2026-12-01T01:13:34Z.


Documents XCL_TWO_PASS_MB, which the README did not mention. README-only change. No issue.

What is in it

  • README.md: one new bullet under "Switches for how a title runs", after the XCL_WAIT_TIMEOUT_MS / XCL_GPU_WAIT_TIMEOUT_MS bullet, stating that XCL_TWO_PASS_MB=n caps the two-pass buffers alive at once at n MiB and a draw whose buffer would pass the cap is skipped, and that unset or not a whole number the cap comes from the DXGI video-memory budget instead (1024 MiB when no budget is known).

Tested

  • Verified against crates/xcl/src/hle/d3d12x/bind.rs at main d0832e6: two_pass_cap() parses the trimmed value as whole MiB (mb * 1 MiB) and otherwise falls back to budget_two_pass_cap() over DXGI budget headroom, which returns 1024 MiB when the budget is unknown; refuse_two_pass() logs that a draw whose buffer would take the alive buffers past the cap is skipped. Confirmed the variable had no mention in README.md at that commit and searched open PRs/issues for a duplicate; none found.

Regression run
main: n/a (docs-only)
PR: n/a (docs-only)

Not tested

  • No local build or test run; README-only change. Windows build, cargo test --workspace, the GPU suite, and any retail title were not run.

AI use

  • AI-assisted (Muse Spark): read the code, checked for duplicate PRs, and prepared this docs change. No test results were produced by the tool.
<!-- greyfinch-sync:ivall/xcl:issue:5576876271 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3555). Originally posted by [romeawayfromhome-rgb](https://github.com/romeawayfromhome-rgb) on 2026-12-01T01:13:34Z. --- Documents `XCL_TWO_PASS_MB`, which the README did not mention. README-only change. No issue. **What is in it** - `README.md`: one new bullet under "Switches for how a title runs", after the `XCL_WAIT_TIMEOUT_MS` / `XCL_GPU_WAIT_TIMEOUT_MS` bullet, stating that `XCL_TWO_PASS_MB=n` caps the two-pass buffers alive at once at `n` MiB and a draw whose buffer would pass the cap is skipped, and that unset or not a whole number the cap comes from the DXGI video-memory budget instead (1024 MiB when no budget is known). **Tested** - Verified against `crates/xcl/src/hle/d3d12x/bind.rs` at main d0832e6: `two_pass_cap()` parses the trimmed value as whole MiB (`mb * 1 MiB`) and otherwise falls back to `budget_two_pass_cap()` over DXGI budget headroom, which returns 1024 MiB when the budget is unknown; `refuse_two_pass()` logs that a draw whose buffer would take the alive buffers past the cap is skipped. Confirmed the variable had no mention in README.md at that commit and searched open PRs/issues for a duplicate; none found. **Regression run** main: n/a (docs-only) PR: n/a (docs-only) **Not tested** - No local build or test run; README-only change. Windows build, `cargo test --workspace`, the GPU suite, and any retail title were not run. **AI use** - AI-assisted (Muse Spark): read the code, checked for duplicate PRs, and prepared this docs change. No test results were produced by the tool.
Foniass commented 2026-12-01 07:16:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:16:46Z.


Review (head a05aad71, diff read, not a merge-check; draft, docs only):

  • README line 361 is indented 6 spaces; the other continuation lines use 4.
  • "a draw whose buffer would pass the cap is skipped" leaves out that XCL first frees finished buffers, waits on in-flight fences and shrinks the record buffer (ensure_res_buffer_with_cap in bind.rs); only a draw that still doesn't fit is skipped. The unset case could say the cap is 25 % of the remaining video-memory budget, clamped between a 256-512 MiB floor and min(budget/4, 2 GiB) (budget_two_pass_cap).
  • Open draft #3165 would change what happens with the variable unset.

Fine: parsing (a trimmed whole number of MiB, otherwise the budget cap), the 1024 MiB fallback when no budget is known, no trailing whitespace, line lengths, and no other PR documents this variable.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7303861953 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3555#issuecomment-7303861953). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:16:46Z. --- Review (head a05aad71, diff read, not a merge-check; draft, docs only): - README line 361 is indented 6 spaces; the other continuation lines use 4. - "a draw whose buffer would pass the cap is skipped" leaves out that XCL first frees finished buffers, waits on in-flight fences and shrinks the record buffer (`ensure_res_buffer_with_cap` in `bind.rs`); only a draw that still doesn't fit is skipped. The unset case could say the cap is 25 % of the remaining video-memory budget, clamped between a 256-512 MiB floor and min(budget/4, 2 GiB) (`budget_two_pass_cap`). - Open draft #3165 would change what happens with the variable unset. Fine: parsing (a trimmed whole number of MiB, otherwise the budget cap), the 1024 MiB fallback when no budget is known, no trailing whitespace, line lengths, and no other PR documents this variable. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Foniass commented 2026-12-01 10:14:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T10:14:03Z.


Triage (#1607) – head a05aad7

No open or merged PR documents XCL_TWO_PASS_MB. The text matches two_pass_cap / budget_two_pass_cap in bind.rs: a whole number of MiB, and otherwise the DXGI budget (1024 MiB with no budget).
Nit: the second line of the entry is indented 6 spaces instead of 4 like the lines around it.
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:7307873309 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3555#issuecomment-7307873309). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T10:14:03Z. --- **Triage (#1607)** – head a05aad7 No open or merged PR documents `XCL_TWO_PASS_MB`. The text matches `two_pass_cap` / `budget_two_pass_cap` in `bind.rs`: a whole number of MiB, and otherwise the DXGI budget (1024 MiB with no budget). Nit: the second line of the entry is indented 6 spaces instead of 4 like the lines around it. 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/3555:upstream-pr/3555'
git switch 'upstream-pr/3555'

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/3555'
git switch 'upstream-pr/3555'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3555'
git switch 'upstream-pr/3555'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3555'
git switch 'main'
git merge --squash 'upstream-pr/3555'
git switch 'main'
git merge --ff-only 'upstream-pr/3555'
git switch 'main'
git merge 'upstream-pr/3555'
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!3555
No description provided.