Recompiler: key translations on XCL_RDNA_FLOAT and XCL_WATERFALL_COLLAPSE #3621

Open
kole07139 wants to merge 1 commit from upstream-pr/3621 into main
kole07139 commented 2026-12-01 22:47:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by kole07139 on 2026-12-01T22:47:03Z.


XCL_RDNA_FLOAT and XCL_WATERFALL_COLLAPSE both change the DXIL the direct translator emits, but neither was in the translated cache's identity nor in the warm-pipeline settings key. After a default run, a run with either set to 0 (the obvious thing to try when a float result or a sampled texture looks wrong) loaded the translations made with the switch on, so the switch did nothing. The other way round, a cache filled with =0 served its programs to a default run. Same class as #1409 / #2327 (XCL_SAFE_BARRIER).

Fixes #3520 (reported by @Grimkaaah, whose proposed fix this follows). XCL_WATERFALL_COLLAPSE (added in 4250e761) has the same gap and is not in the issue.

Rebased onto main 38ad22da. The only conflict was the semantic_pipeline_setting line, where #3655 added XCL_WAVE64_IDIOMS beside these names; that switch is already in the translated identity through compact_nest_tag.

What is in it

  • gpu/recomp/pso.rs: translated::direct_switches_tagged tags an identity for each switch that is off (xcl-rdna-float-0, xcl-waterfall-collapse-0), the way XCL_X_LDS_ORDER=0 does. With both on (the default) it adds no tag. It is applied in identity_from_source when the backend is direct, and in direct_output_identity, which keys the enormous programs rerouted to the direct translator on the HLSL path. direct_output_identity takes the two switches as parameters, like nest_tag and split_limit, so a test can reach it.
  • gpu/dxil/waterfall.rs: collapse_enabled(), the switch collapse already read. gpu/dxil/mod.rs: prelude and waterfall are pub(crate), so pso.rs can read both switches.
  • shaders.rs: both names join semantic_pipeline_setting.
  • The other caches downstream of a translation follow without a change. This was checked in a read-only audit of the cache keys, and each conclusion then confirmed in the code:
    • the compute, graphics and two-pass driver blobs and the pipeline-library entries are keyed by the DXIL bytes;
    • the warm library, replay, pack and blob receipts are keyed by the translation identity and warm_settings_key().
  • Tests:
    • direct_output_switches_split_the_disk_cache runs each case as a process of its own on one disk cache (the identities use OnceLock), as rerouted_disk_entries_follow_compact_nesting_policy does:
      • an entry a default run stored is a miss with either switch off, on the direct backend and for the rerouted entries of the HLSL backend;
      • the default and the switch's own entries are hits again later;
      • an HLSL-path entry is shared.
      • It fails without the tag in identity_from_source (XCL_DIRECT_DXIL=all, left: 1, right: 2) and without the switches in direct_output() (=0, same).
    • direct_output_switches_that_are_off_get_their_own_identity: the default keeps the identity, and each combination of switches gives a distinct one.
    • The existing warm_settings_ignore_waits_watchdogs_and_traces_but_keep_pipeline_switches now also checks both names.
    • The warm-settings test fails with the two names taken out (XCL_RDNA_FLOAT stays in the key).

