README: document XCL_RESIDENCY_PRIORITY #3570

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

Imported from ivall/xcl. Originally posted by romeawayfromhome-rgb on 2026-12-01T13:15:54Z.


Documents XCL_RESIDENCY_PRIORITY, the opt-in switch added with the residency-priority work merged in #3156 (head b2b1f109d27e746a62ec95b04dd1f9924452e682). The README had no mention of it.

What is in it

  • One bullet in README.md, after the XCL_TEXTURE_LEVEL_PAGES bullet: what XCL_RESIDENCY_PRIORITY=1 does, which heaps get HIGH, that the priority is set when a heap is made with nothing called per frame, that a failure is logged once and leaves the default, and that it is off by default with only 1 turning it on.

Tested

  • Docs only; no code changed. Wording verified against crates/xcl/src/hle/d3d12x/vram.rs at b2b1f109 (residency_priority_wanted, role_priority, pages_role, set_heap_priority) and the WindowPool call in crates/xcl/src/hle/d3d12x/sparse.rs: only a trimmed 1 enables it, render-target arenas, window tile pools and target page pools get HIGH, other texture pages keep the default, and a failure logs once.
  • Checked open PRs and issues for a duplicate: none found.

Regression run
Not needed: docs only (README.md), no runtime change.

Not tested

  • Not built or run: this change touches no code, and XCL builds on Windows only; it was prepared from a Linux VM with no Rust toolchain. Relying on CI for the description checks.

AI use

  • Muse (Muse Spark, Meta AI) prepared this docs change and PR text; the facts above were checked against the source at the head named.
<!-- greyfinch-sync:ivall/xcl:issue:5586458290 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3570). Originally posted by [romeawayfromhome-rgb](https://github.com/romeawayfromhome-rgb) on 2026-12-01T13:15:54Z. --- Documents `XCL_RESIDENCY_PRIORITY`, the opt-in switch added with the residency-priority work merged in #3156 (head `b2b1f109d27e746a62ec95b04dd1f9924452e682`). The README had no mention of it. **What is in it** - One bullet in README.md, after the `XCL_TEXTURE_LEVEL_PAGES` bullet: what `XCL_RESIDENCY_PRIORITY=1` does, which heaps get HIGH, that the priority is set when a heap is made with nothing called per frame, that a failure is logged once and leaves the default, and that it is off by default with only `1` turning it on. **Tested** - Docs only; no code changed. Wording verified against `crates/xcl/src/hle/d3d12x/vram.rs` at `b2b1f109` (`residency_priority_wanted`, `role_priority`, `pages_role`, `set_heap_priority`) and the `WindowPool` call in `crates/xcl/src/hle/d3d12x/sparse.rs`: only a trimmed `1` enables it, render-target arenas, window tile pools and target page pools get HIGH, other texture pages keep the default, and a failure logs once. - Checked open PRs and issues for a duplicate: none found. **Regression run** Not needed: docs only (README.md), no runtime change. **Not tested** - Not built or run: this change touches no code, and XCL builds on Windows only; it was prepared from a Linux VM with no Rust toolchain. Relying on CI for the description checks. **AI use** - Muse (Muse Spark, Meta AI) prepared this docs change and PR text; the facts above were checked against the source at the head named.
Foniass commented 2026-12-01 20:45:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T20:45:04Z.


Review (head 3c901562, diff read, not a merge-check; draft):

  • Overlaps #3582, which reverses the default. #3582 makes XCL_RESIDENCY_PRIORITY on unless it is 0 and adds its own README bullet for the same variable. Whichever merges second leaves two bullets, and if #3582 lands this bullet's "Off by default; only 1 turns it on" (README.md ~418) is wrong.
  • "Set when a heap is made" is not true for texture page pools. A page pool is created with HeapRole::TexturePages, which makes no call (vram.rs ~1684, ~1010). It is raised to HIGH only later by Pages::keep_pools (~2183, called from ~2486 and ~2616) when the pages of a render target, depth buffer or UAV texture are first bound into it, and stays HIGH until the slot is reclaimed (~1724). Only the arenas (~1070) and the window tile pools (sparse.rs ~3548) get their priority when they are made.

Fine: the enable check (a trimmed 1, read once), the roles that get HIGH (role_priority, gpu_owned covering RT/DS/UAV), the one-time failure warning and the absence of a per-frame call match vram.rs on main.

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

<!-- greyfinch-sync:ivall/xcl:comment:7325211331 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3570#issuecomment-7325211331). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T20:45:04Z. --- Review (head 3c901562, diff read, not a merge-check; draft): - **Overlaps #3582, which reverses the default.** #3582 makes `XCL_RESIDENCY_PRIORITY` on unless it is `0` and adds its own README bullet for the same variable. Whichever merges second leaves two bullets, and if #3582 lands this bullet's "Off by default; only `1` turns it on" (README.md ~418) is wrong. - **"Set when a heap is made" is not true for texture page pools.** A page pool is created with `HeapRole::TexturePages`, which makes no call (`vram.rs` ~1684, ~1010). It is raised to HIGH only later by `Pages::keep_pools` (~2183, called from ~2486 and ~2616) when the pages of a render target, depth buffer or UAV texture are first bound into it, and stays HIGH until the slot is reclaimed (~1724). Only the arenas (~1070) and the window tile pools (`sparse.rs` ~3548) get their priority when they are made. Fine: the enable check (a trimmed `1`, read once), the roles that get HIGH (`role_priority`, `gpu_owned` covering RT/DS/UAV), the one-time failure warning and the absence of a per-frame call match `vram.rs` on `main`. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
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/3570:upstream-pr/3570'
git switch 'upstream-pr/3570'

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