lanes: pin the descriptor limit the reclaim self-test counts on #178

Manually merged
github merged 1 commit from gh-pr/178/head into gh-pr/178/base 2026-11-26 06:36:39 +00:00
Owner

@⁠3kynox on GitHub · 2026-11-25 16:37 UTC · original
3kynox:pr-reclaim-selftest-limit → main · +8 −1 · 1 files · 1 commits · merged 2026-11-25 17:58 UTC

Summary

lanes-selftest-descriptor-reclaim (#172) fails on main on this host:

lanes-selftest FAIL descriptor-reclaim: expected E_OUTOFMEMORY on unsubmitted pin overflow, got 0x00000000

The scenario counts on a resident limit of 1,000,000 descriptors. Its last step pins 63 tables of 16,384 descriptors (1,032,192) in open lists and expects Close() to return E_OUTOFMEMORY. CreateDescriptorHeap uses the host's MaxViewDescriptorHeapSize when that is above 1,000,000 (runtime/d3d12/src/device/resources.rs). On such a host the 63 tables fit and nothing overflows.

The provider already has a cap for the resident limit, TUXBOX_DESCRIPTOR_HEAP_LIMIT, read when the heap is created. The scenario now sets it to 1,000,000 around its own CreateDescriptorHeap call and clears it afterwards. It then pages the same way on every host, and a later scenario in the same process (--selftest all) is not affected.

What I saw on this host, with main at 9ca0060:

  • the scenario fails with the line above;
  • with TUXBOX_DESCRIPTOR_HEAP_LIMIT=1000000 exported it passes;
  • with this change it passes without the variable.

I have not read the value this host reports for MaxViewDescriptorHeapSize. The three results above are what points at it.

Verified on Lanes

  • python tuxbox.py check passed on this branch
  • Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below

The scenario is descriptor-reclaim itself: on this host it fails without the change and passes with it.

GPU, driver and backend: NVIDIA GeForce RTX 4070 Ti SUPER (10de:2705), driver 595.112.07, Proton Experimental 11.0-20261112. NixOS, Linux 7.2.11, Intel Core i9-12900K, Hyprland (Wayland).

Summary
  passed   Build the shader compiler (10s)
  passed   Python tests (5s)
  passed   Shader compiler tests (4s)
  passed   DXBC tests (1s)
  passed   XG layout tests (1s)
  passed   D3D12 Windows typecheck (1s)
  passed   Build (33s)
  passed   Lanes and fixtures on the GPU (262s)
  passed   D3D12 regression controls (103s)
  passed   Shader translator on the GPU (262s)

All checks passed.

The check ran on this commit (on 7b22d71) with --proton, --prefix and --windows-dxc (Microsoft's x64 DXC 1.8.2505.1): 64 of 64 guest checks and all 17 regression cases pass. Without the change that scenario fails on this base too: it is the one failure in the check of #177.

Checks

  • No Rust code changed. The unit tests and the Windows typecheck are in the summary above.
  • lanes-xbox-replay still passes its import check: SetEnvironmentVariableW resolves to a Windows core API set, so Lanes stays inside its Xbox title profile.

No evidence JSON changed.

**@⁠3kynox** on GitHub · 2026-11-25 16:37 UTC · [original](https://github.com/brcly/TuxBox/pull/178) `3kynox:pr-reclaim-selftest-limit` → `main` · +8 −1 · 1 files · 1 commits · merged 2026-11-25 17:58 UTC ## Summary `lanes-selftest-descriptor-reclaim` (#172) fails on `main` on this host: ```text lanes-selftest FAIL descriptor-reclaim: expected E_OUTOFMEMORY on unsubmitted pin overflow, got 0x00000000 ``` The scenario counts on a resident limit of 1,000,000 descriptors. Its last step pins 63 tables of 16,384 descriptors (1,032,192) in open lists and expects `Close()` to return `E_OUTOFMEMORY`. `CreateDescriptorHeap` uses the host's `MaxViewDescriptorHeapSize` when that is above 1,000,000 (`runtime/d3d12/src/device/resources.rs`). On such a host the 63 tables fit and nothing overflows. The provider already has a cap for the resident limit, `TUXBOX_DESCRIPTOR_HEAP_LIMIT`, read when the heap is created. The scenario now sets it to 1,000,000 around its own `CreateDescriptorHeap` call and clears it afterwards. It then pages the same way on every host, and a later scenario in the same process (`--selftest all`) is not affected. What I saw on this host, with `main` at 9ca0060: - the scenario fails with the line above; - with `TUXBOX_DESCRIPTOR_HEAP_LIMIT=1000000` exported it passes; - with this change it passes without the variable. I have not read the value this host reports for `MaxViewDescriptorHeapSize`. The three results above are what points at it. ## Verified on Lanes - [x] `python tuxbox.py check` passed on this branch - [x] Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below The scenario is `descriptor-reclaim` itself: on this host it fails without the change and passes with it. GPU, driver and backend: NVIDIA GeForce RTX 4070 Ti SUPER (`10de:2705`), driver 595.112.07, Proton Experimental 11.0-20261112. NixOS, Linux 7.2.11, Intel Core i9-12900K, Hyprland (Wayland). ```text Summary passed Build the shader compiler (10s) passed Python tests (5s) passed Shader compiler tests (4s) passed DXBC tests (1s) passed XG layout tests (1s) passed D3D12 Windows typecheck (1s) passed Build (33s) passed Lanes and fixtures on the GPU (262s) passed D3D12 regression controls (103s) passed Shader translator on the GPU (262s) All checks passed. ``` The check ran on this commit (on 7b22d71) with `--proton`, `--prefix` and `--windows-dxc` (Microsoft's x64 DXC 1.8.2505.1): 64 of 64 guest checks and all 17 regression cases pass. Without the change that scenario fails on this base too: it is the one failure in the check of #177. ## Checks - No Rust code changed. The unit tests and the Windows typecheck are in the summary above. - `lanes-xbox-replay` still passes its import check: `SetEnvironmentVariableW` resolves to a Windows core API set, so Lanes stays inside its Xbox title profile. No evidence JSON changed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:36:38 +00:00
github manually merged commit 0705a9d012 into gh-pr/178/base 2026-11-26 06:36:39 +00:00
Author
Owner

@⁠postblink on GitHub · 2026-11-25 17:01 UTC · original

Same failure on a second NVIDIA host, and the same result with this change.

NVIDIA GeForce RTX 5080 (10de:2c02), driver 620.73.04, Proton Experimental 11.0-20261112, CachyOS, KDE Plasma (Wayland). Full default python tuxbox.py verify on the GPU:

Commit Result
7b22d71 (main) 67/68, lanes-selftest FAIL descriptor-reclaim: expected E_OUTOFMEMORY on unsubmitted pin overflow, got 0x00000000
0705a9d (this branch) 68/68

On the host limit you hadn't read: the NVIDIA Vulkan driver here reports maxDescriptorSetUpdateAfterBindSampledImages = 1048576 (RADV on the same machine reports 8388606). If the MaxViewDescriptorHeapSize the host D3D12 reports follows that limit, the heap gets 1,048,576 resident descriptors instead of 1,000,000, and the scenario's 63 × 16,384 = 1,032,192 pinned descriptors fit, so Close() succeeds. I read the Vulkan limit, not the D3D12 value itself, so treat that link as likely rather than measured. It does explain why the scenario passes on hosts that report 1,000,000 or less and fails here, and why pinning the limit in the scenario fixes it.

**@⁠postblink** on GitHub · 2026-11-25 17:01 UTC · [original](https://github.com/brcly/TuxBox/pull/178#issuecomment-7168890870) Same failure on a second NVIDIA host, and the same result with this change. NVIDIA GeForce RTX 5080 (`10de:2c02`), driver 620.73.04, Proton Experimental 11.0-20261112, CachyOS, KDE Plasma (Wayland). Full default `python tuxbox.py verify` on the GPU: | Commit | Result | |---|---| | `7b22d71` (main) | 67/68, `lanes-selftest FAIL descriptor-reclaim: expected E_OUTOFMEMORY on unsubmitted pin overflow, got 0x00000000` | | `0705a9d` (this branch) | 68/68 | On the host limit you hadn't read: the NVIDIA Vulkan driver here reports `maxDescriptorSetUpdateAfterBindSampledImages = 1048576` (RADV on the same machine reports 8388606). If the `MaxViewDescriptorHeapSize` the host D3D12 reports follows that limit, the heap gets 1,048,576 resident descriptors instead of 1,000,000, and the scenario's 63 × 16,384 = 1,032,192 pinned descriptors fit, so `Close()` succeeds. I read the Vulkan limit, not the D3D12 value itself, so treat that link as likely rather than measured. It does explain why the scenario passes on hosts that report 1,000,000 or less and fails here, and why pinning the limit in the scenario fixes it.
Author
Owner

@⁠copilot-pull-request-reviewer[bot] on GitHub · 2026-11-25 16:45 UTC · original · reviewed

🔵 Needs a closer look

The review evidence is incomplete because one or more reviewer sessions failed.

No open issues 🎉

What changed in this PR

This PR makes the Lanes descriptor-reclaim self-test use the resident descriptor limit its overflow checks expect, avoiding failures on hosts with larger descriptor capacities.

Changes:

  • Set TUXBOX_DESCRIPTOR_HEAP_LIMIT to 1000000 before creating the test heap.
  • Clear the override after heap creation, before checking the result.
File Description
examples/​lanes/​selftest.cpp Temporarily caps the test heap’s resident descriptor limit and documents why it is needed.

Review effort: Balanced

**@⁠copilot-pull-request-reviewer[bot]** on GitHub · 2026-11-25 16:45 UTC · [original](https://github.com/brcly/TuxBox/pull/178#pullrequestreview-6061429065) · **reviewed** <!-- ccr-overview-v2 --> ### 🔵 Needs a closer look The review evidence is incomplete because one or more reviewer sessions failed. **No open issues** 🎉 <details> <summary><strong>What changed in this PR</strong></summary> This PR makes the Lanes descriptor-reclaim self-test use the resident descriptor limit its overflow checks expect, avoiding failures on hosts with larger descriptor capacities. **Changes:** - Set `TUXBOX_DESCRIPTOR_HEAP_LIMIT` to `1000000` before creating the test heap. - Clear the override after heap creation, before checking the result. | File | Description | | ---- | ----------- | | `examples/​lanes/​selftest.cpp` | Temporarily caps the test heap’s resident descriptor limit and documents why it is needed. | </details> <sub>Review effort: Balanced</sub>
This discussion has been locked. Commenting is limited to contributors.
No description provided.