Tested

  • NVIDIA GeForce RTX 3070 8 GB (driver 32.0.16.2140), Intel Core i9-9900K, 32 GB, Windows 11 Pro N build 26200, Rust 1.99.0 MSVC, debug build for tests, release build for the smoke runs.
  • cargo test --workspace -- --test-threads=4 (with --no-fail-fast) on this head (ac528d09), after cargo clean -p xcl, twice:
    • First run: the library harness aborted in hle::d3d12x::list_x::tests::wait64_flags_do_not_mask_the_recorded_counter ("misaligned pointer dereference" in windows-core, a non-unwinding panic, 0xc0000409). The other 42 binaries: 148 passed, 0 failed, 20 ignored.
      • That test passed alone 5/5, and this PR does not touch list_x.
    • Second run: 2964 passed, 0 failed, 52 ignored (43 test binaries).
  • Before the rebase (head cdb365bd): 2906 passed, 0 failed, 51 ignored, twice on a quiet machine.
  • On an earlier head (cda7d4d3), whose non-test code was the same as cdb365bd's, one of two full runs had title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels fail, plus three PoisonErrors from the mutex it poisoned.
    • That test passed every rerun: alone 10/10, its module 5/5, the lib 13/13 (this PR) and 6/6 (main).
    • This PR does not touch title_textures; reported on #3180.
  • SKIPPED GPU tests: 25: 22 no wave64 (wave32 adapter), 2 no heap windows (opt-in XCL_HEAP_WINDOWS=1), 1 pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache without Developer Mode)
  • Each switch on a warm translated cache, on the retail title (60 s each, head cda7d4d3), counting the entries under each translated/v2 identity:
    • main: with either switch at 0, no entry is written anywhere; all 26,008 entries come from the default identity, so the switch has no effect.
    • This PR: XCL_RDNA_FLOAT=0 and XCL_WATERFALL_COLLAPSE=0 each make their own identity (220 and 799 entries), and a default run afterwards goes back to its own.
    • The same programs under the default and the switch's identity, the 32-byte header excluded: 105 of 220 have other DXIL with XCL_RDNA_FLOAT=0, 4 of 799 with XCL_WATERFALL_COLLAPSE=0.
  • The reverse direction, with fresh XCL_DXIL_CACHE folders and a fixed set (xcl shaders <pack> --precompile --only ms|vs --limit 300, plus --only ps on main):
    • main: a default pass after an XCL_RDNA_FLOAT=0 pass reuses those entries. Against a clean default cache, 9,457 of 12,356 programs differ (Pixel 9,341, Mesh 80, Vertex 36).
    • This PR (cdb365bd): the same order leaves the default entries byte for byte equal to a clean default cache (0 of 300 differ), while the =0 identity differs in 116 of 300.
    • XCL_WATERFALL_COLLAPSE=0 changes none of the programs in this set.

Regression run
Same title, 60 s each, release builds of this head and of the main it is rebased on, run one after the other on a quiet machine. Both builds have new translated-cache identities: main changed the direct translator's sources since the earlier runs, and this PR edits them too. So both runs started with a cold translated cache for the title.

main:

xcl-smoke v1
commit: 38ad22daa624b0fe415889f480016099a9aae390
gpu: NVIDIA GeForce RTX 3070
title: 16b5e5d4
seconds: 60
exit: 0x0
frames shown: 1567 (PresentX 1567)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15614 MB

This PR's head:

xcl-smoke v1
commit: ac528d092ae0368dd4a56ddcd6044f6f2bd3d233
gpu: NVIDIA GeForce RTX 3070
title: 16b5e5d4
seconds: 60
exit: 0x0
frames shown: 1598 (PresentX 1598)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 15861 MB

Not tested

  • AMD and Intel GPUs.
  • Linux / Wine.

