D3D12.X: two-pass mesh stages never bind a memory window at GPU VA 0 #3052

Open
Raul-Paiva wants to merge 1 commit from upstream-pr/3052 into main
Raul-Paiva commented 2026-11-27 18:02:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Raul-Paiva on 2026-11-27T18:02:22Z.


A two-pass stage (prepare_two_pass_stage, used by DispatchMesh and ExecuteIndirect(DispatchMesh)) binds the four memory windows as root UAVs u2–u5 with uma_window_va(k).unwrap_or(first). uma_window_va returns Some(0) for a window that has no buffer on the GPU. In real.rs the windows start as (0, 0) and only committed or sparse windows get a buffer, so such a window is bound as a null root view.

c685e122 added .filter(|&v| v != 0) to the same lookup in bind_abi, because direct DXIL compute reads every window slot (with_mem_raw_loads). The two-pass compute pass is a direct DXIL compute shader as well, but its bind was left out, so it can read GPU VA 0, which is a page fault and a device removal.

This PR moves the lookup into one helper, window_view, and uses it in both binds.

This is a defensive fix. On my setup (3 sparse windows + 1 coherent window), all four windows always have a buffer, so uma_window_va never returns 0 there and this path never triggers: the old and the new code bind the same addresses. It matters when a window has no buffer, for example when sparse::init fails or with a layout that has a gap.

  • The unfiltered line came in with 4a69d806 ("two-pass binds take window 0 as bind_abi does"). That commit added the window 0 check (first_window) but not the != 0 filter for windows 1–3.
  • amd-dev already has the same filter in its own two-pass bind: 0e19dc1d (#2368).
  • Possibly related to #2920: a comment there reports DRED page faults at GPU VA 0x0 during two-pass DispatchMesh / ExecuteIndirect draws. I have not tied those faults to this bind.
  • #2902, #2956 and the #2815–#2817 stack change prepare_two_pass_stage nearby, but not this line. Whichever lands second needs a small rebase.

What is in it

  • crates/xcl/src/hle/d3d12x/bind.rs:
    • window_view(window, first): a window's buffer, or window 0's when it has none (None or 0);
    • prepare_two_pass_stage and bind_abi use it;
    • unit test windows_without_a_buffer_take_window_0.

Tested

  • Hardware: RTX 3070 Laptop GPU 8 GB, driver 621.40, i7-11800H, 32 GB, Windows 10 19045, rustc 1.100.0, release build.
  • Base for the comparison: main 5b0d5fa3 (same commands, same machine). The head pushed here is the same change rebased onto main 9dfbe3ea without conflicts; main's newer commits also change bind.rs, which the rebase merged. CI passes on this head; the test counts below were measured before that rebase.
  • On the previous head a9217399 (the same change on main d52ff48c), the lib tests of the modules this PR touches (hle::d3d12x::bind), release, serial, with the 20 skips: 116 passed, 1 failed, 0 ignored. The failure, bind::tests::gpu_two_pass_indirect_commands_keep_their_own_records (E_INVALIDARG from the driver on this adapter), fails the same way on main d52ff48c.
  • cargo test --release --workspace --no-fail-fast -- --test-threads=4: the lib test binary ends early on main too (exit 0x80004005 after sparse upload preparation still failed after bounded retries), so the lib was also run alone, serially (--test-threads=1), with --skip for the 20 tests that end the binary on main (6 list_x, 12 sparse, 1 texture_upload, 1 uma_driver; each passes alone).
  • This PR tested at 621ea567 (on main 5b0d5fa3):
    • integration tests: 138 passed, 1 failed, 20 ignored; main: 139 passed, 0 failed, 20 ignored. The failure is gpu_two_pass_cache_e2e::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs ("releasing the title PSOs releases their two-pass state", 1 vs 0). Run 8 times alone it failed 2 times on this head and 2 times on main, so it is intermittent there too.
    • lib, serial with the 20 skips: 2604 passed, 14 failed, 29 ignored; main: 2604 passed, 13 failed, 29 ignored. The new windows_without_a_buffer_take_window_0 passes. The 13 failures of main fail here too; the 14th, list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list, passes alone 5/5 on this head and on main (it failed in the long run on main 0fe06eb0 as well).
  • SKIPPED on this adapter (same on main): the wave64 forms (no wave64), three f16/f32 per-lane forms refused by the recompiler, and the heap-window tests (no heap windows).

Regression run
scripts/smoke.ps1 -Seconds 120 -Title 'retail title A', release builds of clean trees, one after the other on the machine in Tested, with XCL_DEVICE_TYPE=lockhart XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WATCH_HOT=0 XCL_DRED=1 XCL_GPU_WAIT_TIMEOUT_MS=60000. The title is left on its own, with no input; the shader cache was warmed by two runs of main before.

main:

xcl-smoke v1
commit: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b
gpu: NVIDIA GeForce RTX 3070 Laptop GPU
title: retail title A
seconds: 120
exit: 0x0
frames shown: 3362 (PresentX 3362)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 16519 MB

This PR:

xcl-smoke v1
commit: 0364b388c60719f24e9043321f2c162e87a4ef5d
gpu: NVIDIA GeForce RTX 3070 Laptop GPU
title: retail title A
seconds: 120
exit: 0x0
frames shown: 3363 (PresentX 3363)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 16640 MB

Not tested

  • The smoke runs stay in the menus or the start of a load, so they do not reach two-pass mesh draws. They are a regression check only.
  • That this removes a device removal in a real title. On my machine, removals with DRED page fault at GPU VA 0x0 happen during mesh-heavy scenes, but I have not tied one to this bind.
  • Which window layouts actually leave a window without a buffer. The code allows it: a WindowKind::None gap below shader_windows(), or sparse windows when sparse::init fails.
  • AMD, Series X profile, other NVIDIA GPUs.
  • The new test covers the helper. Before this change, the two-pass stage did not go through it, so the test does not fail on the old code by itself.

AI use

  • Claude Code (Claude Opus 5.5) found the missing filter while reviewing the code, wrote the change and the test, ran the tests and wrote this description. I read the diff and checked it.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5531068225 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052). Originally posted by [Raul-Paiva](https://github.com/Raul-Paiva) on 2026-11-27T18:02:22Z. --- A two-pass stage (`prepare_two_pass_stage`, used by DispatchMesh and ExecuteIndirect(DispatchMesh)) binds the four memory windows as root UAVs u2–u5 with `uma_window_va(k).unwrap_or(first)`. `uma_window_va` returns `Some(0)` for a window that has no buffer on the GPU. In `real.rs` the windows start as `(0, 0)` and only committed or sparse windows get a buffer, so such a window is bound as a null root view. c685e122 added `.filter(|&v| v != 0)` to the same lookup in `bind_abi`, because direct DXIL compute reads every window slot (`with_mem_raw_loads`). The two-pass compute pass is a direct DXIL compute shader as well, but its bind was left out, so it can read GPU VA 0, which is a page fault and a device removal. This PR moves the lookup into one helper, `window_view`, and uses it in both binds. **This is a defensive fix.** On my setup (3 sparse windows + 1 coherent window), all four windows always have a buffer, so `uma_window_va` never returns 0 there and this path never triggers: the old and the new code bind the same addresses. It matters when a window has no buffer, for example when `sparse::init` fails or with a layout that has a gap. - The unfiltered line came in with 4a69d806 ("two-pass binds take window 0 as bind_abi does"). That commit added the window 0 check (`first_window`) but not the `!= 0` filter for windows 1–3. - `amd-dev` already has the same filter in its own two-pass bind: 0e19dc1d (#2368). - Possibly related to #2920: a comment there reports DRED page faults at GPU VA 0x0 during two-pass DispatchMesh / ExecuteIndirect draws. I have not tied those faults to this bind. - #2902, #2956 and the #2815–#2817 stack change `prepare_two_pass_stage` nearby, but not this line. Whichever lands second needs a small rebase. **What is in it** - `crates/xcl/src/hle/d3d12x/bind.rs`: - `window_view(window, first)`: a window's buffer, or window 0's when it has none (`None` or 0); - `prepare_two_pass_stage` and `bind_abi` use it; - unit test `windows_without_a_buffer_take_window_0`. **Tested** - Hardware: RTX 3070 Laptop GPU 8 GB, driver 621.40, i7-11800H, 32 GB, Windows 10 19045, rustc 1.100.0, release build. - Base for the comparison: `main` 5b0d5fa3 (same commands, same machine). The head pushed here is the same change rebased onto `main` 9dfbe3ea without conflicts; `main`'s newer commits also change `bind.rs`, which the rebase merged. CI passes on this head; the test counts below were measured before that rebase. - On the previous head a9217399 (the same change on `main` d52ff48c), the lib tests of the modules this PR touches (`hle::d3d12x::bind`), release, serial, with the 20 skips: 116 passed, 1 failed, 0 ignored. The failure, `bind::tests::gpu_two_pass_indirect_commands_keep_their_own_records` (E_INVALIDARG from the driver on this adapter), fails the same way on `main` d52ff48c. - `cargo test --release --workspace --no-fail-fast -- --test-threads=4`: the lib test binary ends early on `main` too (exit 0x80004005 after `sparse upload preparation still failed after bounded retries`), so the lib was also run alone, serially (`--test-threads=1`), with `--skip` for the 20 tests that end the binary on `main` (6 `list_x`, 12 `sparse`, 1 `texture_upload`, 1 `uma_driver`; each passes alone). - This PR tested at 621ea567 (on `main` 5b0d5fa3): - integration tests: 138 passed, 1 failed, 20 ignored; `main`: 139 passed, 0 failed, 20 ignored. The failure is `gpu_two_pass_cache_e2e::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` ("releasing the title PSOs releases their two-pass state", 1 vs 0). Run 8 times alone it failed 2 times on this head and 2 times on `main`, so it is intermittent there too. - lib, serial with the 20 skips: 2604 passed, 14 failed, 29 ignored; `main`: 2604 passed, 13 failed, 29 ignored. The new `windows_without_a_buffer_take_window_0` passes. The 13 failures of `main` fail here too; the 14th, `list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list`, passes alone 5/5 on this head and on `main` (it failed in the long run on `main` 0fe06eb0 as well). - SKIPPED on this adapter (same on `main`): the wave64 forms (no wave64), three f16/f32 per-lane forms refused by the recompiler, and the heap-window tests (no heap windows). **Regression run** `scripts/smoke.ps1 -Seconds 120 -Title 'retail title A'`, release builds of clean trees, one after the other on the machine in **Tested**, with `XCL_DEVICE_TYPE=lockhart XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WATCH_HOT=0 XCL_DRED=1 XCL_GPU_WAIT_TIMEOUT_MS=60000`. The title is left on its own, with no input; the shader cache was warmed by two runs of `main` before. `main`: ``` xcl-smoke v1 commit: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b gpu: NVIDIA GeForce RTX 3070 Laptop GPU title: retail title A seconds: 120 exit: 0x0 frames shown: 3362 (PresentX 3362) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 16519 MB ``` This PR: ``` xcl-smoke v1 commit: 0364b388c60719f24e9043321f2c162e87a4ef5d gpu: NVIDIA GeForce RTX 3070 Laptop GPU title: retail title A seconds: 120 exit: 0x0 frames shown: 3363 (PresentX 3363) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 16640 MB ``` **Not tested** - The smoke runs stay in the menus or the start of a load, so they do not reach two-pass mesh draws. They are a regression check only. - That this removes a device removal in a real title. On my machine, removals with DRED `page fault at GPU VA 0x0` happen during mesh-heavy scenes, but I have not tied one to this bind. - Which window layouts actually leave a window without a buffer. The code allows it: a `WindowKind::None` gap below `shader_windows()`, or sparse windows when `sparse::init` fails. - AMD, Series X profile, other NVIDIA GPUs. - The new test covers the helper. Before this change, the two-pass stage did not go through it, so the test does not fail on the old code by itself. **AI use** - Claude Code (Claude Opus 5.5) found the missing filter while reviewing the code, wrote the change and the test, ran the tests and wrote this description. I read the diff and checked it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Raul-Paiva commented 2026-11-27 18:14:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Raul-Paiva on 2026-11-27T18:14:54Z.


Edit: the pattern in the last part of this comment does not hold. See the correction: https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7226795118

I ran this fix in a retail title's 3D world. It does not stop the page fault at GPU VA 0x0 removals I get there. The fix is still correct, but those removals have another cause. The data is below in case it helps with #2920.

Tree (local, not pushed)

Setup

  • RTX 3070 Laptop 8 GB, driver 621.24, i7-11800H, 32 GB RAM, Windows 10 19045, rustc 1.100.0, release build.
  • Env: XCL_DEVICE_TYPE=lockhart XCL_TEXTURE_LEVEL_PAGES=1 XCL_SPARSE_LAZY=1 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WATCH_HOT=0 XCL_DRED=1 XCL_GPU_WAIT_TIMEOUT_MS=60000 XCL_TWO_PASS_MB=1024 XCL_DEPTH_UAV_TWIN=1.
  • 600 s runs, gamepad A pressed every 5 s. Play time is counted from the first present.

Result, the same tree with and without this commit:

Without With this PR
Play time until removal ~207 s ~150 s
Presents 1998 2187
Skipped draws (local counter) 70 0
End 0x887a0005, DRED page fault at GPU VA 0x0; allocations there: [] the same, plus DRED: no breadcrumbs (no list was in flight)

With one run each, the difference in play time is within the run-to-run spread I see on this title.

A pattern across all my world runs on this stack (the first two were made before nvidia-dev 3f39671d was merged in; runs of 600–900 s):

Memory settings Runs Play time End
default 1 ~894 s (whole run) exit 0
default 1 — host bugcheck 0x12B at ~175 s, not counted
XCL_TEXTURE_LEVEL_PAGES=1 XCL_SPARSE_LAZY=1 (includes the run with this PR) 7 150–782 s 6 × 0x887a0005 with DRED page fault at GPU VA 0x0, 1 × the title's own crash

Every VA 0x0 removal I have on this stack happened with those two switches on. The only run without them ran its whole 900 s. That is a correlation from few runs, not a cause. Still, reading the code, two things could fit:

  • vram.rs unmap_range calls UpdateTileMappings(NULL) without waiting for the title's queues.
  • With XCL_SPARSE_LAZY, give_memory runs with force = false, so GPU writes into lazy tiles that have no memory yet are lost.

I can open separate issues for those if that's useful.

AI use: Claude Code (Claude Opus 5.5) ran the builds and the runs, read the logs and drafted this comment; I checked it against the logs.

<!-- greyfinch-sync:ivall/xcl:comment:7225287960 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7225287960). Originally posted by [Raul-Paiva](https://github.com/Raul-Paiva) on 2026-11-27T18:14:54Z. --- **Edit:** the pattern in the last part of this comment does not hold. See the correction: https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7226795118 I ran this fix in a retail title's 3D world. **It does not stop the `page fault at GPU VA 0x0` removals I get there.** The fix is still correct, but those removals have another cause. The data is below in case it helps with #2920. **Tree** (local, not pushed) - `nvidia-dev` 3f39671d, plus #2794 3c4891dd, #2905 d900644d, #2967 f058e4ea, #2815 42ae6051, #2816 9ae803e3, #2817 a2c10b4a, and #684's change cherry-picked. - This PR's commit on top of that. - One uncommitted local diagnostic in `bind.rs`: a counter of skipped draws by call site. It is logging only. **Setup** - RTX 3070 Laptop 8 GB, driver 621.24, i7-11800H, 32 GB RAM, Windows 10 19045, rustc 1.100.0, release build. - Env: `XCL_DEVICE_TYPE=lockhart XCL_TEXTURE_LEVEL_PAGES=1 XCL_SPARSE_LAZY=1 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WATCH_HOT=0 XCL_DRED=1 XCL_GPU_WAIT_TIMEOUT_MS=60000 XCL_TWO_PASS_MB=1024 XCL_DEPTH_UAV_TWIN=1`. - 600 s runs, gamepad A pressed every 5 s. Play time is counted from the first present. **Result**, the same tree with and without this commit: | | Without | With this PR | |---|---|---| | Play time until removal | ~207 s | ~150 s | | Presents | 1998 | 2187 | | Skipped draws (local counter) | 70 | 0 | | End | 0x887a0005, DRED `page fault at GPU VA 0x0; allocations there: []` | the same, plus `DRED: no breadcrumbs (no list was in flight)` | With one run each, the difference in play time is within the run-to-run spread I see on this title. **A pattern across all my world runs on this stack** (the first two were made before `nvidia-dev` 3f39671d was merged in; runs of 600–900 s): | Memory settings | Runs | Play time | End | |---|---|---|---| | default | 1 | ~894 s (whole run) | exit 0 | | default | 1 | — | host bugcheck 0x12B at ~175 s, not counted | | `XCL_TEXTURE_LEVEL_PAGES=1 XCL_SPARSE_LAZY=1` (includes the run with this PR) | 7 | 150–782 s | **6 × 0x887a0005 with DRED page fault at GPU VA 0x0**, 1 × the title's own crash | Every VA 0x0 removal I have on this stack happened with those two switches on. The only run without them ran its whole 900 s. That is a correlation from few runs, not a cause. Still, reading the code, two things could fit: - `vram.rs` `unmap_range` calls `UpdateTileMappings(NULL)` without waiting for the title's queues. - With `XCL_SPARSE_LAZY`, `give_memory` runs with `force = false`, so GPU writes into lazy tiles that have no memory yet are lost. I can open separate issues for those if that's useful. **AI use:** Claude Code (Claude Opus 5.5) ran the builds and the runs, read the logs and drafted this comment; I checked it against the logs.
Raul-Paiva commented 2026-11-27 19:42:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Raul-Paiva on 2026-11-27T19:42:40Z.


Correction to my comment above: the pattern I posted there does not hold. VA 0x0 removals happen with and without XCL_TEXTURE_LEVEL_PAGES / XCL_SPARSE_LAZY, so please disregard the two code suspects I listed.

I ran the same tree again (this PR on top, commit 165d3058 locally) with the default memory settings, the same env as the 900 s run that finished cleanly. This env adds no XCL_TWO_PASS_MB and no XCL_DEPTH_UAV_TWIN:
XCL_DEVICE_TYPE=lockhart XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WATCH_HOT=0 XCL_DRED=1 XCL_GPU_WAIT_TIMEOUT_MS=60000. It was a 900 s run with A pressed every 5 s, on the same hardware.

Result:

  • Removal 0x887a0005 after ~275 s of play (2536 presents), with DRED page fault at GPU VA 0x0; allocations there: []; recently freed: [] and DRED: no breadcrumbs (no list was in flight).
  • The two-pass record cap skipped ~80k draws in this run (256 MiB cap; no XCL_TWO_PASS_MB).
  • Process peak commit was 34 GB, on 32 GB of RAM.

The only thing I can still tell apart is that the clean run was made before nvidia-dev 3f39671d was merged into my stack. Edit: that was wrong. The clean run was built after that merge, on the same commit as this PR's parent (2b0aaa66 locally).

I then repeated the clean run exactly: the same commit (without this PR and without the local counter), the same env, 900 s. It removed the device after ~204 s of play, with the same DRED page fault at GPU VA 0x0 and no breadcrumbs (no list was in flight). Peak commit was 35 GB.

So the clean 900 s run was luck. On this tree the VA 0x0 removal comes with or without this PR, with or without the two memory switches, after 150–780 s of play. This PR neither causes it nor fixes it.

AI use: Claude Code (Claude Opus 5.5) ran this run, read the log and drafted this correction; I checked it against the log.

<!-- greyfinch-sync:ivall/xcl:comment:7226795118 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7226795118). Originally posted by [Raul-Paiva](https://github.com/Raul-Paiva) on 2026-11-27T19:42:40Z. --- **Correction to my comment above:** the pattern I posted there does not hold. VA 0x0 removals happen with and without `XCL_TEXTURE_LEVEL_PAGES` / `XCL_SPARSE_LAZY`, so please disregard the two code suspects I listed. I ran the same tree again (this PR on top, commit 165d3058 locally) with the default memory settings, the same env as the 900 s run that finished cleanly. This env adds no `XCL_TWO_PASS_MB` and no `XCL_DEPTH_UAV_TWIN`: `XCL_DEVICE_TYPE=lockhart XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WATCH_HOT=0 XCL_DRED=1 XCL_GPU_WAIT_TIMEOUT_MS=60000`. It was a 900 s run with A pressed every 5 s, on the same hardware. Result: - Removal 0x887a0005 after **~275 s** of play (2536 presents), with `DRED page fault at GPU VA 0x0; allocations there: []; recently freed: []` and `DRED: no breadcrumbs (no list was in flight)`. - The two-pass record cap skipped ~80k draws in this run (256 MiB cap; no `XCL_TWO_PASS_MB`). - Process peak commit was 34 GB, on 32 GB of RAM. ~~The only thing I can still tell apart is that the clean run was made before `nvidia-dev` 3f39671d was merged into my stack.~~ **Edit:** that was wrong. The clean run was built after that merge, on the same commit as this PR's parent (2b0aaa66 locally). I then repeated the clean run exactly: the same commit (without this PR and without the local counter), the same env, 900 s. It removed the device after **~204 s** of play, with the same `DRED page fault at GPU VA 0x0` and `no breadcrumbs (no list was in flight)`. Peak commit was 35 GB. So the clean 900 s run was luck. On this tree the VA 0x0 removal comes with or without this PR, with or without the two memory switches, after 150–780 s of play. This PR neither causes it nor fixes it. **AI use:** Claude Code (Claude Opus 5.5) ran this run, read the log and drafted this correction; I checked it against the log.
Raul-Paiva commented 2026-11-27 20:49:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Raul-Paiva on 2026-11-27T20:49:22Z.


A question about the PR description check. It fails on this PR with:

Regression run needs an xcl-smoke block made on a commit of main (not the PR's), with the same title and time as the PR's

This PR targets nvidia-dev, so I made the comparison run on nvidia-dev d1be8103, the PR's base. That commit is not on main.

For PRs to nvidia-dev, which do you prefer?

  • keep the comparison run on the PR's base, as it is now. If so, could the check accept that for this branch?
  • or add a run on a main commit as well, to satisfy the check as it is.

I can do the second if that's what you want. It means a full shader preparation on this machine, so I'd rather ask first.

I also added a note to the description: on my setup this path never triggers, because all four windows have a buffer. It is a defensive fix, in line with the same filter that amd-dev got in 0e19dc1d.

AI use: Claude Code (Claude Opus 5.5) read the check's output and drafted this; I checked it.

<!-- greyfinch-sync:ivall/xcl:comment:7227873702 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7227873702). Originally posted by [Raul-Paiva](https://github.com/Raul-Paiva) on 2026-11-27T20:49:22Z. --- A question about the `PR description` check. It fails on this PR with: > **Regression run** needs an `xcl-smoke` block made on a commit of main (not the PR's), with the same title and time as the PR's This PR targets `nvidia-dev`, so I made the comparison run on `nvidia-dev` d1be8103, the PR's base. That commit is not on `main`. For PRs to `nvidia-dev`, which do you prefer? - keep the comparison run on the PR's base, as it is now. If so, could the check accept that for this branch? - or add a run on a `main` commit as well, to satisfy the check as it is. I can do the second if that's what you want. It means a full shader preparation on this machine, so I'd rather ask first. I also added a note to the description: on my setup this path never triggers, because all four windows have a buffer. It is a defensive fix, in line with the same filter that `amd-dev` got in 0e19dc1d. **AI use:** Claude Code (Claude Opus 5.5) read the check's output and drafted this; I checked it.
Aniseto commented 2026-11-28 14:12:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-28T14:12:00Z.


Ran the two-pass window binding test at 01196a8f on an NVIDIA Blackwell desktop part:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

XCL_ADAPTER=NVIDIA cargo test -p xcl --lib windows_without_a_buffer_take_window_0 -- --test-threads=1
1 passed; 0 failed; 0 ignored; 0 measured; 1727 filtered out      (exit 0)

The new test passes on a real NVIDIA part: a window whose GPU VA is 0, or that has no buffer, falls back to window 0's buffer in the shared window_view helper used by both the ABI and two-pass binds. This is a CPU-side assertion of the address choice; it does not exercise a title's two-pass DispatchMesh or a real page fault. The thread has discussion about VA 0 removals but no RTX 5070 Ti datapoint yet.

Not tested: a retail title, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

<!-- greyfinch-sync:ivall/xcl:comment:7240491809 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7240491809). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-28T14:12:00Z. --- Ran the two-pass window binding test at `01196a8f` on an NVIDIA Blackwell desktop part: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` XCL_ADAPTER=NVIDIA cargo test -p xcl --lib windows_without_a_buffer_take_window_0 -- --test-threads=1 1 passed; 0 failed; 0 ignored; 0 measured; 1727 filtered out (exit 0) ``` The new test passes on a real NVIDIA part: a window whose GPU VA is 0, or that has no buffer, falls back to window 0's buffer in the shared `window_view` helper used by both the ABI and two-pass binds. This is a CPU-side assertion of the address choice; it does not exercise a title's two-pass DispatchMesh or a real page fault. The thread has discussion about VA 0 removals but no RTX 5070 Ti datapoint yet. Not tested: a retail title, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
andrewDoing commented 2026-11-28 19:49:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T19:49:52Z.


Verified the two-pass window fallback through GPU execution on RTX 5070 / NVIDIA 616.92 at 01196a8f. A test-only fixture supplied controlled lookup results to prepare_two_pass_stage and used the production emit_two_pass_stage for both compute and mesh. Valid window addresses referred to separate, aligned regions of a real GPU buffer. Before recording either pass, the fixture verified that all six emitted root addresses were nonzero and that each window resolved to its expected address.

The compute shader loaded one word through each of u2–u5 into a record. The mesh shader independently loaded the same four slots, checked them against that record, and rasterized a scissored triangle. Each row was a fresh process with a completed fence and full 4×4 RGBA32F readback.

Window lookup inputs Compute record Eight shaded pixels, each
Four distinct valid addresses [11, 22, 33, 44] [11, 22, 33, 44]
Valid 0, Some(0) for 1, valid 2, None for 3 [11, 11, 33, 11] [11, 11, 33, 11]

The other eight pixels retained the blue clear in both runs. This shows both absent forms reading window 0’s data while the unaffected third slot still reads its own data. The missing windows were modeled. The Dispatch, DispatchMesh, geometry, buffer reads and pixel readbacks were native. This fixture did not reproduce sparse initialization failure, exercise ExecuteIndirect, or establish the cause of a retail device removal.

AI use: OpenAI Codex adapted the fixture, ran the controls, and prepared this report.

<!-- greyfinch-sync:ivall/xcl:comment:7244836056 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7244836056). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-28T19:49:52Z. --- Verified the two-pass window fallback through GPU execution on RTX 5070 / NVIDIA 616.92 at `01196a8f`. A test-only fixture supplied controlled lookup results to `prepare_two_pass_stage` and used the production `emit_two_pass_stage` for both compute and mesh. Valid window addresses referred to separate, aligned regions of a real GPU buffer. Before recording either pass, the fixture verified that all six emitted root addresses were nonzero and that each window resolved to its expected address. The compute shader loaded one word through each of u2–u5 into a record. The mesh shader independently loaded the same four slots, checked them against that record, and rasterized a scissored triangle. Each row was a fresh process with a completed fence and full 4×4 RGBA32F readback. | Window lookup inputs | Compute record | Eight shaded pixels, each | | --- | --- | --- | | Four distinct valid addresses | [11, 22, 33, 44] | [11, 22, 33, 44] | | Valid 0, `Some(0)` for 1, valid 2, `None` for 3 | [11, 11, 33, 11] | [11, 11, 33, 11] | The other eight pixels retained the blue clear in both runs. This shows both absent forms reading window 0’s data while the unaffected third slot still reads its own data. The missing windows were modeled. The Dispatch, DispatchMesh, geometry, buffer reads and pixel readbacks were native. This fixture did not reproduce sparse initialization failure, exercise ExecuteIndirect, or establish the cause of a retail device removal. AI use: OpenAI Codex adapted the fixture, ran the controls, and prepared this report.
Raul-Paiva commented 2026-11-30 00:29:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Raul-Paiva on 2026-11-30T00:29:24Z.


