Shaders: reset branch targets per FSSM program and avoid merging across data blocks #1497

Merged
b3IKK merged 1 commit from upstream-pr/1507 into main 2026-11-29 12:17:35 +00:00
b3IKK commented 2026-11-24 17:04:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-24T17:04:26Z.


In gpu/xbox.rs, FSSM segment grouping accumulated targets across every program without resetting when a new program started, and merged subsequent segments into f.programs.last_mut() without checking for an intervening data block:

  • A stale branch target from Program 0 pointing to Segment 2 caused Segment 2 to be merged into an unrelated Program 1.
  • Merging Segment 2 into Program 0 across an intervening constant data block extended Program 0's len over the raw constant data while also keeping it in f.data_blocks.

This resets targets = own whenever a new program is pushed onto f.programs, and prevents merging a segment into the preceding program across an intervening data block.

What is in it

  • crates/xcl/src/gpu/xbox.rs: reset targets per program, guard against merging across intervening data_blocks, and add unit test branch_target_from_earlier_program_does_not_merge_into_later_program_or_across_data (verified failing before the fix).

Tested

  • hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1)
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4): 771 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2 no wave64 — gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware)
  • cargo test -p xcl --lib gpu::xbox: 10 passed, 0 failed (branch_target_from_earlier_program_does_not_merge_into_later_program_or_across_data failed before the fix)

Regression run

main:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1226 (PresentX 1226)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15341 MB

PR:

xcl-smoke v1
commit: 0344d91cab27388b13da065be1dbbc32f5741740
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1644 (PresentX 1644)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14601 MB

Not tested

  • AMD GPUs and native wave64 hardware
  • other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine

AI use

  • OpenCode, Gemini 4 Neon: audited gpu/xbox.rs, wrote the fix and unit test, ran the test suite and scripts/smoke.ps1 regression runs, and drafted this PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5476738859 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1507). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-24T17:04:26Z. --- In `gpu/xbox.rs`, FSSM segment grouping accumulated `targets` across every program without resetting when a new program started, and merged subsequent segments into `f.programs.last_mut()` without checking for an intervening data block: - A stale branch target from Program 0 pointing to Segment 2 caused Segment 2 to be merged into an unrelated Program 1. - Merging Segment 2 into Program 0 across an intervening constant data block extended Program 0's `len` over the raw constant data while also keeping it in `f.data_blocks`. This resets `targets = own` whenever a new program is pushed onto `f.programs`, and prevents merging a segment into the preceding program across an intervening data block. **What is in it** - `crates/xcl/src/gpu/xbox.rs`: reset `targets` per program, guard against merging across intervening `data_blocks`, and add unit test `branch_target_from_earlier_program_does_not_merge_into_later_program_or_across_data` (verified failing before the fix). **Tested** - hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2609.5, debug (`scripts/test.ps1`) and release (`scripts/smoke.ps1`) - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`): 771 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2 `no wave64` — `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware`) - `cargo test -p xcl --lib gpu::xbox`: 10 passed, 0 failed (`branch_target_from_earlier_program_does_not_merge_into_later_program_or_across_data` failed before the fix) **Regression run** main: ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1226 (PresentX 1226) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15341 MB ``` PR: ``` xcl-smoke v1 commit: 0344d91cab27388b13da065be1dbbc32f5741740 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1644 (PresentX 1644) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14601 MB ``` **Not tested** - AMD GPUs and native wave64 hardware - other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine **AI use** - OpenCode, Gemini 4 Neon: audited `gpu/xbox.rs`, wrote the fix and unit test, ran the test suite and `scripts/smoke.ps1` regression runs, and drafted this PR description.
DavidM1911 commented 2026-11-24 19:07:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:44Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141302408 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1507#issuecomment-7141302408). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:53:44Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
Belox17 commented 2026-11-24 21:09:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Belox17 on 2026-11-24T20:02:54Z.


Test report for 0344d91c on NVIDIA (RTX 3060 Ti): passes, and the test fails without the fix