Noticed, not changed

  • XCL_PER_LANE_MAX_INSTS (the per-lane form's instruction limit) is in no cache key either. It only matters with XCL_PER_LANE=1, so it is left out here.
  • ComputePolicyKey (pso.rs, "output-affecting process policy") lists neither switch, nor XCL_X_LDS_ORDER. It only keys in-flight builds within one process, where the environment does not change, so nothing goes wrong.
  • With XCL_DIRECT_DXIL=0, whether a compute program takes the huge direct route depends on the size of its direct output, which the switches change. The HLSL entry stored under the untagged HLSL identity is found first, so a run with a switch at 0 can leave an HLSL translation that later default runs keep using.
    • That translation is valid output, so this costs only speed.
    • XCL_DIRECT_COMPACT and XCL_DIRECT_SPLIT_INSTRUCTIONS are in the same position: they also tag the identity only when the backend is direct.
  • The edit of two files under gpu/dxil changes XCL_DIRECT_DXIL_SOURCE_ID, so the first run after this PR translates the direct programs again (expected, as for every such merge). That also drops any entries made before it with a switch at 0.

AI use

  • Claude Code (Claude Opus 5.5) found the second switch, wrote the code, the tests and this description, and ran the tests and the smoke runs.
  • Two Claude Code subagents of the same session reviewed the diff and audited the cache keys, read-only. The process-level test and the notes under Noticed come from that review, and were checked in the code before they went in.
  • I read the diff and the results.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5596015803 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3621). Originally posted by [kole07139](https://github.com/kole07139) on 2026-12-01T22:47:03Z. --- `XCL_RDNA_FLOAT` and `XCL_WATERFALL_COLLAPSE` both change the DXIL the direct translator emits, but neither was in the translated cache's identity nor in the warm-pipeline settings key. After a default run, a run with either set to `0` (the obvious thing to try when a float result or a sampled texture looks wrong) loaded the translations made with the switch on, so the switch did nothing. The other way round, a cache filled with `=0` served its programs to a default run. Same class as #1409 / #2327 (`XCL_SAFE_BARRIER`). Fixes #3520 (reported by @Grimkaaah, whose proposed fix this follows). `XCL_WATERFALL_COLLAPSE` (added in 4250e761) has the same gap and is not in the issue. Rebased onto `main` `38ad22da`. The only conflict was the `semantic_pipeline_setting` line, where #3655 added `XCL_WAVE64_IDIOMS` beside these names; that switch is already in the translated identity through `compact_nest_tag`. **What is in it** - `gpu/recomp/pso.rs`: `translated::direct_switches_tagged` tags an identity for each switch that is off (`xcl-rdna-float-0`, `xcl-waterfall-collapse-0`), the way `XCL_X_LDS_ORDER=0` does. With both on (the default) it adds no tag. It is applied in `identity_from_source` when the backend is direct, and in `direct_output_identity`, which keys the enormous programs rerouted to the direct translator on the HLSL path. `direct_output_identity` takes the two switches as parameters, like `nest_tag` and `split_limit`, so a test can reach it. - `gpu/dxil/waterfall.rs`: `collapse_enabled()`, the switch `collapse` already read. `gpu/dxil/mod.rs`: `prelude` and `waterfall` are `pub(crate)`, so `pso.rs` can read both switches. - `shaders.rs`: both names join `semantic_pipeline_setting`. - The other caches downstream of a translation follow without a change. This was checked in a read-only audit of the cache keys, and each conclusion then confirmed in the code: - the compute, graphics and two-pass driver blobs and the pipeline-library entries are keyed by the DXIL bytes; - the warm library, replay, pack and blob receipts are keyed by the translation identity and `warm_settings_key()`. - Tests: - `direct_output_switches_split_the_disk_cache` runs each case as a process of its own on one disk cache (the identities use OnceLock), as `rerouted_disk_entries_follow_compact_nesting_policy` does: - an entry a default run stored is a miss with either switch off, on the direct backend and for the rerouted entries of the HLSL backend; - the default and the switch's own entries are hits again later; - an HLSL-path entry is shared. - It fails without the tag in `identity_from_source` (`XCL_DIRECT_DXIL=all`, `left: 1, right: 2`) and without the switches in `direct_output()` (`=0`, same). - `direct_output_switches_that_are_off_get_their_own_identity`: the default keeps the identity, and each combination of switches gives a distinct one. - The existing `warm_settings_ignore_waits_watchdogs_and_traces_but_keep_pipeline_switches` now also checks both names. - The warm-settings test fails with the two names taken out (`XCL_RDNA_FLOAT stays in the key`). **Tested** - NVIDIA GeForce RTX 3070 8 GB (driver 32.0.16.2140), Intel Core i9-9900K, 32 GB, Windows 11 Pro N build 26200, Rust 1.99.0 MSVC, debug build for tests, release build for the smoke runs. - `cargo test --workspace -- --test-threads=4` (with `--no-fail-fast`) on this head (`ac528d09`), after `cargo clean -p xcl`, twice: - First run: the library harness aborted in `hle::d3d12x::list_x::tests::wait64_flags_do_not_mask_the_recorded_counter` ("misaligned pointer dereference" in `windows-core`, a non-unwinding panic, `0xc0000409`). The other 42 binaries: 148 passed, 0 failed, 20 ignored. - That test passed alone 5/5, and this PR does not touch `list_x`. - Second run: 2964 passed, 0 failed, 52 ignored (43 test binaries). - Before the rebase (head `cdb365bd`): 2906 passed, 0 failed, 51 ignored, twice on a quiet machine. - On an earlier head (`cda7d4d3`), whose non-test code was the same as `cdb365bd`'s, one of two full runs had `title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels` fail, plus three `PoisonError`s from the mutex it poisoned. - That test passed every rerun: alone 10/10, its module 5/5, the lib 13/13 (this PR) and 6/6 (`main`). - This PR does not touch `title_textures`; reported on #3180. - SKIPPED GPU tests: 25: 22 `no wave64` (wave32 adapter), 2 `no heap windows` (opt-in `XCL_HEAP_WINDOWS=1`), 1 `pso_measurement_compiles_an_exact_synthetic_record` (cannot disable the driver cache without Developer Mode) - Each switch on a warm translated cache, on the retail title (60 s each, head `cda7d4d3`), counting the entries under each `translated/v2` identity: - `main`: with either switch at `0`, no entry is written anywhere; all 26,008 entries come from the default identity, so the switch has no effect. - This PR: `XCL_RDNA_FLOAT=0` and `XCL_WATERFALL_COLLAPSE=0` each make their own identity (220 and 799 entries), and a default run afterwards goes back to its own. - The same programs under the default and the switch's identity, the 32-byte header excluded: 105 of 220 have other DXIL with `XCL_RDNA_FLOAT=0`, 4 of 799 with `XCL_WATERFALL_COLLAPSE=0`. - The reverse direction, with fresh `XCL_DXIL_CACHE` folders and a fixed set (`xcl shaders <pack> --precompile --only ms|vs --limit 300`, plus `--only ps` on `main`): - `main`: a default pass after an `XCL_RDNA_FLOAT=0` pass reuses those entries. Against a clean default cache, 9,457 of 12,356 programs differ (Pixel 9,341, Mesh 80, Vertex 36). - This PR (`cdb365bd`): the same order leaves the default entries byte for byte equal to a clean default cache (0 of 300 differ), while the `=0` identity differs in 116 of 300. - `XCL_WATERFALL_COLLAPSE=0` changes none of the programs in this set. **Regression run** Same title, 60 s each, release builds of this head and of the `main` it is rebased on, run one after the other on a quiet machine. Both builds have new translated-cache identities: `main` changed the direct translator's sources since the earlier runs, and this PR edits them too. So both runs started with a cold translated cache for the title. `main`: ``` xcl-smoke v1 commit: 38ad22daa624b0fe415889f480016099a9aae390 gpu: NVIDIA GeForce RTX 3070 title: 16b5e5d4 seconds: 60 exit: 0x0 frames shown: 1567 (PresentX 1567) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15614 MB ``` This PR's head: ``` xcl-smoke v1 commit: ac528d092ae0368dd4a56ddcd6044f6f2bd3d233 gpu: NVIDIA GeForce RTX 3070 title: 16b5e5d4 seconds: 60 exit: 0x0 frames shown: 1598 (PresentX 1598) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 15861 MB ``` **Not tested** - AMD and Intel GPUs. - Linux / Wine. **Noticed, not changed** - `XCL_PER_LANE_MAX_INSTS` (the per-lane form's instruction limit) is in no cache key either. It only matters with `XCL_PER_LANE=1`, so it is left out here. - `ComputePolicyKey` (`pso.rs`, "output-affecting process policy") lists neither switch, nor `XCL_X_LDS_ORDER`. It only keys in-flight builds within one process, where the environment does not change, so nothing goes wrong. - With `XCL_DIRECT_DXIL=0`, whether a compute program takes the huge direct route depends on the size of its direct output, which the switches change. The HLSL entry stored under the untagged HLSL identity is found first, so a run with a switch at `0` can leave an HLSL translation that later default runs keep using. - That translation is valid output, so this costs only speed. - `XCL_DIRECT_COMPACT` and `XCL_DIRECT_SPLIT_INSTRUCTIONS` are in the same position: they also tag the identity only when the backend is direct. - The edit of two files under `gpu/dxil` changes `XCL_DIRECT_DXIL_SOURCE_ID`, so the first run after this PR translates the direct programs again (expected, as for every such merge). That also drops any entries made before it with a switch at `0`. **AI use** - Claude Code (Claude Opus 5.5) found the second switch, wrote the code, the tests and this description, and ran the tests and the smoke runs. - Two Claude Code subagents of the same session reviewed the diff and audited the cache keys, read-only. The process-level test and the notes under **Noticed** come from that review, and were checked in the code before they went in. - I read the diff and the results. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kole07139 commented 2026-12-01 22:47:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by kole07139 on 2026-12-01T22:47:14Z.


More local tests, beyond the description. Heads: this PR's cdb365bd, and the previous head cda7d4d3, which has the same non-test code (only the new test and a line wrap in shaders.rs differ). Base: main 6bfb5c51.

Machine: RTX 3070 8 GB (driver 32.0.16.2140), i9-9900K, 32 GB, Windows 11 Pro N 26200, Rust 1.99.0 MSVC.

1. Each switch on a warm translated cache (retail title, release, scripts/smoke.ps1, 60 s each, one after the other, previous head; the entries under each translated/v2 identity were counted before and after each run)

run build switch frames removals / crashes peak commit translated/v2 after the run
main-rdna0 main XCL_RDNA_FLOAT=0 1578 0 / 0 18988 MB no new identity; main's 26,008 entries, all hits
main-wf0 main XCL_WATERFALL_COLLAPSE=0 1600 0 / 0 16679 MB no new identity; 26,008, all hits
pr-rdna0 PR XCL_RDNA_FLOAT=0 1599 0 / 0 16260 MB new identity, 220 entries
pr-wf0 PR XCL_WATERFALL_COLLAPSE=0 1577 0 / 0 18731 MB another new identity, 799 entries
pr-default2 PR none 1591 0 / 0 17183 MB back on the PR's default identity (819 → 2,455); the two switch identities untouched

The same programs under each switch's identity and the default one, the 32-byte header (which holds the identity) excluded:

  • XCL_RDNA_FLOAT=0: 105 of 220 have other DXIL.
  • XCL_WATERFALL_COLLAPSE=0: 4 of 799.

2. The reverse direction, deterministic (fresh XCL_DXIL_CACHE per case, CPU only: xcl shaders <pack> --precompile --only ms|vs --limit 300, and --only ps on main)

case build passes identities default entries vs a clean default cache
A main XCL_RDNA_FLOAT=0, then default one (11d4bba9…); the default pass took the PS set in 9.7 s against 680.7 s, all hits 9,457 of 12,356 differ (Pixel 9,341, Mesh 80, Vertex 36)
A' main XCL_WATERFALL_COLLAPSE=0, then default one 0 of 12,356 differ (no collapsible loop in this set)
C this PR XCL_RDNA_FLOAT=0, then default two (6af2e0c3… for =0, be5f11cb… default) 0 of 300 differ; the =0 identity differs in 116 of 300

So on main a default run is served what a =0 run translated. With this PR it is not.

3. Test suite

  • This head, cargo test --workspace --no-fail-fast -- --test-threads=4, quiet machine:
    • two runs, the second after cargo clean -p xcl: 2906 passed, 0 failed, 51 ignored (25 SKIPPED) both times;
    • the new test direct_output_switches_split_the_disk_cache passes, and fails with either wiring point removed.
  • Previous head, two full runs: 2905 passed, 0 failed, 51 ignored; then 2901 passed, 4 failed, 51 ignored.
    • The real failure was hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels; the other three were PoisonErrors from the mutex it poisoned.
    • Reruns: that test alone 10/10, its module 5/5, cargo test -p xcl --lib -- --test-threads=4 13/13 on this PR and 6/6 on main. Noted on #3180.

4. Long runs, default settings (600 s asked, one pair, previous head)

run exit removals / crashes peak commit ended at
main 0x887a0005 1 / 1 35982 MB ~199 s
PR 0x887a0005 1 / 1 35629 MB ~307 s
  • Both builds fail the same way. After its menus the title starts streaming, local video memory climbs past 15 GB on this 8 GB card, commit reaches ~35 GB, and the device is removed (DRED: no breadcrumbs).
  • It resembles #1337 / #333 and is not specific to this PR.

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

<!-- greyfinch-sync:ivall/xcl:comment:7328330068 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3621#issuecomment-7328330068). Originally posted by [kole07139](https://github.com/kole07139) on 2026-12-01T22:47:14Z. --- **More local tests**, beyond the description. Heads: this PR's `cdb365bd`, and the previous head `cda7d4d3`, which has the same non-test code (only the new test and a line wrap in `shaders.rs` differ). Base: `main` `6bfb5c51`. **Machine:** RTX 3070 8 GB (driver 32.0.16.2140), i9-9900K, 32 GB, Windows 11 Pro N 26200, Rust 1.99.0 MSVC. **1. Each switch on a warm translated cache** (retail title, release, `scripts/smoke.ps1`, 60 s each, one after the other, previous head; the entries under each `translated/v2` identity were counted before and after each run) | run | build | switch | frames | removals / crashes | peak commit | translated/v2 after the run | |---|---|---|---:|---|---:|---| | main-rdna0 | main | `XCL_RDNA_FLOAT=0` | 1578 | 0 / 0 | 18988 MB | no new identity; main's 26,008 entries, all hits | | main-wf0 | main | `XCL_WATERFALL_COLLAPSE=0` | 1600 | 0 / 0 | 16679 MB | no new identity; 26,008, all hits | | pr-rdna0 | PR | `XCL_RDNA_FLOAT=0` | 1599 | 0 / 0 | 16260 MB | new identity, 220 entries | | pr-wf0 | PR | `XCL_WATERFALL_COLLAPSE=0` | 1577 | 0 / 0 | 18731 MB | another new identity, 799 entries | | pr-default2 | PR | none | 1591 | 0 / 0 | 17183 MB | back on the PR's default identity (819 → 2,455); the two switch identities untouched | The same programs under each switch's identity and the default one, the 32-byte header (which holds the identity) excluded: - `XCL_RDNA_FLOAT=0`: 105 of 220 have other DXIL. - `XCL_WATERFALL_COLLAPSE=0`: 4 of 799. **2. The reverse direction, deterministic** (fresh `XCL_DXIL_CACHE` per case, CPU only: `xcl shaders <pack> --precompile --only ms|vs --limit 300`, and `--only ps` on `main`) | case | build | passes | identities | default entries vs a clean default cache | |---|---|---|---|---| | A | main | `XCL_RDNA_FLOAT=0`, then default | one (`11d4bba9…`); the default pass took the PS set in 9.7 s against 680.7 s, all hits | 9,457 of 12,356 differ (Pixel 9,341, Mesh 80, Vertex 36) | | A' | main | `XCL_WATERFALL_COLLAPSE=0`, then default | one | 0 of 12,356 differ (no collapsible loop in this set) | | C | this PR | `XCL_RDNA_FLOAT=0`, then default | two (`6af2e0c3…` for `=0`, `be5f11cb…` default) | 0 of 300 differ; the `=0` identity differs in 116 of 300 | So on `main` a default run is served what a `=0` run translated. With this PR it is not. **3. Test suite** - **This head**, `cargo test --workspace --no-fail-fast -- --test-threads=4`, quiet machine: - two runs, the second after `cargo clean -p xcl`: 2906 passed, 0 failed, 51 ignored (25 SKIPPED) both times; - the new test `direct_output_switches_split_the_disk_cache` passes, and fails with either wiring point removed. - **Previous head**, two full runs: 2905 passed, 0 failed, 51 ignored; then 2901 passed, 4 failed, 51 ignored. - The real failure was `hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels`; the other three were `PoisonError`s from the mutex it poisoned. - Reruns: that test alone 10/10, its module 5/5, `cargo test -p xcl --lib -- --test-threads=4` 13/13 on this PR and 6/6 on `main`. Noted on #3180. **4. Long runs, default settings** (600 s asked, one pair, previous head) | run | exit | removals / crashes | peak commit | ended at | |---|---|---|---:|---:| | main | 0x887a0005 | 1 / 1 | 35982 MB | ~199 s | | PR | 0x887a0005 | 1 / 1 | 35629 MB | ~307 s | - Both builds fail the same way. After its menus the title starts streaming, local video memory climbs past 15 GB on this 8 GB card, commit reaches ~35 GB, and the device is removed (DRED: no breadcrumbs). - It resembles #1337 / #333 and is not specific to this PR. AI use: Claude Code (Claude Opus 5.5) ran these tests and wrote this report.
Foniass commented 2026-12-01 22:49:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T22:49:00Z.


Review (head cdb365bd, diff read, not a merge-check):

No problems found in the diff. Checked the new tags against how translated::identity_from_source, direct_output / rerouted_identity, the mesh and geometry cached_for callers, compile_console_shader's huge and enormous reroutes (pso.rs ~825-866), and the warm library and replay keys use these identities; the switches are read only in gpu/dxil (prelude.rs, kernel.rs ~329), the tags apply only when the direct translator can run, and with both switches at their defaults direct_switches_tagged returns the identity unchanged (pso.rs ~350-353), so existing caches stay valid. The subprocess test follows the existing rerouted_disk_entries_follow_compact_nesting_policy pattern.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7328369447 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3621#issuecomment-7328369447). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T22:49:00Z. --- Review (head cdb365bd, diff read, not a merge-check): No problems found in the diff. Checked the new tags against how `translated::identity_from_source`, `direct_output` / `rerouted_identity`, the mesh and geometry `cached_for` callers, `compile_console_shader`'s huge and enormous reroutes (`pso.rs` ~825-866), and the warm library and replay keys use these identities; the switches are read only in `gpu/dxil` (`prelude.rs`, `kernel.rs` ~329), the tags apply only when the direct translator can run, and with both switches at their defaults `direct_switches_tagged` returns the identity unchanged (`pso.rs` ~350-353), so existing caches stay valid. The subprocess test follows the existing `rerouted_disk_entries_follow_compact_nesting_policy` pattern. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Foniass commented 2026-12-02 14:27:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T14:27:30Z.


Follow-up review (head ac528d09, since cdb365bd, diff read, not a merge-check):

  • Earlier review (no problems found): still holds; this push is a rebase onto the current main, which only moves the new warm-setting names next to XCL_WAVE64_IDIOMS in shaders.rs.

New: none.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7348576142 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3621#issuecomment-7348576142). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T14:27:30Z. --- Follow-up review (head ac528d09, since cdb365bd, diff read, not a merge-check): - **Earlier review (no problems found):** still holds; this push is a rebase onto the current `main`, which only moves the new warm-setting names next to `XCL_WAVE64_IDIOMS` in `shaders.rs`. New: none. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
bmjask commented 2026-12-02 16:21:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T16:21:30Z.


@Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.

<!-- greyfinch-sync:ivall/xcl:comment:7351824625 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3621#issuecomment-7351824625). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T16:21:30Z. --- @Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.
fromthemoonx commented 2026-12-02 19:53:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-02T19:53:39Z.


merge-check
base: 5ad98adbc3
head: ac528d092a
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3007 passed, 0 failed, 52 ignored (3004 / 0 / 52 on 817eb1f, plus this PR's 2 tests and 1 that main gained since); SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps); failing: none
review: read the whole diff (4 files, +122 -7). No blocking findings.

  1. Each of the three places has a test that needs it. I took them out one at a time:
taken out test that fails
the tag in identity_from_source direct_output_switches_split_the_disk_cache (a run with the switch off gets the default run's entry: left 1, right 2)
the tag in direct_output_identity the same test, and direct_output_switches_that_are_off_get_their_own_identity
the two names in semantic_pipeline_setting warm_settings_ignore_waits_watchdogs_and_traces_but_keep_pipeline_switches
  1. Both switches are read only in the direct translator, so leaving HLSL entries untagged is right. With both at their default the identity stays as it was.
  2. I listed every XCL_* name in gpu/dxil/*.rs. The other ones that change the output are already in a key, so I found no third switch with this gap there. I did not repeat that for gpu/recomp.
  3. The first run after the merge translates the direct programs again, because two files under gpu/dxil change. The description says so. It also drops entries an earlier =0 run left behind.
  4. Not tested: a retail title (none on this machine), so the counts of changed programs in the description are the author's.
    performance: two tags when an identity is computed, none by default; one retranslation after the merge as in 4 (reasoned, not measured)
    verdict: safe to merge
    hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)
<!-- greyfinch-sync:ivall/xcl:comment:7356890772 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3621#issuecomment-7356890772). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-12-02T19:53:39Z. --- merge-check base: 5ad98adbc360225ac8a57ad9661e16fe8df9d8dd head: ac528d092ae0368dd4a56ddcd6044f6f2bd3d233 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3007 passed, 0 failed, 52 ignored (3004 / 0 / 52 on 817eb1f, plus this PR's 2 tests and 1 that main gained since); SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps); failing: none review: read the whole diff (4 files, +122 -7). No blocking findings. 1) Each of the three places has a test that needs it. I took them out one at a time: | taken out | test that fails | |---|---| | the tag in `identity_from_source` | `direct_output_switches_split_the_disk_cache` (a run with the switch off gets the default run's entry: left 1, right 2) | | the tag in `direct_output_identity` | the same test, and `direct_output_switches_that_are_off_get_their_own_identity` | | the two names in `semantic_pipeline_setting` | `warm_settings_ignore_waits_watchdogs_and_traces_but_keep_pipeline_switches` | 2) Both switches are read only in the direct translator, so leaving HLSL entries untagged is right. With both at their default the identity stays as it was. 3) I listed every `XCL_*` name in `gpu/dxil/*.rs`. The other ones that change the output are already in a key, so I found no third switch with this gap there. I did not repeat that for `gpu/recomp`. 4) The first run after the merge translates the direct programs again, because two files under `gpu/dxil` change. The description says so. It also drops entries an earlier `=0` run left behind. 5) Not tested: a retail title (none on this machine), so the counts of changed programs in the description are the author's. performance: two tags when an identity is computed, none by default; one retranslation after the merge as in 4 (reasoned, not measured) verdict: safe to merge hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)
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/3621:upstream-pr/3621'
git switch 'upstream-pr/3621'

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