lanes: add a root SRV window scenario for the #389 fix #655

Open
JeffreyBytes wants to merge 1 commit from upstream-pr/655 into main
JeffreyBytes commented 2026-12-02 15:22:46 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-12-02T15:22:46Z.


Caution

Needs a run on Nvidia hardware prior to merge

Summary

Adds a Lanes self-test scenario, root-srv-window, for the bug #389 fixed: a root SRV bound by address was imported as the single 64 KiB page holding the address, and a program reading past that page got other data or faulted the GPU. Nothing in Lanes covered it. There is no runtime change in this PR.

The scenario commits four 64 KiB pages of title memory, makes no resource over them, and binds a raw buffer as a root SRV eight bytes before the end of the first page. A plain compute program reads the two words before the boundary and words in each of the three pages after it. A root SRV has no size on the console, so every word has to be the one the title wrote.

I kept it out of all. Its suite, lanes-root-srv-window, runs only when named, because a provider that does fault on the read would take the whole all run with it. If the NVIDIA result is clean I'm happy to move it into all, or you may prefer that now.

I have no NVIDIA card, so this needs someone to run it there (below).

Tested

  • The checks relevant to this change passed
  • Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below
  • Where the table calls for AMD and NVIDIA, they passed on both. Otherwise, say which vendor still needs to run them: NVIDIA still needs to run it.

GPU, driver and backend: RX 6700 XT (1002:73df), RADV, GE-Proton11-15, a fresh prefix.

On main with #389, the scenario passes. As a control I cut the root-view window back to one 64 KiB page (ROOT_VIEW_REACH = 0x10000 and one reach in the span and limit). That edit is not in this PR, and it is not a build from before #389. The scenario then fails on this card with wrong data, not a fault:

FAIL root-srv-window: 14 of 16 words differ from title memory; first at byte 0x10000 (0x8 past the bound address): expected 0x7ca3b9b9, found 0

The kernel log was clean on both runs. The amend after the first run changed only comments and the commit message, and I did not rerun the GPU check on the final commit.

To run it:

python build.py --dxc <linux dxc> all
python tuxbox.py verify --only lanes-root-srv-window --adapter <vendor:device> --windows-dxc <windows dxc dir> --output out.json

Commands run and their results:

python tuxbox.py verify --only lanes-root-srv-window --adapter 1002:73df ...   # PASS
python tuxbox.py check --no-gpu   # 12 passed, 1 failed, 0 not run

The one failure is Clippy at runtime/d3d12/src/device/shader_cache/native_doubles.rs:27 (deprecated fetch_update). main fails the same way, and #654 fixes it.

Evidence: TuxBox check of a9c138f7fc3d, no uncommitted changes, no GPU checks: 12 passed, 1 failed, 0 not run

Checks

CI runs the code checks only, no GPU. This PR changes no evidence JSON.

<!-- greyfinch-sync:brcly/TuxBox:issue:5609454625 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/655). Originally posted by [JeffreyBytes](https://github.com/JeffreyBytes) on 2026-12-02T15:22:46Z. --- > [!CAUTION] > Needs a run on Nvidia hardware prior to merge ## Summary Adds a Lanes self-test scenario, `root-srv-window`, for the bug #389 fixed: a root SRV bound by address was imported as the single 64 KiB page holding the address, and a program reading past that page got other data or faulted the GPU. Nothing in Lanes covered it. There is no runtime change in this PR. The scenario commits four 64 KiB pages of title memory, makes no resource over them, and binds a raw buffer as a root SRV eight bytes before the end of the first page. A plain compute program reads the two words before the boundary and words in each of the three pages after it. A root SRV has no size on the console, so every word has to be the one the title wrote. I kept it out of `all`. Its suite, `lanes-root-srv-window`, runs only when named, because a provider that does fault on the read would take the whole `all` run with it. If the NVIDIA result is clean I'm happy to move it into `all`, or you may prefer that now. I have no NVIDIA card, so this needs someone to run it there (below). ## Tested - [x] The checks relevant to this change passed - [x] Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below - [ ] Where the table calls for AMD and NVIDIA, they passed on both. Otherwise, say which vendor still needs to run them: **NVIDIA still needs to run it.** GPU, driver and backend: RX 6700 XT (`1002:73df`), RADV, GE-Proton11-15, a fresh prefix. On `main` with #389, the scenario passes. As a control I cut the root-view window back to one 64 KiB page (`ROOT_VIEW_REACH = 0x10000` and one reach in the span and limit). That edit is not in this PR, and it is not a build from before #389. The scenario then fails on this card with wrong data, not a fault: ```text FAIL root-srv-window: 14 of 16 words differ from title memory; first at byte 0x10000 (0x8 past the bound address): expected 0x7ca3b9b9, found 0 ``` The kernel log was clean on both runs. The amend after the first run changed only comments and the commit message, and I did not rerun the GPU check on the final commit. To run it: ```sh python build.py --dxc <linux dxc> all python tuxbox.py verify --only lanes-root-srv-window --adapter <vendor:device> --windows-dxc <windows dxc dir> --output out.json ``` Commands run and their results: ```text python tuxbox.py verify --only lanes-root-srv-window --adapter 1002:73df ... # PASS python tuxbox.py check --no-gpu # 12 passed, 1 failed, 0 not run ``` The one failure is Clippy at `runtime/d3d12/src/device/shader_cache/native_doubles.rs:27` (deprecated `fetch_update`). `main` fails the same way, and #654 fixes it. ```text Evidence: TuxBox check of a9c138f7fc3d, no uncommitted changes, no GPU checks: 12 passed, 1 failed, 0 not run ``` ## Checks CI runs the code checks only, no GPU. This PR changes no evidence JSON.
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/655:upstream-pr/655'
git switch 'upstream-pr/655'

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