Tested

  • NVIDIA GeForce RTX 3060 Ti 8 GB (32-lane waves), driver 32.0.16.2124; Ryzen 5 5600X; Windows 11 build 26300; rustc 1.98.1 MSVC; DXC 1.8.2502.11 (Windows SDK 10.0.26100); debug build. Head 0344d91c as is (base b7aa9f3), clean tree.
  • The new test (branch_target_from_earlier_program_does_not_merge_into_later_program_or_across_data) with cargo test -p xcl --lib <name>: 1 passed.
  • cargo test --workspace -- --test-threads=4 on the head: 771 passed, 0 failed, 41 ignored; its base b7aa9f3 on the same machine: 770 passed, 0 failed, 41 ignored. SKIPPED on both: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64).
  • Merged into current main c160d86e (clean merge): 859 passed, 0 failed, 42 ignored; main alone: 858 passed, 0 failed, 42 ignored, the same three SKIPPED as above.
  • With the non-test hunks of gpu/xbox.rs reverted (test kept), the test fails: stale target from Program 0 must not merge Seg 2 into Program 1: [Program { offset: 776, len: 8 }, Program { offset: 784, len: 16 }], left 2, right 3.

Not tested

  • AMD / native wave64 hardware; any retail title (no smoke run).

AI use: Claude Code (Claude Opus 5.5) ran the commands on this machine and wrote this report from those runs.

<!-- greyfinch-sync:ivall/xcl:comment:7142967237 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1507#issuecomment-7142967237). Originally posted by [Belox17](https://github.com/Belox17) on 2026-11-24T20:02:54Z. --- **Test report for `0344d91c` on NVIDIA (RTX 3060 Ti): passes, and the test fails without the fix** **Tested** - NVIDIA GeForce RTX 3060 Ti 8 GB (32-lane waves), driver 32.0.16.2124; Ryzen 5 5600X; Windows 11 build 26300; rustc 1.98.1 MSVC; DXC 1.8.2502.11 (Windows SDK 10.0.26100); debug build. Head `0344d91c` as is (base `b7aa9f3`), clean tree. - The new test (`branch_target_from_earlier_program_does_not_merge_into_later_program_or_across_data`) with `cargo test -p xcl --lib <name>`: 1 passed. - `cargo test --workspace -- --test-threads=4` on the head: **771 passed, 0 failed, 41 ignored**; its base `b7aa9f3` on the same machine: 770 passed, 0 failed, 41 ignored. SKIPPED on both: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64). - Merged into current `main` `c160d86e` (clean merge): **859 passed, 0 failed, 42 ignored**; `main` alone: 858 passed, 0 failed, 42 ignored, the same three SKIPPED as above. - With the non-test hunks of `gpu/xbox.rs` reverted (test kept), the test fails: `stale target from Program 0 must not merge Seg 2 into Program 1: [Program { offset: 776, len: 8 }, Program { offset: 784, len: 16 }]`, left `2`, right `3`. **Not tested** - AMD / native wave64 hardware; any retail title (no smoke run). **AI use:** Claude Code (Claude Opus 5.5) ran the commands on this machine and wrote this report from those runs.
oni-swr commented 2026-11-25 18:04:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-25T17:09:50Z.


amd-win test report for 0344d91c (exact head 0344d91cab27388b13da065be1dbbc32f5741740) on AMD Radeon RX 7800 XT

Tested

  • AMD Radeon RX 7800 XT 16 GB (RDNA3), driver 32.0.31035.1003; Ryzen 7 5700X3D; Windows 11 build 26200; rustc 1.100.0 MSVC; DXC 1.8.2502.11 (Windows SDK 10.0.26100); debug build for the tests, release build for the smoke runs
  • The PR head exactly as pushed (its base is older than current main; the merged tree was not tested). Merges cleanly into origin/main 55d64c27 (git merge-tree)
  • Focused: cargo test -p xcl --lib branch_target_from_earlier_program: 1 passed (the new test); cargo test -p xcl --lib xbox::tests: 9 passed, 0 failed
  • Full suite, cargo test --workspace -- --test-threads=4: 771 passed, 0 failed, 41 ignored; no SKIPPED lines printed

Regression run (own test title tests/testtitle, 60 s, release; same title and time for both. The test title exits with code 2 by design and shows no frames, so crashes: 1 is its normal exit and is the same on both)
PR head:

