D3D12.X: route sparse physical-page heaps through the L0 budget #3742

Open
jeroenhaentjens wants to merge 2 commits from upstream-pr/3742 into main
jeroenhaentjens commented 2026-12-02 23:40:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jeroenhaentjens on 2026-12-02T23:40:55Z.


What & Why

Stacked on #3740 at 2ff33838. Only the top commit belongs to #3742. With XCL_TEXTURE_BUDGET=1, buffer-only sparse physical-page heaps can spill to CUSTOM/L0 under local DXGI pressure. #3620 offers related routing through XCL_L0_VRAM_MARGIN_MB. This PR starts sparse spill at 80% of each adapter's local DXGI budget and shares #3740's physical RAM guard.

What is in it

  • Try L0 after the local segment reaches the adapter-relative threshold. XCL_BUDGET_L0_PHYS_HEAPS=0 selects normal local driver allocation. L0 admission refusal or recoverable creation failure also leaves the local path available.
  • Report active, free and retired sparse pools against the segment their heaps use.
  • Test the local driver fallback, native buffer-only heap flags and per-segment accounting.

Tested

  • Commit 1ec8a97051. Intel Core i7-9750H, NVIDIA Quadro RTX 3000 (driver 597.06 / 32.0.15.9706), Windows 11 25H2 build 26200.9974, Rust MSVC 1.100.0 and DXC 1.9.2609.5.
  • git diff --check passed. cargo test --locked --workspace -- --test-threads=4 reported 3017 passed, 0 failed, 52 ignored and 26 SKIPPED diagnostics. The log recorded 0 D3D12 Debug Layer validation warnings or errors during execution. The integration fixture emitted 8 live-object warnings at process shutdown. The command ran on d3bb128c60, which has the identical source tree.
  • The 60-second repository-owned smoke fixture checks startup and one present. The workspace suite ran with the unmodified repository test title.

Regression run

Baseline (main)

xcl-smoke v1
commit: 078358a058f7ba5d16690dba8dc4e55d2c88ae0a
gpu: NVIDIA Quadro RTX 3000
title: xcl-owned-test-fixture
seconds: 60
exit: 0x0
frames shown: 1 (PresentX 1)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 1379 MB

PR head

xcl-smoke v1
commit: 1ec8a97051eaa808df4986968bda42aacecad440
gpu: NVIDIA Quadro RTX 3000
title: xcl-owned-test-fixture
seconds: 60
exit: 0x0
frames shown: 1 (PresentX 1)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 1445 MB

Not tested

AMD, Intel discrete GPUs, Linux and retail titles.

AI use

OpenAI Codex (GPT-6, specific revision unavailable) assisted with the implementation, tests and PR update.

