Revert "Recompiler: eliminate local array and branches in pixel-shader PRELUDE::rla()" (#2247) #2929

Open
github-bot wants to merge 1 commit from github-bot/gh-2929 into main AGit
Owner

@⁠Decodere on GitHub · 2026-11-27 00:29 UTC · original
Decodere:revert-2247-rla-branchless → main · +6 −127 · 1 files · 1 commits · open

Clean revert of #2247 (5081dc8b6e22fc74f6fe7d31de333182e8f7ec92, merged in 2898511), restoring the exact pre-#2247 PRELUDE::rla() implementation in crates/xcl/src/gpu/recomp/emit.rs.

Reverts #2247
Related to #1452

In #1452#issuecomment-7205972665, @SergeAx bisected 140 first-parent merges on main (568e7db..b49be18) on an RTX 5080 (NVIDIA driver 621.14, Windows 10 22H2) and isolated #2247 (2898511) as the first commit introducing 0x887a0005 (DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT) during retail world load (f9f6d49 / #2257: 0/4 removals; 2898511 / #2247: removed). Confirmation on b49be18 + #1435 hit 6/7 device removals with 5081dc8b present versus 0/5 removals with only 5081dc8b reverted.

Note on branch ancestry: 5081dc8b is also an ancestor of origin/nvidia-dev (ecc0bb57) and origin/amd-dev (bf7c82ee), so maintainers may want to cherry-pick or merge this revert into those branches once landed on main.

What is in it

  • Clean git revert 5081dc8b6e22fc74f6fe7d31de333182e8f7ec92 (crates/xcl/src/gpu/recomp/emit.rs, +6/-127 lines):
    • Restores xcl_lv[min(h >> 5, 3u)], scalar ?: for q/r, and the if (nib != 0u && ...) / if ((l >> 2) == ...) guards in pixel-shader PRELUDE::rla().
    • Removes the 3 #2247-specific branchless-rla() unit tests added by 5081dc8b, leaving all other emit::tests:: and gpu::recomp:: tests intact.

Tested

  • Hardware & toolchain: Windows 11 Home (build 26200), Intel Core i5-11400F (6C/12T), 32 GB RAM, NVIDIA GeForce RTX 4060 8 GB (32-lane waves, driver 621.14), rustc 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (WARP) and release (RTX 4060).
  • cargo clippy --all-targets -- -A clippy::approx_constant: exit 0, 0 new warnings and 0 errors in crates/xcl/src/gpu/recomp/emit.rs.
  • Debug WARP (XCL_WARP=1):
    • 3x cargo test -p xcl --lib -- gpu::recomp::emit::tests:: --nocapture --test-threads=1: 1 passed, 0 failed, 0 ignored (0 skipped).
    • cargo test -p xcl --lib -- gpu::recomp:: --test-threads=4: 398 passed, 0 failed, 20 ignored (23 expected SKIPPED notices: 20 wave64, 3 per-lane refusals).
  • Release RTX 4060:
    • 3x cargo test --release -p xcl --lib -- gpu::recomp::emit::tests:: --nocapture --test-threads=1: 1 passed, 0 failed, 0 ignored (0 skipped).
    • cargo test --release -p xcl --lib -- gpu::recomp:: --test-threads=4: 398 passed, 0 failed, 20 ignored (23 expected SKIPPED notices: 20 wave64, 3 per-lane refusals).
    • cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4: 1439 passed, 0 failed, 47 ignored across 37 top-level test targets (29 expected SKIPPED notices: 21 wave64, 3 per-lane refusals, 3 D3D12 debug layer, 1 heap-window fallback, 1 Windows driver-cache toggle).
  • Mergeability: git merge-tree --write-tree origin/main HEAD exits 0 against live origin/main (8b957bec).

Regression run
Paired quiet 60 s release runs (scripts/smoke.ps1 -Seconds 60, XCL_NETWORK=0, default flags, RTX 4060 8 GB, driver 621.14) on exact parent on main (e120925e, ancestor of 8b957bec) and revert head (a87d3c2a):

Exact parent on main (e120925e, ancestor of 8b957bec):

xcl-smoke v1
commit: e120925e3abc9956a8b9bae631969d32e8ccd43c
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1625 (PresentX 1625)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 14023 MB

PR (a87d3c2a):

xcl-smoke v1
commit: a87d3c2ac52bac1e7d2df4e6050171fb2dee0887
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1579 (PresentX 1579)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13992 MB

Not tested

  • Local reproduction of @SergeAx's RTX 5080 (Blackwell, Win10 22H2) world-load 0x887a0005 removal from #1452 (#1452#issuecomment-7205972665 already verified 0/5 removals with 5081dc8b reverted vs 6/7 without it).
  • AMD and Intel GPUs, 64-lane wave GPUs, D3D12 debug-layer tests (d3d12SDKLayers.dll not installed), and Linux / Wine / vkd3d-proton.

AI use

  • Google Antigravity (Gemini 4 Neon) verified 5081dc8b branch ancestry (main, nvidia-dev, amd-dev), prepared the clean git revert commit off e120925e, ran clippy, Debug WARP + Release RTX 4060 unit/recompiler/workspace suites and paired 60 s retail smokes on the hardware above, and drafted this PR description.
**@⁠Decodere** on GitHub · 2026-11-27 00:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/2929) `Decodere:revert-2247-rla-branchless` → `main` · +6 −127 · 1 files · 1 commits · open Clean revert of #2247 (`5081dc8b6e22fc74f6fe7d31de333182e8f7ec92`, merged in `2898511`), restoring the exact pre-#2247 `PRELUDE::rla()` implementation in `crates/xcl/src/gpu/recomp/emit.rs`. Reverts #2247 Related to #1452 In #1452#issuecomment-7205972665, `@SergeAx` bisected 140 first-parent merges on `main` (`568e7db..b49be18`) on an RTX 5080 (NVIDIA driver 621.14, Windows 10 22H2) and isolated #2247 (`2898511`) as the first commit introducing `0x887a0005` (`DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT`) during retail world load (`f9f6d49` / #2257: `0/4` removals; `2898511` / #2247: removed). Confirmation on `b49be18` + #1435 hit `6/7` device removals with `5081dc8b` present versus `0/5` removals with only `5081dc8b` reverted. Note on branch ancestry: `5081dc8b` is also an ancestor of `origin/nvidia-dev` (`ecc0bb57`) and `origin/amd-dev` (`bf7c82ee`), so maintainers may want to cherry-pick or merge this revert into those branches once landed on `main`. **What is in it** - Clean `git revert 5081dc8b6e22fc74f6fe7d31de333182e8f7ec92` (`crates/xcl/src/gpu/recomp/emit.rs`, `+6/-127` lines): - Restores `xcl_lv[min(h >> 5, 3u)]`, scalar `?:` for `q`/`r`, and the `if (nib != 0u && ...)` / `if ((l >> 2) == ...)` guards in pixel-shader `PRELUDE::rla()`. - Removes the 3 `#2247`-specific branchless-`rla()` unit tests added by `5081dc8b`, leaving all other `emit::tests::` and `gpu::recomp::` tests intact. **Tested** - Hardware & toolchain: Windows 11 Home (build 26200), Intel Core i5-11400F (6C/12T), 32 GB RAM, NVIDIA GeForce RTX 4060 8 GB (32-lane waves, driver 621.14), `rustc 1.100.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.9.2609.5`, debug (WARP) and release (RTX 4060). - `cargo clippy --all-targets -- -A clippy::approx_constant`: exit 0, 0 new warnings and 0 errors in `crates/xcl/src/gpu/recomp/emit.rs`. - Debug WARP (`XCL_WARP=1`): - 3x `cargo test -p xcl --lib -- gpu::recomp::emit::tests:: --nocapture --test-threads=1`: **1 passed, 0 failed, 0 ignored** (0 skipped). - `cargo test -p xcl --lib -- gpu::recomp:: --test-threads=4`: **398 passed, 0 failed, 20 ignored** (23 expected `SKIPPED` notices: 20 wave64, 3 per-lane refusals). - Release RTX 4060: - 3x `cargo test --release -p xcl --lib -- gpu::recomp::emit::tests:: --nocapture --test-threads=1`: **1 passed, 0 failed, 0 ignored** (0 skipped). - `cargo test --release -p xcl --lib -- gpu::recomp:: --test-threads=4`: **398 passed, 0 failed, 20 ignored** (23 expected `SKIPPED` notices: 20 wave64, 3 per-lane refusals). - `cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4`: **1439 passed, 0 failed, 47 ignored** across 37 top-level test targets (29 expected `SKIPPED` notices: 21 wave64, 3 per-lane refusals, 3 D3D12 debug layer, 1 heap-window fallback, 1 Windows driver-cache toggle). - Mergeability: `git merge-tree --write-tree origin/main HEAD` exits `0` against live `origin/main` (`8b957bec`). **Regression run** Paired quiet 60 s release runs (`scripts/smoke.ps1 -Seconds 60`, `XCL_NETWORK=0`, default flags, RTX 4060 8 GB, driver 621.14) on exact parent on `main` (`e120925e`, ancestor of `8b957bec`) and revert head (`a87d3c2a`): Exact parent on `main` (`e120925e`, ancestor of `8b957bec`): ``` xcl-smoke v1 commit: e120925e3abc9956a8b9bae631969d32e8ccd43c gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1625 (PresentX 1625) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 14023 MB ``` PR (`a87d3c2a`): ``` xcl-smoke v1 commit: a87d3c2ac52bac1e7d2df4e6050171fb2dee0887 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1579 (PresentX 1579) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13992 MB ``` **Not tested** - Local reproduction of `@SergeAx`'s RTX 5080 (Blackwell, Win10 22H2) world-load `0x887a0005` removal from #1452 (`#1452#issuecomment-7205972665` already verified `0/5` removals with `5081dc8b` reverted vs `6/7` without it). - AMD and Intel GPUs, 64-lane wave GPUs, D3D12 debug-layer tests (`d3d12SDKLayers.dll` not installed), and Linux / Wine / vkd3d-proton. **AI use** - Google Antigravity (Gemini 4 Neon) verified `5081dc8b` branch ancestry (`main`, `nvidia-dev`, `amd-dev`), prepared the clean `git revert` commit off `e120925e`, ran clippy, Debug WARP + Release RTX 4060 unit/recompiler/workspace suites and paired 60 s retail smokes on the hardware above, and drafted this PR description.
This reverts commit 5081dc8b6e (merged in
2898511 / PR #2247), restoring the exact pre-#2247 `PRELUDE::rla()`
implementation in `crates/xcl/src/gpu/recomp/emit.rs`.

In #1452#issuecomment-7205972665, @SergeAx bisected 140 merges on
`main` (`568e7db..b49be18`) on an RTX 5080 (driver 621.14, Windows 10)
and isolated #2247 (`2898511`) as the first commit introducing
`0x887a0005` (`DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT`) during retail
world load (`f9f6d49` / #2257: 0/4 removals; `2898511` / #2247: bad).
Confirmation on `b49be18` + #1435 hit 6/7 device removals with
`5081dc8b` present versus 0/5 removals with only `5081dc8b` reverted.

Note: `5081dc8b` is also an ancestor of `nvidia-dev` (`ecc0bb57`) and
`amd-dev` (`bf7c82ee`).

Reverts #2247
Related to #1452

Assisted-by: Google Antigravity (Gemini 4 Neon)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:16:30 +00:00
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-27 01:00 UTC · original

Tested

Clean PR head a87d3c2ac52bac1e7d2df4e6050171fb2dee0887 and parent e120925e3abc9956a8b9bae631969d32e8ccd43c on Intel Arc A770 driver 32.0.101.9175, Windows 11 build 26200, Ryzen 7 3800X, Rust 1.100.0 MSVC and DXC/DXIL 1.9.2602.17. Built with cargo test -j 2 --locked -p xcl --lib --test console_shaders --no-run --message-format=json using separate target directories, CARGO_PROFILE_TEST_DEBUG=0 and CARGO_INCREMENTAL=0.

With XCL_ADAPTER=A770, ran the libtest executable with --exact --nocapture --test-threads=1 for each of the following checked-in synthetic tests under the shared Arc mutex.

  • gpu::recomp::tests::gpu_ps_masks_hold_helper_lanes_on_triangle_edges
  • gpu::recomp::tests::gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends
  • gpu::recomp::tests::gpu_ps_mask_loop_on_a_primitive_edge_ends
  • gpu::recomp::tests::gpu_ps_helper_lanes_see_ballots_and_quads_are_lanes_4k

All four passed on both revisions, with zero failures, ignores or skips. The derivative and loop cases reported no pixel mismatches. The ballot/quad test matched the expected layout across 1,024 pixels and ballot values in the tested helper neighbors. The parent-only gpu::recomp::emit::tests::gpu_rla_pixel_shader_matches_reference_including_helper_lanes also passed all 1,024 pixel assertions.

Not tested

Retail crash, performance, native wave64 hardware, full workspace suite and retail smoke.

AI use

T3 Code / Codex (gpt-6.2-sol for the worker run) built and ran the fixtures. Codex in the coordinator session reran the four shared GPU tests and the parent-only control and drafted this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-27 01:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/2929#issuecomment-7206935107) **Tested** Clean PR head `a87d3c2ac52bac1e7d2df4e6050171fb2dee0887` and parent `e120925e3abc9956a8b9bae631969d32e8ccd43c` on Intel Arc A770 driver 32.0.101.9175, Windows 11 build 26200, Ryzen 7 3800X, Rust 1.100.0 MSVC and DXC/DXIL 1.9.2602.17. Built with `cargo test -j 2 --locked -p xcl --lib --test console_shaders --no-run --message-format=json` using separate target directories, `CARGO_PROFILE_TEST_DEBUG=0` and `CARGO_INCREMENTAL=0`. With `XCL_ADAPTER=A770`, ran the libtest executable with `--exact --nocapture --test-threads=1` for each of the following checked-in synthetic tests under the shared Arc mutex. - `gpu::recomp::tests::gpu_ps_masks_hold_helper_lanes_on_triangle_edges` - `gpu::recomp::tests::gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends` - `gpu::recomp::tests::gpu_ps_mask_loop_on_a_primitive_edge_ends` - `gpu::recomp::tests::gpu_ps_helper_lanes_see_ballots_and_quads_are_lanes_4k` All four passed on both revisions, with zero failures, ignores or skips. The derivative and loop cases reported no pixel mismatches. The ballot/quad test matched the expected layout across 1,024 pixels and ballot values in the tested helper neighbors. The parent-only `gpu::recomp::emit::tests::gpu_rla_pixel_shader_matches_reference_including_helper_lanes` also passed all 1,024 pixel assertions. **Not tested** Retail crash, performance, native wave64 hardware, full workspace suite and retail smoke. **AI use** T3 Code / Codex (`gpt-6.2-sol` for the worker run) built and ran the fixtures. Codex in the coordinator session reran the four shared GPU tests and the parent-only control and drafted this report.
Author
Owner

@⁠DarkPanda69 on GitHub · 2026-11-27 01:03 UTC · original

AMD and RTX 3060 run, moved here since #2930 closed as a duplicate. Its diff is byte-identical to this one (a87d3c2), so the results apply here.

Tested: pass, the diff applied on main 8b957be, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17, XCL_DIRECT_DXIL unset (the HLSL path), card picked with XCL_ADAPTER.
cargo test -p xcl --lib -- gpu:: --test-threads=4 --nocapture, main and the revert one after the other on each card:

  • AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010: main 708 passed, 2 failed, 6 SKIPPED; revert 705 passed, 2 failed, 6 SKIPPED. The 2 failures are fuzz_validate_and_gpu_1 and _3 (#2115), the same on main.
  • NVIDIA RTX 3060, driver 32.0.16.1088: main 710 passed, 0 failed, 24 SKIPPED; revert 707 passed, 0 failed, 24 SKIPPED.

On both cards the only differences are the three #2247 tests the revert removes. The SKIPPED sets are the same. This doesn't touch the Blackwell world-load removal; I have no RTX 50 card.

Not tested: a title run, an RTX 50 card, Windows 10, release, Intel.

AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

**@⁠DarkPanda69** on GitHub · 2026-11-27 01:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/2929#issuecomment-7206979450) AMD and RTX 3060 run, moved here since #2930 closed as a duplicate. Its diff is byte-identical to this one (`a87d3c2`), so the results apply here. **Tested:** pass, the diff applied on `main` `8b957be`, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17, `XCL_DIRECT_DXIL` unset (the HLSL path), card picked with `XCL_ADAPTER`. `cargo test -p xcl --lib -- gpu:: --test-threads=4 --nocapture`, `main` and the revert one after the other on each card: - AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010: `main` 708 passed, 2 failed, 6 SKIPPED; revert 705 passed, 2 failed, 6 SKIPPED. The 2 failures are `fuzz_validate_and_gpu_1` and `_3` (#2115), the same on `main`. - NVIDIA RTX 3060, driver 32.0.16.1088: `main` 710 passed, 0 failed, 24 SKIPPED; revert 707 passed, 0 failed, 24 SKIPPED. On both cards the only differences are the three #2247 tests the revert removes. The SKIPPED sets are the same. This doesn't touch the Blackwell world-load removal; I have no RTX 50 card. **Not tested:** a title run, an RTX 50 card, Windows 10, release, Intel. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Author
Owner

@⁠throny on GitHub · 2026-11-27 01:48 UTC · original

Testing this now on nvidia-dev (ecc0bb57 + #684 + #2794, RTX 4080 16 GB, driver 621.40): the revert applies cleanly there, shaders are being re-translated for it, then two world runs against two runs of the same build without it. On this head our device losses (0x887a0005, no DRED breadcrumbs) came 147 s and 588 s after the first frame; details in #2688. I will post the four results here and on #1452. AI use: Claude Code (Claude Fable 5.2).

**@⁠throny** on GitHub · 2026-11-27 01:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/2929#issuecomment-7207592390) Testing this now on `nvidia-dev` (ecc0bb57 + #684 + #2794, RTX 4080 16 GB, driver 621.40): the revert applies cleanly there, shaders are being re-translated for it, then two world runs against two runs of the same build without it. On this head our device losses (0x887a0005, no DRED breadcrumbs) came 147 s and 588 s after the first frame; details in https://git.gtahub.st/github/xcl-dev--xcl/issues/2688. I will post the four results here and on #1452. AI use: Claude Code (Claude Fable 5.2).
Author
Owner

@⁠SergeAx on GitHub · 2026-11-27 01:49 UTC · original · edited 2026-11-27 06:24 UTC

Test report: a87d3c2a on the RTX 5080 from #1452: no device removal in 5 of 5 runs. All of them passed the world-load step at 99–128 s and ran to 240 s without a crash.

Tested

  • NVIDIA GeForce RTX 5080, driver 621.14; AMD Ryzen 5 3500X; Windows 10 Pro 22H2 (19045.6466); Rust 1.100.0, release
  • a87d3c2a with #1435's 14c8a2d cherry-picked (461eddc8; #1435 only changes hle/xg.rs, for the title's crash at ~98 s in #662), cargo build --release -p xcl
  • The retail title from #1452 (1.0.2.1), unattended runs of 240 s with XCL_PRESS_A_AT=20,24,…,140 XCL_DRED=1 XCL_NETWORK=0, warm caches:
run world-load step (first 7-argument XG copy) device removed end
1 113.6 s no 240 s, 2186 frames shown
2 127.7 s no 240 s, 2507 frames shown
3 115.0 s no 240 s, 2131 frames shown
4 99.6 s no 240 s, 1851 frames shown
5 99.5 s no 240 s, 1697 frames shown
  • For comparison, from the bisect: main b49be18 with #1435 lost the device after the step in 6 of 7 runs. b49be18 with #1435 and this revert, whose emit.rs is identical to a87d3c2a's, lost it in 0 of 5.

Not tested

  • e120925e (this PR's base) with #1435 but without the revert; the removal rate above is from b49be18, 3 merges older
  • The test suite on this commit
  • AMD and Intel GPUs, other NVIDIA drivers, Windows 11

Also on nvidia-dev, which still contains #2247: ecc0bb57 + this PR's commit + #1435's 14c8a2d (9ff0bc8a), same machine, release.

  • 5 unattended runs with XCL_PREPARE=0 XCL_DRED=1 XCL_NETWORK=0 and the same presses: 1800, 600, 1800, 240 and 240 s, the two short ones with XCL_PAGE_MAPPINGS=0 or XCL_DISPATCH_LOOP_BUDGET=0.
  • All passed the world-load step at 99–121 s and ran to their end: no device removal, no crash, about 69 minutes past the step in all.
  • After the step these runs mostly waited for graphics pipelines being built and drew few frames, so the GPU had less to do than in the main runs above, and less than in @⁠throny's runs here, which kept drawing with XCL_GFX_PSO_WAIT_MS=200 and still lost the device with the revert. These runs do not contradict that.
  • An open-ended run with XCL_GFX_PSO_WAIT_MS=200 is going now; I will add how it ends.
  • Not tested: nvidia-dev without this commit on this card.

AI use: Claude Code (Claude Opus 5.5) built the tree, ran the title unattended, read the logs and wrote this report.

**@⁠SergeAx** on GitHub · 2026-11-27 01:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/2929#issuecomment-7207600871) · edited 2026-11-27 06:24 UTC **Test report: `a87d3c2a` on the RTX 5080 from #1452: no device removal in 5 of 5 runs.** All of them passed the world-load step at 99–128 s and ran to 240 s without a crash. **Tested** - NVIDIA GeForce RTX 5080, driver 621.14; AMD Ryzen 5 3500X; Windows 10 Pro 22H2 (19045.6466); Rust 1.100.0, release - `a87d3c2a` with #1435's `14c8a2d` cherry-picked (`461eddc8`; #1435 only changes `hle/xg.rs`, for the title's crash at ~98 s in #662), `cargo build --release -p xcl` - The retail title from #1452 (1.0.2.1), unattended runs of 240 s with `XCL_PRESS_A_AT=20,24,…,140 XCL_DRED=1 XCL_NETWORK=0`, warm caches: | run | world-load step (first 7-argument XG copy) | device removed | end | |---|---|---|---| | 1 | 113.6 s | no | 240 s, 2186 frames shown | | 2 | 127.7 s | no | 240 s, 2507 frames shown | | 3 | 115.0 s | no | 240 s, 2131 frames shown | | 4 | 99.6 s | no | 240 s, 1851 frames shown | | 5 | 99.5 s | no | 240 s, 1697 frames shown | - For comparison, from [the bisect](https://git.gtahub.st/github/xcl-dev--xcl/issues/1452): `main` `b49be18` with #1435 lost the device after the step in 6 of 7 runs. `b49be18` with #1435 and this revert, whose `emit.rs` is identical to `a87d3c2a`'s, lost it in 0 of 5. **Not tested** - `e120925e` (this PR's base) with #1435 but without the revert; the removal rate above is from `b49be18`, 3 merges older - The test suite on this commit - AMD and Intel GPUs, other NVIDIA drivers, Windows 11 **Also on `nvidia-dev`**, which still contains #2247: `ecc0bb57` + this PR's commit + #1435's `14c8a2d` (`9ff0bc8a`), same machine, release. - 5 unattended runs with `XCL_PREPARE=0 XCL_DRED=1 XCL_NETWORK=0` and the same presses: 1800, 600, 1800, 240 and 240 s, the two short ones with `XCL_PAGE_MAPPINGS=0` or `XCL_DISPATCH_LOOP_BUDGET=0`. - All passed the world-load step at 99–121 s and ran to their end: no device removal, no crash, about 69 minutes past the step in all. - After the step these runs mostly waited for graphics pipelines being built and drew few frames, so the GPU had less to do than in the `main` runs above, and less than in @⁠throny's runs here, which kept drawing with `XCL_GFX_PSO_WAIT_MS=200` and still lost the device with the revert. These runs do not contradict that. - An open-ended run with `XCL_GFX_PSO_WAIT_MS=200` is going now; I will add how it ends. - Not tested: `nvidia-dev` without this commit on this card. AI use: Claude Code (Claude Opus 5.5) built the tree, ran the title unattended, read the logs and wrote this report.
Author
Owner

@⁠throny on GitHub · 2026-11-27 03:34 UTC · original

Result on nvidia-dev (ecc0bb57 + #684 + #2794), RTX 4080 16 GB, driver 621.40, Windows 11 26300, 64 GB RAM without a page file - same save, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_GFX_PSO_WAIT_MS=200 XCL_TEXTURE_LEVEL_PAGES=1 XCL_CS_PSO_WAIT_MS=200, up to 700 s from the first game frame, shaders re-translated for the revert (12,101 pixel shader records in 26 min, 0 errors):

build run device removed (0x887a0005) how the run ended
without this PR 94 147 s after the first frame device removed
without this PR (+ #2831 #2927 #2931) 95 156 s device removed
with this PR 97 352 s device removed
with this PR 98 not in 265 s our memory guard ended it (process commit 51.7 GB, under 3 GB free on this machine)

So with the revert the title lived more than twice as long in both runs, but one of the two still lost the device (again without DRED breadcrumbs, see #2920, and without an Aftermath dump). Two runs a side is thin: it agrees with the bisect in #1452 in direction, and it shows that on this card the revert alone is not the whole story. In the longer runs the next limit is commit: 45.6 GB at 352 s and 51.7 GB at 265 s, against about 40 GB at 150 s in the runs without it.

I can add runs if a larger sample helps the decision here; say how many. Numbers are from the logs of these runs. AI use: Claude Code (Claude Fable 5.2) ran the tests and wrote this.

**@⁠throny** on GitHub · 2026-11-27 03:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/2929#issuecomment-7209104961) **Result on `nvidia-dev` (ecc0bb57 + #684 + #2794), RTX 4080 16 GB, driver 621.40, Windows 11 26300, 64 GB RAM without a page file** - same save, `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_GFX_PSO_WAIT_MS=200 XCL_TEXTURE_LEVEL_PAGES=1 XCL_CS_PSO_WAIT_MS=200`, up to 700 s from the first game frame, shaders re-translated for the revert (12,101 pixel shader records in 26 min, 0 errors): | build | run | device removed (0x887a0005) | how the run ended | |---|---|---|---| | without this PR | 94 | 147 s after the first frame | device removed | | without this PR (+ #2831 #2927 #2931) | 95 | 156 s | device removed | | **with this PR** | 97 | 352 s | device removed | | **with this PR** | 98 | not in 265 s | our memory guard ended it (process commit 51.7 GB, under 3 GB free on this machine) | So with the revert the title lived more than twice as long in both runs, but one of the two still lost the device (again without DRED breadcrumbs, see #2920, and without an Aftermath dump). Two runs a side is thin: it agrees with the bisect in #1452 in direction, and it shows that on this card the revert alone is not the whole story. In the longer runs the next limit is commit: 45.6 GB at 352 s and 51.7 GB at 265 s, against about 40 GB at 150 s in the runs without it. I can add runs if a larger sample helps the decision here; say how many. Numbers are from the logs of these runs. AI use: Claude Code (Claude Fable 5.2) ran the tests and wrote this.
Author
Owner

@⁠throny on GitHub · 2026-11-27 04:55 UTC · original

More runs, same setup as the table above: without the revert a third run lost the device at 146 s (so 147, 156, 146 s). With the revert, two further runs on a5e2d851 that also carried a ported XCL_CHAIN_WHOLE=1 prototype lost it at 212 s and 202 s (so 352 s, not within 265 s, 212 s, 202 s). The revert still roughly doubles the time to the loss here and does not remove it; the last two differ from the first two by the extra switch and the newer base, so they are not a clean repeat. AI use: Claude Code (Claude Fable 5.2).

**@⁠throny** on GitHub · 2026-11-27 04:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/2929#issuecomment-7210210735) More runs, same setup as the table above: without the revert a third run lost the device at 146 s (so 147, 156, 146 s). With the revert, two further runs on `a5e2d851` that also carried a ported `XCL_CHAIN_WHOLE=1` prototype lost it at 212 s and 202 s (so 352 s, not within 265 s, 212 s, 202 s). The revert still roughly doubles the time to the loss here and does not remove it; the last two differ from the first two by the extra switch and the newer base, so they are not a clean repeat. AI use: Claude Code (Claude Fable 5.2).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2929/head:github-bot/gh-2929'
git switch 'github-bot/gh-2929'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2929'
git switch 'github-bot/gh-2929'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2929'
git switch 'github-bot/gh-2929'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2929'
git switch 'main'
git merge --squash 'github-bot/gh-2929'
git switch 'main'
git merge --ff-only 'github-bot/gh-2929'
git switch 'main'
git merge 'github-bot/gh-2929'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.