xcl-smoke v1
commit: 0344d91cab27388b13da065be1dbbc32f5741740
gpu: AMD Radeon RX 7800 XT
title: testgame
seconds: 60
exit: 0x2
frames shown: none logged (the run did not reach its end)
presents per 2 s (last 3): 
device removals: 0
crashes: 1
peak commit: n/a MB

main (b7aa9f3):

xcl-smoke v1
commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7
gpu: AMD Radeon RX 7800 XT
title: testgame
seconds: 60
exit: 0x2
frames shown: none logged (the run did not reach its end)
presents per 2 s (last 3): 
device removals: 0
crashes: 1
peak commit: n/a MB

Not tested

  • No retail title: this is a run of our own test title only, so the smoke run does not reach the code this PR changes and says nothing about frames or frame time
  • Other GPUs (NVIDIA / Intel), wave64-only paths on other adapters, and the merged tree on current main

AI use

  • Run and written up by Claude Code (Claude Sonnet 5.5) from real runs on the hardware named above, for oni-swr. No code was changed.
<!-- greyfinch-sync:ivall/xcl:comment:7169099290 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1507#issuecomment-7169099290). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-25T17:09:50Z. --- **amd-win test report for `0344d91c` (exact head `0344d91cab27388b13da065be1dbbc32f5741740`) on AMD Radeon RX 7800 XT** **Tested** - AMD Radeon RX 7800 XT 16 GB (RDNA3), driver 32.0.31035.1003; Ryzen 7 5700X3D; Windows 11 build 26200; rustc 1.100.0 MSVC; DXC 1.8.2502.11 (Windows SDK 10.0.26100); debug build for the tests, release build for the smoke runs - The PR head exactly as pushed (its base is older than current `main`; the merged tree was not tested). Merges cleanly into `origin/main` `55d64c27` (`git merge-tree`) - Focused: `cargo test -p xcl --lib branch_target_from_earlier_program`: 1 passed (the new test); `cargo test -p xcl --lib xbox::tests`: 9 passed, 0 failed - Full suite, `cargo test --workspace -- --test-threads=4`: 771 passed, 0 failed, 41 ignored; no SKIPPED lines printed **Regression run** (own test title `tests/testtitle`, 60 s, release; same title and time for both. The test title exits with code 2 by design and shows no frames, so `crashes: 1` is its normal exit and is the same on both) PR head: ``` xcl-smoke v1 commit: 0344d91cab27388b13da065be1dbbc32f5741740 gpu: AMD Radeon RX 7800 XT title: testgame seconds: 60 exit: 0x2 frames shown: none logged (the run did not reach its end) presents per 2 s (last 3): device removals: 0 crashes: 1 peak commit: n/a MB ``` `main` (b7aa9f3): ``` xcl-smoke v1 commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7 gpu: AMD Radeon RX 7800 XT title: testgame seconds: 60 exit: 0x2 frames shown: none logged (the run did not reach its end) presents per 2 s (last 3): device removals: 0 crashes: 1 peak commit: n/a MB ``` **Not tested** - No retail title: this is a run of our own test title only, so the smoke run does not reach the code this PR changes and says nothing about frames or frame time - Other GPUs (NVIDIA / Intel), wave64-only paths on other adapters, and the merged tree on current `main` **AI use** - Run and written up by Claude Code (Claude Sonnet 5.5) from real runs on the hardware named above, for `oni-swr`. No code was changed.
Decodere commented 2026-11-27 12:30:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T12:30:12Z.


Independent desktop NVIDIA verification of PR #1507 at head 0344d91cab27388b13da065be1dbbc32f5741740 (1 commit; exact parent & merge-base: b7aa9f3bd212088e0d927439284dc5ed325ce3c7, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12, Wave32-only Ada), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted tests & build (0344d91c)

Command Result
cargo test --release -p xcl --lib branch_target_from_earlier_program_does_not_merge_into_later_program_or_across_data -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 743 filtered out × 3 (0.00s, 0.00s, 0.00s, 0 skipped)
cargo test --release -p xcl --lib gpu::xbox:: -- --nocapture (3 consecutive runs) 10 passed; 0 failed; 0 ignored; 734 filtered out × 3 (0.00s, 0.00s, 0.00s, 0 skipped)
cargo build --release -p xcl Clean build (1m 04s, exit 0, 0 new warnings in xbox.rs)

Paired quiet 60 s retail smoke (title: 29640639)