Correction to my two comments above: the page fault at GPU VA 0x0 lines I quoted should not be read as GPU page faults at VA 0. In every one of those logs DRED reported device state 0 (UNKNOWN), empty allocation lists (allocations there: []; recently freed: []) and no list in flight. That is what DRED gives when it recorded no fault, though as Prime1997 pointed out on #3119 it does not rule one out. So those removals tell nothing about this PR, for or against; #3119 changes the log so it no longer reads as a fault at VA 0.

The PR is now on main (rebased onto 53e85fb1, head 125dc93f). The two-pass bind there still uses uma_window_va(k).unwrap_or(first), so the fix still applies. The full suite against main is in the description (no new failure); the smoke runs on main and on this head are still to come.

Written with Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7265313751 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7265313751). Originally posted by [Raul-Paiva](https://github.com/Raul-Paiva) on 2026-11-30T00:29:24Z. --- **Correction to my two comments above:** the `page fault at GPU VA 0x0` lines I quoted should not be read as GPU page faults at VA 0. In every one of those logs DRED reported device state 0 (`UNKNOWN`), empty allocation lists (`allocations there: []; recently freed: []`) and no list in flight. That is what DRED gives when it recorded no fault, though as Prime1997 pointed out on #3119 it does not rule one out. So those removals tell nothing about this PR, for or against; #3119 changes the log so it no longer reads as a fault at VA 0. The PR is now on `main` (rebased onto 53e85fb1, head `125dc93f`). The two-pass bind there still uses `uma_window_va(k).unwrap_or(first)`, so the fix still applies. The full suite against `main` is in the description (no new failure); the smoke runs on `main` and on this head are still to come. Written with Claude Code (Claude Opus 5.5).
AAsobu commented 2026-11-30 19:22:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by AAsobu on 2026-11-30T19:22:19Z.


Test report for #3052 at head 0364b388c60719f24e9043321f2c162e87a4ef5d

  • Merged into main ff0c364b3de011c13ed45865480c21918a79ec89: clean (merge commit ce1d0b13), git diff --check clean.
  • Hardware: NVIDIA GeForce RTX 3090 24 GB (driver 621.24, wave32 only), Intel Core i5-10600K, 32 GB, Windows 11 Home build 26300, rustc 1.100.0; tests debug, title run release.
  • cargo build --workspace: ok.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 2890 passed, 0 failed, 51 ignored.
    • The new test hle::d3d12x::bind::tests::windows_without_a_buffer_take_window_0 passes.
  • SKIPPED (28): 22 no wave64, 2 no heap windows (opt-in), 3 no D3D12 debug layer / d3d12SDKLayers.dll, 1 no GPU_UPLOAD heaps.
  • Diff read in full (+20/-2, crates/xcl/src/hle/d3d12x/bind.rs): no findings.

Retail title, two runs, release build, XCL_PREPARE=0 XCL_DIRECT_DXIL=1 XCL_PSO_WAIT_MS=1000 XCL_TEXTURE_LEVEL_PAGES=1 XCL_HUGE_PSO_CONCURRENCY=4 XCL_HUGE_PSO_WANTED_CONCURRENCY=4 XCL_DXC_THREADS=4 XCL_NETWORK=0 XCL_DRED=1:

  • First run: the driver's pipeline cache was cold for this tree (huge mesh PSOs took 16-18 s each in the driver, against a few ms on earlier runs), so the title reached its world only at about 686 s and showed a black screen with subtitles while many draws were still skipped for pipelines being built.
  • The VA 0 removal still happens with this PR: device removal (0x887a0005) at 816 s, about 130 s into the world, DRED page fault at GPU VA 0x0, allocations there [], no breadcrumbs (no list in flight). System commit at the removal: 57.3 of 66.2 GB.
  • recorded last lists mostly two-pass ExecuteIndirect(DispatchMesh) by count, but the last 24 operations in order are mainly compute Dispatch / ExecuteIndirect (dispatches) after three DispatchMesh in two passes. So the VA 0 read may come from another path too.
  • Second run, same build and settings, driver cache now mostly warm: heavy scene work from about 118 s (up to 2422 draws / 7883 dispatches per 2 s), then a pipeline-build stall; device removal at 300 s, before reaching the world, again DRED page fault at GPU VA 0x0, allocations there [], no breadcrumbs; system commit 53.6 of 66.2 GB. This time all of the last 24 recorded operations in order are ExecuteIndirect (DispatchMesh) in two passes, the path this PR targets, so it does not cover every case of the VA 0 fault on this title. The removal surfaced on a CreatePlacedResourceX (8x1 buffer) call.
  • For comparison, same settings, without this PR: main abec7ce9 was removed at 188 s with the same VA 0 fault (before the world), and main abec7ce9 + #1552 at 297 s, 3 s after reaching the world. One run each with different cache states, so the later removal in the first run is not evidence that this PR helps.

Not tested: AMD / wave64.

AI use: run and written with Claude Code (Claude Opus 5.5); results checked by me.

<!-- greyfinch-sync:ivall/xcl:comment:7289282886 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7289282886). Originally posted by [AAsobu](https://github.com/AAsobu) on 2026-11-30T19:22:19Z. --- Test report for #3052 at head `0364b388c60719f24e9043321f2c162e87a4ef5d` - Merged into `main` `ff0c364b3de011c13ed45865480c21918a79ec89`: clean (merge commit `ce1d0b13`), `git diff --check` clean. - Hardware: NVIDIA GeForce RTX 3090 24 GB (driver 621.24, wave32 only), Intel Core i5-10600K, 32 GB, Windows 11 Home build 26300, rustc 1.100.0; tests debug, title run release. - `cargo build --workspace`: ok. - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 2890 passed, 0 failed, 51 ignored. - The new test `hle::d3d12x::bind::tests::windows_without_a_buffer_take_window_0` passes. - SKIPPED (28): 22 no wave64, 2 no heap windows (opt-in), 3 no D3D12 debug layer / `d3d12SDKLayers.dll`, 1 no `GPU_UPLOAD` heaps. - Diff read in full (+20/-2, `crates/xcl/src/hle/d3d12x/bind.rs`): no findings. Retail title, two runs, release build, `XCL_PREPARE=0 XCL_DIRECT_DXIL=1 XCL_PSO_WAIT_MS=1000 XCL_TEXTURE_LEVEL_PAGES=1 XCL_HUGE_PSO_CONCURRENCY=4 XCL_HUGE_PSO_WANTED_CONCURRENCY=4 XCL_DXC_THREADS=4 XCL_NETWORK=0 XCL_DRED=1`: - First run: the driver's pipeline cache was cold for this tree (huge mesh PSOs took 16-18 s each in the driver, against a few ms on earlier runs), so the title reached its world only at about 686 s and showed a black screen with subtitles while many draws were still skipped for pipelines being built. - **The VA 0 removal still happens with this PR**: device removal (`0x887a0005`) at 816 s, about 130 s into the world, DRED page fault at GPU VA 0x0, allocations there `[]`, no breadcrumbs (no list in flight). System commit at the removal: 57.3 of 66.2 GB. - `recorded last` lists mostly two-pass `ExecuteIndirect(DispatchMesh)` by count, but the last 24 operations in order are mainly compute `Dispatch` / `ExecuteIndirect (dispatches)` after three `DispatchMesh in two passes`. So the VA 0 read may come from another path too. - Second run, same build and settings, driver cache now mostly warm: heavy scene work from about 118 s (up to 2422 draws / 7883 dispatches per 2 s), then a pipeline-build stall; **device removal at 300 s, before reaching the world**, again DRED page fault at GPU VA 0x0, allocations there `[]`, no breadcrumbs; system commit 53.6 of 66.2 GB. This time **all of the last 24 recorded operations in order are `ExecuteIndirect (DispatchMesh) in two passes`**, the path this PR targets, so it does not cover every case of the VA 0 fault on this title. The removal surfaced on a `CreatePlacedResourceX` (8x1 buffer) call. - For comparison, same settings, without this PR: `main` `abec7ce9` was removed at 188 s with the same VA 0 fault (before the world), and `main` `abec7ce9` + #1552 at 297 s, 3 s after reaching the world. One run each with different cache states, so the later removal in the first run is not evidence that this PR helps. Not tested: AMD / wave64. AI use: run and written with Claude Code (Claude Opus 5.5); results checked by me.
AAsobu commented 2026-12-01 00:00:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by AAsobu on 2026-12-01T00:00:41Z.


Correction to my report above, about the device removal it mentions (0x887a0005, DRED "page fault at GPU VA 0x0", no breadcrumbs): on this machine it was most likely NVIDIA's 512 MB shader-heap limit (#2403), not a bug of main and not a regression range.

  • xcl nvprofile status (from #2590) showed that xcl.exe had no profile here, so the driver's default 512 MB applied. #3277 had the same signature and timing on another RTX 3090 and it went away with the profile.
  • With the profile installed (1024 MB), 4 of 4 runs of 420 s (main ff0c364b twice, #3528 twice) stayed in the world for ~220-270 s with no removal, where before 13 of 13 runs past the loading screen lost the device, at 143-816 s from start (5-50 s after world entry in the 8 runs where I timed it).
  • The rest of the report (tests, diff review, the other measurements) stands.
  • For this PR in particular: my report said the VA 0 removal still happens with it. Since that removal is most likely #2403, my runs say nothing for or against this PR's fix; they only show it caused no new problem.

Hardware: NVIDIA GeForce RTX 3090 24 GB (driver 621.24), Intel Core i5-10600K, 32 GB, Windows 11 Home build 26300. Tool and model: Claude Code (Claude Opus 5.5), results checked by me.

<!-- greyfinch-sync:ivall/xcl:comment:7295813669 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7295813669). Originally posted by [AAsobu](https://github.com/AAsobu) on 2026-12-01T00:00:41Z. --- Correction to my report above, about the device removal it mentions (0x887a0005, DRED "page fault at GPU VA 0x0", no breadcrumbs): on this machine it was most likely NVIDIA's 512 MB shader-heap limit (#2403), not a bug of `main` and not a regression range. - `xcl nvprofile status` (from #2590) showed that `xcl.exe` had no profile here, so the driver's default 512 MB applied. #3277 had the same signature and timing on another RTX 3090 and it went away with the profile. - With the profile installed (1024 MB), 4 of 4 runs of 420 s (`main` `ff0c364b` twice, #3528 twice) stayed in the world for ~220-270 s with no removal, where before 13 of 13 runs past the loading screen lost the device, at 143-816 s from start (5-50 s after world entry in the 8 runs where I timed it). - The rest of the report (tests, diff review, the other measurements) stands. - For this PR in particular: my report said the VA 0 removal still happens with it. Since that removal is most likely #2403, my runs say nothing for or against this PR's fix; they only show it caused no new problem. Hardware: NVIDIA GeForce RTX 3090 24 GB (driver 621.24), Intel Core i5-10600K, 32 GB, Windows 11 Home build 26300. Tool and model: Claude Code (Claude Opus 5.5), results checked by me.
Foniass commented 2026-12-01 09:24:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:24:59Z.


Triage (#1607) – head 0364b38

No open or merged PR makes the same change. On main, prepare_two_pass_stage in bind.rs still uses uma_window_va(k).unwrap_or(first), so it can bind a null root view for a window whose address is 0. bind_abi_with_root_resolved already filters that case. The new window_view helper gives both call sites the same filter, and it has a unit test.
No problems found in the diff.
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:7306668352 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7306668352). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T09:24:59Z. --- **Triage (#1607)** – head 0364b38 No open or merged PR makes the same change. On main, `prepare_two_pass_stage` in `bind.rs` still uses `uma_window_va(k).unwrap_or(first)`, so it can bind a null root view for a window whose address is 0. `bind_abi_with_root_resolved` already filters that case. The new `window_view` helper gives both call sites the same filter, and it has a unit test. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Foniass commented 2026-12-01 11:59:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T11:59:22Z.


merge-check
base: 493dbd3dd0
head: 0364b388c6
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2901 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read the whole diff (+20/-2). The two-pass stage bind (bind.rs ~3108) was the last place that could bind a memory window whose GPU VA is 0 as a root view. Such a window is neither committed nor given a buffer by sparse::init (real.rs ~704-776), and a read through a null root view can remove the device. It now takes window 0 instead, as bind_abi and the replay in console_list.rs ~1077 already do. Findings: (1) The new test (windows_without_a_buffer_take_window_0, ~7958) covers the helper, not the two-pass call site, so it doesn't fail on main; andrewDoing's GPU fixture in the comments does exercise prepare_two_pass_stage and would make a good test. (2) When window 0 itself has VA 0, first_window (~5046-5048) returns 0 and window_view (~5058) still binds a null view. bind_abi has the same limit, so this PR doesn't add it (unverified that it happens). Fine: all four window slots and both passes are covered, and no other root parameters change. In the default 4-window layout every window has a buffer, so the smoke below runs the changed bind with the same addresses as main; it's a regression check, not a test of the new branch.
performance: 60 s smoke of a retail title, main 493dbd3d vs this merge (0abd5935): 1670 -> 1693 frames shown (101 %; last presents per 2 s: 60 60 60), peak commit 17083 -> 17182 MB, 0 device removals, 0 crashes.
verdict: safe to merge (a test through prepare_two_pass_stage, like andrewDoing's fixture, would pin the call site)
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7310468237 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7310468237). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T11:59:22Z. --- merge-check base: 493dbd3dd0cd50b4c3e8d28f73ab9b504fcd8158 head: 0364b388c60719f24e9043321f2c162e87a4ef5d merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2901 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: read the whole diff (+20/-2). The two-pass stage bind (`bind.rs` ~3108) was the last place that could bind a memory window whose GPU VA is 0 as a root view. Such a window is neither committed nor given a buffer by `sparse::init` (`real.rs` ~704-776), and a read through a null root view can remove the device. It now takes window 0 instead, as `bind_abi` and the replay in `console_list.rs` ~1077 already do. Findings: (1) The new test (`windows_without_a_buffer_take_window_0`, ~7958) covers the helper, not the two-pass call site, so it doesn't fail on main; andrewDoing's GPU fixture in the comments does exercise `prepare_two_pass_stage` and would make a good test. (2) When window 0 itself has VA 0, `first_window` (~5046-5048) returns 0 and `window_view` (~5058) still binds a null view. `bind_abi` has the same limit, so this PR doesn't add it (unverified that it happens). Fine: all four window slots and both passes are covered, and no other root parameters change. In the default 4-window layout every window has a buffer, so the smoke below runs the changed bind with the same addresses as main; it's a regression check, not a test of the new branch. performance: 60 s smoke of a retail title, main 493dbd3d vs this merge (0abd5935): 1670 -> 1693 frames shown (101 %; last presents per 2 s: 60 60 60), peak commit 17083 -> 17182 MB, 0 device removals, 0 crashes. verdict: safe to merge (a test through `prepare_two_pass_stage`, like andrewDoing's fixture, would pin the call site) hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
cj-tomlin commented 2026-12-01 18:40:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by cj-tomlin on 2026-12-01T18:40:08Z.


merge-check claim
head: 0364b388c6

<!-- greyfinch-sync:ivall/xcl:comment:7321306670 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7321306670). Originally posted by [cj-tomlin](https://github.com/cj-tomlin) on 2026-12-01T18:40:08Z. --- merge-check claim head: 0364b388c60719f24e9043321f2c162e87a4ef5d
cj-tomlin commented 2026-12-01 18:48:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by cj-tomlin on 2026-12-01T18:48:30Z.


merge-check
base: 6bfb5c5153
head: 0364b388c6
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2905 passed, 0 failed, 51 ignored; SKIPPED: 27 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer / d3d12SDKLayers.dll); failing: none. The new bind::tests::windows_without_a_buffer_take_window_0 passes.
review: none blocking, after reading the whole diff (+20/-2, bind.rs). prepare_two_pass_stage now filters a window address of 0 the way bind_abi_with_root_resolved already did, through one shared helper (window_view), so a window with no buffer gets window 0's buffer, never a null root view; addresses that are set are bound as before. As the description says, the new test checks the helper only and would not fail on the old two-pass code by itself, and on this setup every window has a buffer, so the changed path is not reached in a real title. No other open or merged PR makes this change; main still has the unfiltered line.
performance: no cost by default: one compare per window at bind time; the bound addresses are unchanged whenever every window has a buffer (reasoned, not measured).
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB, driver 621.40, AMD Ryzen 7 7800X3D, Windows 11 build 26300, debug build / Claude Code (Claude Opus 5.5) merged, built, ran the suite, read the diff and drafted this; I checked it.

<!-- greyfinch-sync:ivall/xcl:comment:7321583112 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7321583112). Originally posted by [cj-tomlin](https://github.com/cj-tomlin) on 2026-12-01T18:48:30Z. --- merge-check base: 6bfb5c5153ccc23517daf30aa1071ddb0fadb53c head: 0364b388c60719f24e9043321f2c162e87a4ef5d merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2905 passed, 0 failed, 51 ignored; SKIPPED: 27 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer / d3d12SDKLayers.dll); failing: none. The new `bind::tests::windows_without_a_buffer_take_window_0` passes. review: none blocking, after reading the whole diff (+20/-2, `bind.rs`). `prepare_two_pass_stage` now filters a window address of 0 the way `bind_abi_with_root_resolved` already did, through one shared helper (`window_view`), so a window with no buffer gets window 0's buffer, never a null root view; addresses that are set are bound as before. As the description says, the new test checks the helper only and would not fail on the old two-pass code by itself, and on this setup every window has a buffer, so the changed path is not reached in a real title. No other open or merged PR makes this change; `main` still has the unfiltered line. performance: no cost by default: one compare per window at bind time; the bound addresses are unchanged whenever every window has a buffer (reasoned, not measured). verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB, driver 621.40, AMD Ryzen 7 7800X3D, Windows 11 build 26300, debug build / Claude Code (Claude Opus 5.5) merged, built, ran the suite, read the diff and drafted this; I checked it.
Raul-Paiva commented 2026-12-03 08:07:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Raul-Paiva on 2026-12-03T08:07:44Z.


Thanks. On the two findings of the merge-check:

  1. The test covers the helper, not the call site. True, and Not tested says so: windows_without_a_buffer_take_window_0 does not fail on the old code by itself. A test through prepare_two_pass_stage needs a GPU with mesh shaders and the unified-memory windows set up in the test process, as in andrewDoing's fixture. I left it out to keep this PR to the one bind. If the maintainer wants it pinned here, I'll add it on top of that fixture.
  2. Window 0 itself at VA 0. Agreed that this PR keeps that limit and does not add it. first_window already refuses a window 0 without a buffer when the windows are shadowed. Otherwise it returns VA 0 as it is, and then window_view binds a null view, the same as bind_abi. I have not seen window 0 at VA 0 in a run. If it turns up, both binds should fail the same way, in their own PR.

The reply was posted by Claude Code (Claude Opus 5.5) on my behalf, and I reviewed it before it went out.

<!-- greyfinch-sync:ivall/xcl:comment:7371858358 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3052#issuecomment-7371858358). Originally posted by [Raul-Paiva](https://github.com/Raul-Paiva) on 2026-12-03T08:07:44Z. --- Thanks. On the two findings of the merge-check: 1. **The test covers the helper, not the call site.** True, and **Not tested** says so: `windows_without_a_buffer_take_window_0` does not fail on the old code by itself. A test through `prepare_two_pass_stage` needs a GPU with mesh shaders and the unified-memory windows set up in the test process, as in andrewDoing's fixture. I left it out to keep this PR to the one bind. If the maintainer wants it pinned here, I'll add it on top of that fixture. 2. **Window 0 itself at VA 0.** Agreed that this PR keeps that limit and does not add it. `first_window` already refuses a window 0 without a buffer when the windows are shadowed. Otherwise it returns VA 0 as it is, and then `window_view` binds a null view, the same as `bind_abi`. I have not seen window 0 at VA 0 in a run. If it turns up, both binds should fail the same way, in their own PR. The reply was posted by Claude Code (Claude Opus 5.5) on my behalf, and I reviewed it before it went out.
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/3052:upstream-pr/3052'
git switch 'upstream-pr/3052'

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