<!-- greyfinch-sync:ivall/xcl:issue:5616736557 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3742). Originally posted by [jeroenhaentjens](https://github.com/jeroenhaentjens) on 2026-12-02T23:40:55Z. --- **What & Why** Stacked on #3740 at 2ff33838. Only the top commit belongs to #3742. With XCL_TEXTURE_BUDGET=1, buffer-only sparse physical-page heaps can spill to CUSTOM/L0 under local DXGI pressure. #3620 offers related routing through XCL_L0_VRAM_MARGIN_MB. This PR starts sparse spill at 80% of each adapter's local DXGI budget and shares #3740's physical RAM guard. **What is in it** - Try L0 after the local segment reaches the adapter-relative threshold. XCL_BUDGET_L0_PHYS_HEAPS=0 selects normal local driver allocation. L0 admission refusal or recoverable creation failure also leaves the local path available. - Report active, free and retired sparse pools against the segment their heaps use. - Test the local driver fallback, native buffer-only heap flags and per-segment accounting. **Tested** - Commit 1ec8a97051eaa808df4986968bda42aacecad440. Intel Core i7-9750H, NVIDIA Quadro RTX 3000 (driver 597.06 / 32.0.15.9706), Windows 11 25H2 build 26200.9974, Rust MSVC 1.100.0 and DXC 1.9.2609.5. - git diff --check passed. cargo test --locked --workspace -- --test-threads=4 reported 3017 passed, 0 failed, 52 ignored and 26 SKIPPED diagnostics. The log recorded 0 D3D12 Debug Layer validation warnings or errors during execution. The integration fixture emitted 8 live-object warnings at process shutdown. The command ran on d3bb128c60de8f732a0637039ee90474bf67972c, which has the identical source tree. - The 60-second repository-owned smoke fixture checks startup and one present. The workspace suite ran with the unmodified repository test title. **Regression run** Baseline (main) ``` xcl-smoke v1 commit: 078358a058f7ba5d16690dba8dc4e55d2c88ae0a gpu: NVIDIA Quadro RTX 3000 title: xcl-owned-test-fixture seconds: 60 exit: 0x0 frames shown: 1 (PresentX 1) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 1379 MB ``` PR head ``` xcl-smoke v1 commit: 1ec8a97051eaa808df4986968bda42aacecad440 gpu: NVIDIA Quadro RTX 3000 title: xcl-owned-test-fixture seconds: 60 exit: 0x0 frames shown: 1 (PresentX 1) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 1445 MB ``` **Not tested** AMD, Intel discrete GPUs, Linux and retail titles. **AI use** OpenAI Codex (GPT-6, specific revision unavailable) assisted with the implementation, tests and PR update.
Foniass commented 2026-12-02 23:45:04 +00:00 (Migrated from github.com)

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


Review of b43a2e2f (code reading only, not a merge-check; draft) · 1 high, 2 medium, 2 nits

In short: This PR sends new buffer-only sparse tile pools through the XCL_TEXTURE_BUDGET=1 admission from #3740. A pool tries local memory under the soft cap first, then CUSTOM/L0, then local memory up to the DXGI budget minus 8 MiB. The memory report also lists L0 sparse pools separately. It is stacked on #3740 and needs its texture_budget.rs. The default path is unchanged. On the opt-in path, though, a sparse pool can now be refused where it used to be created, and XCL_BUDGET_L0_PHYS_HEAPS=0 does not undo that.

High

  1. The budget now refuses sparse tile pools, even with XCL_BUDGET_L0_PHYS_HEAPS=0.

    • physical_page_heap_with_budget (texture_budget.rs ~309) ends with sample.reserve(bytes, Admission::RequiredLocal) and returns E_OUTOFMEMORY once local usage plus outstanding reservations passes the budget minus 8 MiB.
    • Before this PR, State::take_tile (sparse.rs ~3565) always called CreateHeap, and going over budget meant WDDM demotion. Now take_tile returns None, and ensure_mapped stops at else { break } (~3892), leaving the title's committed pages with no video memory.
    • This happens whenever L0 is not admitted: routing off, the non-local budget used up, or free RAM under XCL_L0_MIN_FREE_PHYS_MIB. The README says =0 "keeps sparse backing local", but it also brings this new hard cap.

    Fix: when routing is off or L0 is refused, create the local heap as main does, or document the cap and what happens to the tiles. sparse_heap_can_use_local_reserve_after_l0_admission_denial currently asserts the refusal.

Medium

  1. "Under local pressure" means "above a fixed 4,000 MiB". The first check is Admission::Pool (texture_budget.rs ~288, limit ~31): XCL_TEXTURE_SOFT_CAP_MIB, or min(4000 MiB, budget - 1150 MiB). On a 12 or 16 GB card, every new sparse pool goes to system memory once the process uses about 4 GB, with several GB of budget left. These pools back the title's memory windows, not only sampled textures, and the smoke runs were on a 6 GB card only. Fix: give sparse pools a threshold relative to the budget, or measure on a larger card and fix the README wording.
  2. Overlaps #3620. #3620 changes the same code in State::take_tile: new sparse tile pools spill to CUSTOM/L0 under another opt-in (XCL_L0_VRAM_MARGIN_MB), which also handles retired L0 pools and heap priority. The two will conflict there and add two settings for the same job. One should be chosen, or the description should say how they relate.

Nit

  1. The description does not say which commit belongs here. The PR shows 574+/34- because it carries #3740's commit 3940fe383. Its own commit b43a2e2f7 is 193+/11-, under the target. Add "only the top commit belongs here" next to Stacked on #3740.
  2. The L0/local split in memory_bytes_for has no test. The existing test (sparse.rs ~9063) covers only memory_byte_counts. The per-heap split (~3155-3172) and the sparse L0 ... parts in memory_report.rs ~154 are not exercised.
Checked and fine
  • With XCL_TEXTURE_BUDGET unset, TextureBudget::sample returns None and physical_page_heap calls CreateHeap as before. memory_bytes_for returns the same local values, with zero for L0.
  • The sparse pool flags DENY_RT_DS_TEXTURES | DENY_NON_RT_DS_TEXTURES equal ALLOW_ONLY_BUFFERS, so the eligibility check matches the real pool.
  • The L0 descriptor keeps the buffer-only flags and size. Only E_INVALIDARG, E_OUTOFMEMORY, E_NOTIMPL and DXGI_ERROR_UNSUPPORTED fall back to local memory; device removal and other errors are returned.
  • A reservation is committed only after the heap is created, and dropped from the registry when creation fails.
  • In memory_bytes_for, the subtractions cannot underflow: the L0 counts are subsets of the same pools, read under one lock. The memory report moves L0 pools from Video to NonLocal, so nothing is counted twice.
  • Lock order is the sparse state lock, then RESERVATIONS, never the other way round.
  • The GPU fixture skips through runner::skip_test when there is no device, no discrete adapter, no L0 buffer heap, or too little RAM.
  • Independent of #3734. #3587 targets amd-dev and only lowers PARKED_MAX in sparse.rs.

Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7362379628 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3742#issuecomment-7362379628). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T23:45:04Z. --- **Review** of `b43a2e2f` (code reading only, not a merge-check; draft) · 1 high, 2 medium, 2 nits **In short:** This PR sends new buffer-only sparse tile pools through the `XCL_TEXTURE_BUDGET=1` admission from #3740. A pool tries local memory under the soft cap first, then CUSTOM/L0, then local memory up to the DXGI budget minus 8 MiB. The memory report also lists L0 sparse pools separately. It is stacked on #3740 and needs its `texture_budget.rs`. The default path is unchanged. On the opt-in path, though, a sparse pool can now be refused where it used to be created, and `XCL_BUDGET_L0_PHYS_HEAPS=0` does not undo that. #### High 1. **The budget now refuses sparse tile pools, even with `XCL_BUDGET_L0_PHYS_HEAPS=0`.** - `physical_page_heap_with_budget` (`texture_budget.rs` ~309) ends with `sample.reserve(bytes, Admission::RequiredLocal)` and returns `E_OUTOFMEMORY` once local usage plus outstanding reservations passes the budget minus 8 MiB. - Before this PR, `State::take_tile` (`sparse.rs` ~3565) always called `CreateHeap`, and going over budget meant WDDM demotion. Now `take_tile` returns `None`, and `ensure_mapped` stops at `else { break }` (~3892), leaving the title's committed pages with no video memory. - This happens whenever L0 is not admitted: routing off, the non-local budget used up, or free RAM under `XCL_L0_MIN_FREE_PHYS_MIB`. The README says `=0` "keeps sparse backing local", but it also brings this new hard cap. Fix: when routing is off or L0 is refused, create the local heap as `main` does, or document the cap and what happens to the tiles. `sparse_heap_can_use_local_reserve_after_l0_admission_denial` currently asserts the refusal. #### Medium 2. **"Under local pressure" means "above a fixed 4,000 MiB".** The first check is `Admission::Pool` (`texture_budget.rs` ~288, limit ~31): `XCL_TEXTURE_SOFT_CAP_MIB`, or `min(4000 MiB, budget - 1150 MiB)`. On a 12 or 16 GB card, every new sparse pool goes to system memory once the process uses about 4 GB, with several GB of budget left. These pools back the title's memory windows, not only sampled textures, and the smoke runs were on a 6 GB card only. Fix: give sparse pools a threshold relative to the budget, or measure on a larger card and fix the README wording. 3. **Overlaps #3620.** #3620 changes the same code in `State::take_tile`: new sparse tile pools spill to CUSTOM/L0 under another opt-in (`XCL_L0_VRAM_MARGIN_MB`), which also handles retired L0 pools and heap priority. The two will conflict there and add two settings for the same job. One should be chosen, or the description should say how they relate. #### Nit 4. **The description does not say which commit belongs here.** The PR shows 574+/34- because it carries #3740's commit `3940fe383`. Its own commit `b43a2e2f7` is 193+/11-, under the target. Add "only the top commit belongs here" next to `Stacked on #3740`. 5. **The L0/local split in `memory_bytes_for` has no test.** The existing test (`sparse.rs` ~9063) covers only `memory_byte_counts`. The per-heap split (~3155-3172) and the `sparse L0 ...` parts in `memory_report.rs` ~154 are not exercised. <details><summary>Checked and fine</summary> - With `XCL_TEXTURE_BUDGET` unset, `TextureBudget::sample` returns `None` and `physical_page_heap` calls `CreateHeap` as before. `memory_bytes_for` returns the same local values, with zero for L0. - The sparse pool flags `DENY_RT_DS_TEXTURES | DENY_NON_RT_DS_TEXTURES` equal `ALLOW_ONLY_BUFFERS`, so the eligibility check matches the real pool. - The L0 descriptor keeps the buffer-only flags and size. Only `E_INVALIDARG`, `E_OUTOFMEMORY`, `E_NOTIMPL` and `DXGI_ERROR_UNSUPPORTED` fall back to local memory; device removal and other errors are returned. - A reservation is committed only after the heap is created, and dropped from the registry when creation fails. - In `memory_bytes_for`, the subtractions cannot underflow: the L0 counts are subsets of the same pools, read under one lock. The memory report moves L0 pools from `Video` to `NonLocal`, so nothing is counted twice. - Lock order is the sparse state lock, then `RESERVATIONS`, never the other way round. - The GPU fixture skips through `runner::skip_test` when there is no device, no discrete adapter, no L0 buffer heap, or too little RAM. - Independent of #3734. #3587 targets `amd-dev` and only lowers `PARKED_MAX` in `sparse.rs`. </details> <sub>Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.</sub>
jeroenhaentjens commented 2026-12-03 07:53:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jeroenhaentjens on 2026-12-03T07:53:06Z.


@Foniass rebased on #3740 at 1a2bef6. Sparse L0 routing now starts at 80% of the local DXGI budget. Disabled routing, denied admission and recoverable L0 failures can use the normal local CreateHeap path. The new accounting test checks active, free and retired bytes in both segments. The verified results are in the PR description, which identifies the top commit and the overlap with #3620.

<!-- greyfinch-sync:ivall/xcl:comment:7371547621 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3742#issuecomment-7371547621). Originally posted by [jeroenhaentjens](https://github.com/jeroenhaentjens) on 2026-12-03T07:53:06Z. --- @Foniass rebased on #3740 at 1a2bef6. Sparse L0 routing now starts at 80% of the local DXGI budget. Disabled routing, denied admission and recoverable L0 failures can use the normal local CreateHeap path. The new accounting test checks active, free and retired bytes in both segments. The verified results are in the PR description, which identifies the top commit and the overlap with #3620.
Foniass commented 2026-12-03 07:55:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T07:55:17Z.


Follow-up review of f3e08c8f, since b43a2e2f (code reading only, not a merge-check) · 1 medium

In short: Stacked on #3740 at 1a2bef6; only the top commit f3e08c8f (+238/-11) belongs here, as the description now says. Since b43a2e2f:

  • a sparse pool that admission declines, or that routing is off for, now gets the driver's own local allocation instead of being refused;
  • the L0 spill starts at 80 % of the adapter's DXGI budget instead of a fixed 4,000 MiB;
  • the per-segment byte split has a test.

The overlap with #3620 is now named but not resolved. Nothing else blocks it.

Medium

  1. Overlaps #3620 (still open). The description now says #3620 offers a related spill route under XCL_L0_VRAM_MARGIN_MB and overlaps the pool allocator. Both still change State::take_tile and add two settings for the same job. One should be chosen, or one rebased on the other.
Checked and fine
  • Earlier finding fixed: with routing off (XCL_BUDGET_L0_PHYS_HEAPS=0), physical_page_heap_with_budget takes no sample and calls create with the original descriptor. With routing on, a declined RequiredLocal reservation no longer returns E_OUTOFMEMORY: the heap is created locally, and the reservation is committed only when there was one. The test now checks both routes give the driver the original descriptor once the reserve is full.
  • Earlier finding fixed: Admission::SparsePool is budget - budget / 5, capped at local, so a 12 or 16 GB card spills at 80 % of its budget, not at about 4 GB.
  • Earlier finding fixed: the description says only the top commit belongs here.
  • Earlier finding fixed: pool_bytes_by_segment is a pure function, and sparse_pool_bytes_split_active_free_and_retired_by_segment checks active, free and retired bytes for both segments.
  • Only E_INVALIDARG, E_OUTOFMEMORY, E_NOTIMPL and DXGI_ERROR_UNSUPPORTED from the L0 heap fall back to local memory; other errors are returned.
  • With XCL_TEXTURE_BUDGET unset, the default path is unchanged.

Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7371593003 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3742#issuecomment-7371593003). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-03T07:55:17Z. --- **Follow-up review** of `f3e08c8f`, since `b43a2e2f` (code reading only, not a merge-check) · 1 medium **In short:** Stacked on #3740 at `1a2bef6`; only the top commit `f3e08c8f` (+238/-11) belongs here, as the description now says. Since `b43a2e2f`: - a sparse pool that admission declines, or that routing is off for, now gets the driver's own local allocation instead of being refused; - the L0 spill starts at 80 % of the adapter's DXGI budget instead of a fixed 4,000 MiB; - the per-segment byte split has a test. The overlap with #3620 is now named but not resolved. Nothing else blocks it. #### Medium 1. **Overlaps #3620 (still open).** The description now says #3620 offers a related spill route under `XCL_L0_VRAM_MARGIN_MB` and overlaps the pool allocator. Both still change `State::take_tile` and add two settings for the same job. One should be chosen, or one rebased on the other. <details><summary>Checked and fine</summary> - Earlier finding fixed: with routing off (`XCL_BUDGET_L0_PHYS_HEAPS=0`), `physical_page_heap_with_budget` takes no sample and calls `create` with the original descriptor. With routing on, a declined `RequiredLocal` reservation no longer returns `E_OUTOFMEMORY`: the heap is created locally, and the reservation is committed only when there was one. The test now checks both routes give the driver the original descriptor once the reserve is full. - Earlier finding fixed: `Admission::SparsePool` is `budget - budget / 5`, capped at local, so a 12 or 16 GB card spills at 80 % of its budget, not at about 4 GB. - Earlier finding fixed: the description says only the top commit belongs here. - Earlier finding fixed: `pool_bytes_by_segment` is a pure function, and `sparse_pool_bytes_split_active_free_and_retired_by_segment` checks active, free and retired bytes for both segments. - Only `E_INVALIDARG`, `E_OUTOFMEMORY`, `E_NOTIMPL` and `DXGI_ERROR_UNSUPPORTED` from the L0 heap fall back to local memory; other errors are returned. - With `XCL_TEXTURE_BUDGET` unset, the default path is unchanged. </details> <sub>Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.</sub>
Foniass commented 2026-12-03 13:29:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T13:29:19Z.


Follow-up review of d3bb128c, since f3e08c8f (code reading only, not a merge-check) · 2 medium

In short: This push only rebases the top commit onto #3740's new head 2ff33838. The code in d3bb128c is the same as in f3e08c8f; only the README context around it changed. The overlap with #3620 is still open, and Tested now reports only two test modules, not the whole suite.

Medium

  1. Overlaps #3620 (still open). Both PRs change State::take_tile and add two settings for the same job: an L0 spill for sparse pools. Choose one, or rebase one on the other.
  2. The whole suite is not reported on this head. Tested gives only cargo test -p xcl --lib for hle::d3d12x::sparse::tests and hle::d3d12x::memory_report::tests (146 passed, 0 failed, 1 ignored). CONTRIBUTING.md asks for cargo test --workspace -- --test-threads=4 on a GPU, with the counts and the SKIPPED tests, on the head under review.
Checked and fine
  • The range-diff of the top commit has no code change, only README context. #3740's push changed allocate_pool in texture_budget.rs to fall back to create(false) when admission declines. That does not touch physical_page_heap_with_budget or the sparse-pool admission this commit adds, and the commit applies on it unchanged.
  • The earlier fixes still hold:
    • With routing off, the heap is created with the original descriptor.
    • A declined reservation gets a local heap instead of E_OUTOFMEMORY.
    • The spill starts at 80 % of the DXGI budget.
    • Only the four recoverable errors fall back to local memory.
  • Both smoke blocks are of main 078358a0 and of the head d3bb128c, with the same settings.

Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7379889590 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3742#issuecomment-7379889590). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-03T13:29:19Z. --- **Follow-up review** of `d3bb128c`, since `f3e08c8f` (code reading only, not a merge-check) · 2 medium **In short:** This push only rebases the top commit onto #3740's new head `2ff33838`. The code in `d3bb128c` is the same as in `f3e08c8f`; only the README context around it changed. The overlap with #3620 is still open, and **Tested** now reports only two test modules, not the whole suite. #### Medium 1. **Overlaps #3620 (still open).** Both PRs change `State::take_tile` and add two settings for the same job: an L0 spill for sparse pools. Choose one, or rebase one on the other. 2. **The whole suite is not reported on this head.** **Tested** gives only `cargo test -p xcl --lib` for `hle::d3d12x::sparse::tests` and `hle::d3d12x::memory_report::tests` (146 passed, 0 failed, 1 ignored). CONTRIBUTING.md asks for `cargo test --workspace -- --test-threads=4` on a GPU, with the counts and the SKIPPED tests, on the head under review. <details><summary>Checked and fine</summary> - The range-diff of the top commit has no code change, only README context. #3740's push changed `allocate_pool` in `texture_budget.rs` to fall back to `create(false)` when admission declines. That does not touch `physical_page_heap_with_budget` or the sparse-pool admission this commit adds, and the commit applies on it unchanged. - The earlier fixes still hold: - With routing off, the heap is created with the original descriptor. - A declined reservation gets a local heap instead of `E_OUTOFMEMORY`. - The spill starts at 80 % of the DXGI budget. - Only the four recoverable errors fall back to local memory. - Both smoke blocks are of `main` `078358a0` and of the head `d3bb128c`, with the same settings. </details> <sub>Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.</sub>
jeroenhaentjens commented 2026-12-03 14:56:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jeroenhaentjens on 2026-12-03T14:56:07Z.


@Foniass The Tested section now includes the full workspace result. The commit and PR description explain the relationship to #3620, including the TextureBudget opt-in, the 80% adapter-relative threshold and the shared physical RAM guard. The amendment changes the commit message and preserves the tested source tree.

<!-- greyfinch-sync:ivall/xcl:comment:7382281390 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3742#issuecomment-7382281390). Originally posted by [jeroenhaentjens](https://github.com/jeroenhaentjens) on 2026-12-03T14:56:07Z. --- @Foniass The Tested section now includes the full workspace result. The commit and PR description explain the relationship to #3620, including the TextureBudget opt-in, the 80% adapter-relative threshold and the shared physical RAM guard. The amendment changes the commit message and preserves the tested source tree.
Foniass commented 2026-12-03 14:57:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T14:57:22Z.


Follow-up review of 1ec8a970, since d3bb128c (code reading only, not a merge-check) · 2 medium

In short: The code in this push is unchanged: only the top commit's message changed, and it now says how this PR differs from #3620. Tested now gives the whole suite on this head, which fixes one earlier point. But the regression run changed. The two runs on a title with the opt-in on were replaced by runs of the repository's test fixture, which presents one frame and does not reach this code. The overlap with #3620 is still open.

Medium

  1. The regression run no longer runs a real title or the code this PR changes. At d3bb128c the description had two 60 s smoke runs of title 0ba91dcb with XCL_TEXTURE_BUDGET=1,XCL_BUDGET_L0_PHYS_HEAPS=1. Now both blocks are of xcl-owned-test-fixture, which shows 1 frame (presents per 2 s: 0 0 0), with no setting given. The new sparse-pool routing is behind XCL_TEXTURE_BUDGET, so these runs never reach it. CONTRIBUTING.md asks for the regression run on a real title. Put back a pair of runs on a title, made on main and on 1ec8a970, ideally one with the opt-in on, since that is the only path this PR changes.
  2. Overlaps #3620 (still open). The commit message now explains the difference: this PR uses the XCL_TEXTURE_BUDGET opt-in and 80 % of the DXGI budget, while #3620 uses XCL_L0_VRAM_MARGIN_MB. Both are still open, change State::take_tile, and add an L0 spill for sparse pools. One should be chosen, or one rebased on the other.
Checked and fine
  • Earlier finding fixed: Tested gives cargo test --workspace -- --test-threads=4 on 1ec8a970: 3017 passed, 0 failed, 52 ignored, 26 SKIPPED.
  • The range-diff of d3bb128c against 1ec8a970 has no code change, only the commit message. The earlier checks of the routing, the fallback and the 80 % threshold still hold.

Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7382316086 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3742#issuecomment-7382316086). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-03T14:57:22Z. --- **Follow-up review** of `1ec8a970`, since `d3bb128c` (code reading only, not a merge-check) · 2 medium **In short:** The code in this push is unchanged: only the top commit's message changed, and it now says how this PR differs from #3620. **Tested** now gives the whole suite on this head, which fixes one earlier point. But the regression run changed. The two runs on a title with the opt-in on were replaced by runs of the repository's test fixture, which presents one frame and does not reach this code. The overlap with #3620 is still open. #### Medium 1. **The regression run no longer runs a real title or the code this PR changes.** At `d3bb128c` the description had two 60 s smoke runs of title `0ba91dcb` with `XCL_TEXTURE_BUDGET=1,XCL_BUDGET_L0_PHYS_HEAPS=1`. Now both blocks are of `xcl-owned-test-fixture`, which shows 1 frame (`presents per 2 s: 0 0 0`), with no setting given. The new sparse-pool routing is behind `XCL_TEXTURE_BUDGET`, so these runs never reach it. CONTRIBUTING.md asks for the regression run on a real title. Put back a pair of runs on a title, made on `main` and on `1ec8a970`, ideally one with the opt-in on, since that is the only path this PR changes. 2. **Overlaps #3620 (still open).** The commit message now explains the difference: this PR uses the `XCL_TEXTURE_BUDGET` opt-in and 80 % of the DXGI budget, while #3620 uses `XCL_L0_VRAM_MARGIN_MB`. Both are still open, change `State::take_tile`, and add an L0 spill for sparse pools. One should be chosen, or one rebased on the other. <details><summary>Checked and fine</summary> - Earlier finding fixed: **Tested** gives `cargo test --workspace -- --test-threads=4` on `1ec8a970`: 3017 passed, 0 failed, 52 ignored, 26 SKIPPED. - The range-diff of `d3bb128c` against `1ec8a970` has no code change, only the commit message. The earlier checks of the routing, the fallback and the 80 % threshold still hold. </details> <sub>Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.</sub>
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/3742:upstream-pr/3742'
git switch 'upstream-pr/3742'

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