(Note: scripts/smoke.ps1 at b7aa9f3b predates 9683e7a6 and printed the local folder basename on title:; replaced below with the standard 9683e7a6 title hash 29640639, with all measured fields verbatim.)

Exact parent & merge-base (b7aa9f3bd212088e0d927439284dc5ed325ce3c7):

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

PR #1507 (0344d91cab27388b13da065be1dbbc32f5741740):

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

Limits of coverage

  • branch_target_from_earlier_program_does_not_merge_into_later_program_or_across_data and all 10/10 gpu::xbox:: shader-container splitting tests (0 skipped) passed 3/3.
  • The 60 s retail smoke exercises live Xbox shader blob parsing and runs cleanly to steady 60 Hz (0 device removals, 0 crashes); single-run frame/commit delta vs. parent reflects normal startup variance.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7218318446 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1507#issuecomment-7218318446). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T12:30:12Z. --- Independent desktop NVIDIA verification of **PR #1507** at head `0344d91cab27388b13da065be1dbbc32f5741740` (`1` commit; exact parent & merge-base: `b7aa9f3bd212088e0d927439284dc5ed325ce3c7`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12, Wave32-only Ada), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted tests & build (`0344d91c`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib branch_target_from_earlier_program_does_not_merge_into_later_program_or_across_data -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 743 filtered out` × 3 (`0.00s`, `0.00s`, `0.00s`, `0` skipped) | | `cargo test --release -p xcl --lib gpu::xbox:: -- --nocapture` (3 consecutive runs) | `10 passed; 0 failed; 0 ignored; 734 filtered out` × 3 (`0.00s`, `0.00s`, `0.00s`, `0` skipped) | | `cargo build --release -p xcl` | Clean build (`1m 04s`, exit `0`, `0` new warnings in `xbox.rs`) | ### Paired quiet 60 s retail smoke (`title: 29640639`) *(Note: `scripts/smoke.ps1` at `b7aa9f3b` predates `9683e7a6` and printed the local folder basename on `title:`; replaced below with the standard `9683e7a6` title hash `29640639`, with all measured fields verbatim.)* Exact parent & merge-base (`b7aa9f3bd212088e0d927439284dc5ed325ce3c7`): ``` xcl-smoke v1 commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1598 (PresentX 1599) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 14719 MB ``` PR #1507 (`0344d91cab27388b13da065be1dbbc32f5741740`): ``` xcl-smoke v1 commit: 0344d91cab27388b13da065be1dbbc32f5741740 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1586 (PresentX 1586) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14712 MB ``` ### Limits of coverage - `branch_target_from_earlier_program_does_not_merge_into_later_program_or_across_data` and all `10/10` `gpu::xbox::` shader-container splitting tests (`0` skipped) passed `3/3`. - The 60 s retail smoke exercises live Xbox shader blob parsing and runs cleanly to steady 60 Hz (`0` device removals, `0` crashes); single-run frame/commit delta vs. parent reflects normal startup variance. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
throny commented 2026-11-28 03:30:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T03:30:48Z.


merge-check claim
head: 0344d91cab

<!-- greyfinch-sync:ivall/xcl:comment:7233133333 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1507#issuecomment-7233133333). Originally posted by [throny](https://github.com/throny) on 2026-11-28T03:30:48Z. --- merge-check claim head: 0344d91cab27388b13da065be1dbbc32f5741740
throny commented 2026-11-28 03:57:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T03:57:11Z.


merge-check
base: e429936c
head: 0344d91cab
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2127 passed, 9 failed, 48 ignored (26 SKIPPED lines). Note on the base: main at e429936c itself fails 9 tests on this GPU that passed at 753e8b1a a few hours earlier (three dispatch_chain tests in gpu::dxil::module::split, gpu_heap_flat_reads_match_guarded_and_root_output, gpu_compute_mode_dispatch_abi, gpu_float_cas_uses_ieee_equality, and three e2e title tests). The same 9 fail with this PR merged, nothing else does; I am finding the merge that introduced them and will post it on #3041. Base alone: 2126 passed, 9 failed, 48 ignored.
review: nothing blocking. One thing that deserves a check on a real title: the new rule stops a code segment that follows a data block from merging into the program before it, even when that program branches into the segment. Only the first program of a container is translated, so if a first program ever has an exit placed after constant data, that exit would now become a separate program and the first one would branch outside itself (on main it merged, with the data decoded as code). Whether a retail title has that layout I could not check. Resetting the branch targets acts only after the first program has ended. No new indexing into file data; the test covers both cases.
performance: none per frame; only shaders whose program extents change are re-translated.
verdict: safe to merge (a count over a title's containers of first programs whose extent changes would settle the one open point)
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7233542567 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1507#issuecomment-7233542567). Originally posted by [throny](https://github.com/throny) on 2026-11-28T03:57:11Z. --- merge-check base: e429936c head: 0344d91cab27388b13da065be1dbbc32f5741740 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2127 passed, 9 failed, 48 ignored (26 SKIPPED lines). Note on the base: main at e429936c itself fails 9 tests on this GPU that passed at 753e8b1a a few hours earlier (three dispatch_chain tests in gpu::dxil::module::split, gpu_heap_flat_reads_match_guarded_and_root_output, gpu_compute_mode_dispatch_abi, gpu_float_cas_uses_ieee_equality, and three e2e title tests). The same 9 fail with this PR merged, nothing else does; I am finding the merge that introduced them and will post it on #3041. Base alone: 2126 passed, 9 failed, 48 ignored. review: nothing blocking. One thing that deserves a check on a real title: the new rule stops a code segment that follows a data block from merging into the program before it, even when that program branches into the segment. Only the first program of a container is translated, so if a first program ever has an exit placed after constant data, that exit would now become a separate program and the first one would branch outside itself (on main it merged, with the data decoded as code). Whether a retail title has that layout I could not check. Resetting the branch targets acts only after the first program has ended. No new indexing into file data; the test covers both cases. performance: none per frame; only shaders whose program extents change are re-translated. verdict: safe to merge (a count over a title's containers of first programs whose extent changes would settle the one open point) hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
JJAutoCompare commented 2026-11-28 04:22:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-28T04:22:07Z.


Tested

Exact 0344d91cab27388b13da065be1dbbc32f5741740 on native Windows 11 25H2 build 26200.9974, Ryzen 7 3800X, Rust 1.100.1 MSVC x64 debug. I reran the pinned libtest built from a verified Git archive with one private #[cfg(test)] fixture inserted. The original source matched the Git blobs after removing the fixture.

I used <libtest.exe> --exact <test> --nocapture --test-threads=1 separately for these three tests under gpu::xbox::tests.

  • independent_fssm_programs_keep_their_own_branch_continuations verified two programs in one valid synthetic FSSM. The branches targeted code offsets 0x0c and 0x24, after each program's first s_endpgm. The parser and listing kept the programs separate at FSSM spans 0x308 + 20 B and 0x31c + 24 B. The trailing counted data was listed separately at 0x338 + 16 B.
  • The stock controls branch_target_after_endpgm_belongs_to_the_program and counted_data_may_contain_endpgm_words both passed.

3 passed, 0 failed, 0 ignored, 0 runtime skips. All three native processes exited 0.

Not tested

Malformed inputs, control flow across data blocks, the base or merged tree, GPU execution, retail or smoke runs, performance, and the full suite.

AI use

T3 Code through the Codex harness (gpt-6.2-sol) verified the fixture provenance and executable, reran the tests, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7233975045 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1507#issuecomment-7233975045). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-28T04:22:07Z. --- **Tested** Exact `0344d91cab27388b13da065be1dbbc32f5741740` on native Windows 11 25H2 build 26200.9974, Ryzen 7 3800X, Rust 1.100.1 MSVC x64 debug. I reran the pinned libtest built from a verified Git archive with one private `#[cfg(test)]` fixture inserted. The original source matched the Git blobs after removing the fixture. I used `<libtest.exe> --exact <test> --nocapture --test-threads=1` separately for these three tests under `gpu::xbox::tests`. - `independent_fssm_programs_keep_their_own_branch_continuations` verified two programs in one valid synthetic FSSM. The branches targeted code offsets `0x0c` and `0x24`, after each program's first `s_endpgm`. The parser and listing kept the programs separate at FSSM spans `0x308 + 20 B` and `0x31c + 24 B`. The trailing counted data was listed separately at `0x338 + 16 B`. - The stock controls `branch_target_after_endpgm_belongs_to_the_program` and `counted_data_may_contain_endpgm_words` both passed. **3 passed, 0 failed, 0 ignored, 0 runtime skips.** All three native processes exited 0. **Not tested** Malformed inputs, control flow across data blocks, the base or merged tree, GPU execution, retail or smoke runs, performance, and the full suite. **AI use** T3 Code through the Codex harness (`gpt-6.2-sol`) verified the fixture provenance and executable, reran the tests, and wrote this report.
thehollowedone commented 2026-11-28 13:36:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T13:36:52Z.


merge-check
base: e13d6250
head: 0344d91c
merge: clean noncommitting merge; git diff --check clean
build: cargo build --offline --locked -j 4 --workspace -> ok
tests: cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4 -> 2,130 passed, 11 failed, 48 ignored; 25 GPU skip notices, 39 targets. The exact-base run on this same machine gave 2,129 passed, the same 11 failed, 48 ignored and 25 skip notices. The failures on both trees were dispatch_chain_oversized_loop_matches_whole, dispatch_chain_wave32_live_loops, dispatch_chain_wave64_live_loops_and_exchange, direct_msaa_loads_precede_get_dimensions, gpu_heap_flat_reads_match_guarded_and_root_output, console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, gpu_compute_mode_dispatch_abi, gpu_float_cas_uses_ieee_equality, and the three test_title_* e2e tests. The added FSSM regression passed.
review: no new blocker in the one-file diff. Branch targets now follow the active program, and a recorded data block prevents merging segments across it. The known boundary remains: a first program branching across an intervening data block is not represented as one executable program. The PR fixture demonstrates that limit, but the base also fails to decode the intervening data as instructions; retail incidence was not measured here.
performance: shader-container parsing changes at load/translation time; no per-frame path changed. I did not benchmark startup or a title run.
verdict: safe to merge from this independent merge/build/suite/code check, with the existing baseline failures and the cross-data limitation above visible for the maintainer.
Hardware: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC 1.8.2502.11. AI use: Codex (GPT-6.2 Sol) ran the merge, build and suites and checked the diff; Codex (GPT-6.2 Astra) independently traced the FSSM parser and translation path.

<!-- greyfinch-sync:ivall/xcl:comment:7240060180 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1507#issuecomment-7240060180). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-28T13:36:52Z. --- merge-check base: [e13d6250](https://github.com/xcl-dev/xcl/commit/e13d6250432d486502971781e9589a330e548d24) head: [0344d91c](https://github.com/xcl-dev/xcl/commit/0344d91cab27388b13da065be1dbbc32f5741740) merge: clean noncommitting merge; `git diff --check` clean build: `cargo build --offline --locked -j 4 --workspace` -> ok tests: `cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4` -> 2,130 passed, 11 failed, 48 ignored; 25 GPU skip notices, 39 targets. The exact-base run on this same machine gave 2,129 passed, the same 11 failed, 48 ignored and 25 skip notices. The failures on both trees were `dispatch_chain_oversized_loop_matches_whole`, `dispatch_chain_wave32_live_loops`, `dispatch_chain_wave64_live_loops_and_exchange`, `direct_msaa_loads_precede_get_dimensions`, `gpu_heap_flat_reads_match_guarded_and_root_output`, `console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk`, `gpu_compute_mode_dispatch_abi`, `gpu_float_cas_uses_ieee_equality`, and the three `test_title_*` e2e tests. The added FSSM regression passed. review: no new blocker in the one-file diff. Branch targets now follow the active program, and a recorded data block prevents merging segments across it. The known boundary remains: a first program branching across an intervening data block is not represented as one executable program. The PR fixture demonstrates that limit, but the base also fails to decode the intervening data as instructions; retail incidence was not measured here. performance: shader-container parsing changes at load/translation time; no per-frame path changed. I did not benchmark startup or a title run. verdict: safe to merge from this independent merge/build/suite/code check, with the existing baseline failures and the cross-data limitation above visible for the maintainer. Hardware: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC 1.8.2502.11. AI use: Codex (GPT-6.2 Sol) ran the merge, build and suites and checked the diff; Codex (GPT-6.2 Astra) independently traced the FSSM parser and translation path.
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!1497
No description provided.