Recompiler: loads through s_getpc_b64 read the constant data after the program #2219

Open
MacieGx wants to merge 1 commit from upstream-pr/2229 into main
MacieGx commented 2026-11-25 10:46:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MacieGx on 2026-11-25T10:46:41Z.


Console programs keep constant tables after s_endpgm and read them PC-relative (s_getpc_b64 + s_load_dword* / global_load_dword*). The translation gave s_getpc_b64 the program's offset with high dword 0, so in a title those loads read memory window 0 at a low offset and got zeros. This makes both translators (HLSL and direct DXIL) read the program's own constant data there. Part of #505.

676 of the 26503 shader records of the newer retail title (#505) take such an address. Among them are all postfx_aces LUT bakes (CS_Bake*LUT*): the ACES tone-scale spline coefficients sit after the program, so with zeros every channel came out 1.0 and the 64-cube output LUT the composite pass reads was one constant texel (0.162, 0.162, 0.162, 1). The presented picture was then one flat grey whatever the scene. Others in the list: scattering_transmittance_system, prefilter_env_map, MS_VS_CascadeShadows*, MS_VS_Transform*, rtdirectionalshadows, indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes, water_*.

What is in it

  • crates/xcl/src/gpu/xbox.rs: Fssm::rodata(program), the data blocks after a program.
  • crates/xcl/src/gpu/recomp/code_loads.rs (new): sorts the s_load* / s_buffer_load* and FLAT / GLOBAL loads of a program with constant data by whether their address comes from s_getpc_b64, by a forward dataflow over the CFG (s_getpc_b64 and offsets added to it give a code address, merges join, loads give data; an indirect jump makes every load "maybe"). Three forms follow:
    • address never from s_getpc_b64: a plain memory load, no table test (as before this PR);
    • from it on every path: xcl_cload*, the table's dwords (0 outside the blocks), no memory access and no window index;
    • from it on some paths: xcl_gload*(hi, a) reads the memory and selects the table's dwords, with no branch, when the raw high dword is CODE_ADDRESS_HI (0xC0DE, above any user-space address).
      s_getpc_b64's high dword is CODE_ADDRESS_HI in a program with such a mixed load, with one memory window as with several, and 0 in a program with only table loads or only memory loads. With one window the memory loads take the low dword only, so a tagged pointer used for a memory load still reads the memory; without the tag there, a mixed load took the title's memory at the table's low offset for the table (thehollowedone, below). A first form tested the window index in a branch around every load of such a program; the NVIDIA Linux driver crashed compiling it (pr1sm-dev, below).
  • crates/xcl/src/gpu/recomp/mod.rs, emit.rs: new Options::rodata. The HLSL embeds the blocks as static const uint xcl_rodata[] and emits the three forms above.
  • crates/xcl/src/gpu/dxil/ (kernel.rs, lower.rs, lower_mem.rs, lower_window.rs, coverage.rs): the same for the direct translator, as an internal constant array of the module (Lw::rodata_loads), with the same three forms; s_buffer_load through a V# built from s_getpc_b64 reads it too. kernel::translate_entry_rodata carries the data (and, for compute, the compact table size translate_compute_on picks for wave32-only GPUs); the per-lane form has no table and leaves such programs to the per-instruction form. Its TRANSLATOR_VERSION goes from 9 to 10.
  • crates/xcl/src/gpu/recomp/pso.rs, crates/xcl/src/shaders.rs: the data is passed on the compute, VS / PS and mesh paths (HLSL and direct), and by xcl shaders (--precompile, the direct sweep).
  • Tests: gpu::recomp::tests::gpu_loads_read_the_constant_data_after_the_program and gpu::dxil::core_tests::gpu_direct_loads_read_the_constant_data_after_the_program: a program reads its table through s_getpc_b64 + s_load_dword* / global_load_dword* (direct: also s_buffer_load through a V# on it), with one window, two windows in the switch form and with heap windows; the values must equal the table. ..._not_the_memory_at_its_offset (both translators): the same with one window, the memory a load through the same register pair reads at the table's low offset. gpu::recomp::code_loads::tests::loads_from_s_getpc_read_the_code_and_the_others_memory: the pattern of a retail LUT bake gives the table loads "code", a descriptor table load nothing and a load whose pointer is a code address on one path only "maybe".
  • 751 lines added and 40 removed, 281 of them the five tests.

Tested

  • Rebased onto main 8b957bec (now 98a629a, no change to the code besides the rebase). cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4 on 98a629a: 1449 passed, 4 failed (the same fuzz_validate_and_gpu_0..3), 47 ignored. The counts below are from 3ce7f30, before the rebase.
  • NVIDIA GeForce RTX 5080 (driver 621.24 = 32.0.16.2124), AMD Ryzen 7 5800X3D, 32 GB, Windows 11 Pro 10.0.26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, release. On 3ce7f30 (this PR, rebased onto main 08db802; the GPU tests sit in the middle of recomp/tests.rs and dxil/core_tests.rs, so tests other PRs append at the end do not conflict with them).
  • thehollowedone (RTX 3080 Ti, comment below) found that with one window a mixed load took the memory at the table's low offset for the table on d2dee32; their fixture variant is now the two ..._not_the_memory_at_its_offset tests, and s_getpc_b64 tags the code pointer with one window too.
  • cargo test --release -p xcl --lib -- constant_data_after_the_program code_loads on 3ce7f30: 5 passed, 0 failed, 0 ignored (all four GPU tests ran on the GPU, no SKIPPED).
  • cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4 on 3ce7f30: 1430 passed, 4 failed, 47 ignored.
    • The 4 failures are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3 (CreateComputePipelineState: out of memory (0x8007000E)), which fail the same way on main (last checked on 568e7db: 1150 passed, the same 4 failed, 46 ignored).
    • rerouted_disk_entries_follow_the_direct_translator and pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa, reported in the comments, are not in this diff; they failed on the older main 5478c4a without this change and pass in the runs above.
    • Without --no-fail-fast cargo stops after the xcl lib binary.
  • SKIPPED (the same on main): 21 "no wave64" (recomp::lower::tests ×4, recomp::lower_dxil::tests ×14, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, dxil::kernel::dispatch_chain_native_wave64_builds_whole), 3 "refused by the per-lane form" (lower_dxil::tests), heap_window_out_of_memory_falls_back_to_the_switch_form ("no heap windows"), pso_measurement_compiles_an_exact_synthetic_record (driver cache cannot be disabled without Developer Mode).
  • The newer retail title (#505): on main alone it does not reach its world, so the effect was measured on a local branch that adds other open PRs and local work to main (XCL_HEAP_WINDOWS=1, XCL_UMA_SHADOW=1, pipelines precompiled), with the first form of this change applied (before the port to main and before the three load forms):
    • output LUT of postfx_aces:CS_BakeACESWithGamutCompressLUT_QuasiLogShaper (64-cube RGBA16F, slice 0 read back): 1 distinct texel of 4096 before, about 3300 after, in two runs;
    • the composite's 2560x1440 R10G10B10A2 target: 2 distinct values before, 27 000–81 000 after;
    • presented world frames: one flat colour (0x262626) before, the scene after (still overexposed: the lighting has other faults).
  • xcl shaders <pack> --export-hlsl <dir> --record-hash 14f33bcccd1ec01d --split 0 with XCL_HEAP_WINDOWS=1 on 3ce7f30 (postfx_aces:CS_BakeACESWithGamutCompressLUT_QuasiLogShaper, 4 windows): its 6 table loads (global_load_dwordx3 after s_getpc_b64) are xcl_cload, its 3 descriptor table loads (s_load_dwordx4/x8) plain memory loads, no xcl_gload, and s_getpc_b64 gives high dword 0.
  • Linux + NVIDIA, by pr1sm-dev (comment on this PR; RTX 3070 8 GB, driver 595.91.07, Wine 11.22 + vkd3d-proton master 30b0eb9b, release x86_64-pc-windows-gnu, the retail title on the HLSL path with XCL_HEAP_WINDOWS=1, 120 s): the previous head b7209c2 ended in the driver at 9.4 s compiling a program with the table (status 0x3 in winevulkan), no frames; with 1bfa10d (the change to the three load forms, now squashed into this commit) the run reached 120 s, that program compiled in 288 ms and 2785 frames were shown. One run each.
  • xcl shaders <pack> --direct --hash 56c0cd3b82a00c6e --validate (indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes): translates in about 1 s and validates, 3.4 MB DXIL with heap windows. On the HLSL path that program is 28 MB of DXIL, so keeping it on the direct translator matters for compile time.

Regression run

main:

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: NVIDIA GeForce RTX 5080
title: 16b5e5d4
seconds: 60
exit: 0x0
frames shown: 1383 (PresentX 1383)
presents per 2 s (last 3): 35 52 56
device removals: 0
crashes: 0
peak commit: 19703 MB

this PR: pending for the rebased head. Since #2624 a PR that changes the translator first prepares all ~26,500 shaders with a cold cache, about 70 min on this machine before smoke.ps1 sees the title start; I'll add the block after that run. Anyone with the title is welcome to run scripts/smoke.ps1 on this head and post the block.

Not tested

  • AMD and Intel GPUs; a debug build.
  • The smoke runs cover the title's first 60 s (logos, intro): its post chain and LUT bakes run only in the world, so they do not reach the changed loads. The world numbers above come from the local branch, not from main.
  • Byte / short global loads, MUBUF buffer_load, the legacy GS path and the per-lane form (XCL_PER_LANE) still read memory at such addresses.
  • A program that writes into its own code region (none found in the pack).
  • Linux + NVIDIA with the one-window tag: pr1sm-dev's run was on an earlier head, with several windows.

AI use

  • Claude Code. Claude Opus 5.5 coordinated the investigation, ran the title, the tests and the regression runs, reviewed the change and wrote this description. Claude Fable 5.2 subagents found the cause from the shader disassembly and wrote the HLSL and direct DXIL change and their tests; Claude Opus 5.5 subagents wrote the load classes (code_loads.rs) and their test, ported the change to main, added the one-window tag and its tests after thehollowedone's finding, squashed it and ran the whole suite on this commit and on main. The Linux / NVIDIA run is pr1sm-dev's (their comment names their tool and model).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5489814382 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229). Originally posted by [MacieGx](https://github.com/MacieGx) on 2026-11-25T10:46:41Z. --- Console programs keep constant tables after `s_endpgm` and read them PC-relative (`s_getpc_b64` + `s_load_dword*` / `global_load_dword*`). The translation gave `s_getpc_b64` the program's offset with high dword 0, so in a title those loads read memory window 0 at a low offset and got zeros. This makes both translators (HLSL and direct DXIL) read the program's own constant data there. Part of #505. 676 of the 26503 shader records of the newer retail title (#505) take such an address. Among them are all `postfx_aces` LUT bakes (`CS_Bake*LUT*`): the ACES tone-scale spline coefficients sit after the program, so with zeros every channel came out 1.0 and the 64-cube output LUT the composite pass reads was one constant texel (0.162, 0.162, 0.162, 1). The presented picture was then one flat grey whatever the scene. Others in the list: `scattering_transmittance_system`, `prefilter_env_map`, `MS_VS_CascadeShadows*`, `MS_VS_Transform*`, `rtdirectionalshadows`, `indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes`, `water_*`. **What is in it** - `crates/xcl/src/gpu/xbox.rs`: `Fssm::rodata(program)`, the data blocks after a program. - `crates/xcl/src/gpu/recomp/code_loads.rs` (new): sorts the `s_load*` / `s_buffer_load*` and FLAT / GLOBAL loads of a program with constant data by whether their address comes from `s_getpc_b64`, by a forward dataflow over the CFG (`s_getpc_b64` and offsets added to it give a code address, merges join, loads give data; an indirect jump makes every load "maybe"). Three forms follow: - address never from `s_getpc_b64`: a plain memory load, no table test (as before this PR); - from it on every path: `xcl_cload*`, the table's dwords (0 outside the blocks), no memory access and no window index; - from it on some paths: `xcl_gload*(hi, a)` reads the memory and selects the table's dwords, with no branch, when the raw high dword is `CODE_ADDRESS_HI` (0xC0DE, above any user-space address). `s_getpc_b64`'s high dword is `CODE_ADDRESS_HI` in a program with such a mixed load, with one memory window as with several, and 0 in a program with only table loads or only memory loads. With one window the memory loads take the low dword only, so a tagged pointer used for a memory load still reads the memory; without the tag there, a mixed load took the title's memory at the table's low offset for the table (thehollowedone, below). A first form tested the window index in a branch around every load of such a program; the NVIDIA Linux driver crashed compiling it (pr1sm-dev, below). - `crates/xcl/src/gpu/recomp/mod.rs`, `emit.rs`: new `Options::rodata`. The HLSL embeds the blocks as `static const uint xcl_rodata[]` and emits the three forms above. - `crates/xcl/src/gpu/dxil/` (`kernel.rs`, `lower.rs`, `lower_mem.rs`, `lower_window.rs`, `coverage.rs`): the same for the direct translator, as an internal constant array of the module (`Lw::rodata_loads`), with the same three forms; `s_buffer_load` through a V# built from `s_getpc_b64` reads it too. `kernel::translate_entry_rodata` carries the data (and, for compute, the compact table size `translate_compute_on` picks for wave32-only GPUs); the per-lane form has no table and leaves such programs to the per-instruction form. Its `TRANSLATOR_VERSION` goes from 9 to 10. - `crates/xcl/src/gpu/recomp/pso.rs`, `crates/xcl/src/shaders.rs`: the data is passed on the compute, VS / PS and mesh paths (HLSL and direct), and by `xcl shaders` (`--precompile`, the direct sweep). - Tests: `gpu::recomp::tests::gpu_loads_read_the_constant_data_after_the_program` and `gpu::dxil::core_tests::gpu_direct_loads_read_the_constant_data_after_the_program`: a program reads its table through `s_getpc_b64` + `s_load_dword*` / `global_load_dword*` (direct: also `s_buffer_load` through a V# on it), with one window, two windows in the switch form and with heap windows; the values must equal the table. `..._not_the_memory_at_its_offset` (both translators): the same with one window, the memory a load through the same register pair reads at the table's low offset. `gpu::recomp::code_loads::tests::loads_from_s_getpc_read_the_code_and_the_others_memory`: the pattern of a retail LUT bake gives the table loads "code", a descriptor table load nothing and a load whose pointer is a code address on one path only "maybe". - 751 lines added and 40 removed, 281 of them the five tests. **Tested** - Rebased onto `main` `8b957bec` (now `98a629a`, no change to the code besides the rebase). `cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4` on `98a629a`: 1449 passed, 4 failed (the same `fuzz_validate_and_gpu_0..3`), 47 ignored. The counts below are from `3ce7f30`, before the rebase. - NVIDIA GeForce RTX 5080 (driver 621.24 = 32.0.16.2124), AMD Ryzen 7 5800X3D, 32 GB, Windows 11 Pro 10.0.26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, release. On `3ce7f30` (this PR, rebased onto `main` `08db802`; the GPU tests sit in the middle of `recomp/tests.rs` and `dxil/core_tests.rs`, so tests other PRs append at the end do not conflict with them). - thehollowedone (RTX 3080 Ti, comment below) found that with one window a mixed load took the memory at the table's low offset for the table on `d2dee32`; their fixture variant is now the two `..._not_the_memory_at_its_offset` tests, and `s_getpc_b64` tags the code pointer with one window too. - `cargo test --release -p xcl --lib -- constant_data_after_the_program code_loads` on `3ce7f30`: 5 passed, 0 failed, 0 ignored (all four GPU tests ran on the GPU, no SKIPPED). - `cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4` on `3ce7f30`: 1430 passed, 4 failed, 47 ignored. - The 4 failures are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3` (`CreateComputePipelineState: out of memory (0x8007000E)`), which fail the same way on `main` (last checked on `568e7db`: 1150 passed, the same 4 failed, 46 ignored). - `rerouted_disk_entries_follow_the_direct_translator` and `pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa`, reported in the comments, are not in this diff; they failed on the older `main` `5478c4a` without this change and pass in the runs above. - Without `--no-fail-fast` cargo stops after the `xcl` lib binary. - SKIPPED (the same on `main`): 21 "no wave64" (`recomp::lower::tests` ×4, `recomp::lower_dxil::tests` ×14, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `dxil::kernel::dispatch_chain_native_wave64_builds_whole`), 3 "refused by the per-lane form" (`lower_dxil::tests`), `heap_window_out_of_memory_falls_back_to_the_switch_form` ("no heap windows"), `pso_measurement_compiles_an_exact_synthetic_record` (driver cache cannot be disabled without Developer Mode). - The newer retail title (#505): on `main` alone it does not reach its world, so the effect was measured on a local branch that adds other open PRs and local work to `main` (`XCL_HEAP_WINDOWS=1`, `XCL_UMA_SHADOW=1`, pipelines precompiled), with the first form of this change applied (before the port to `main` and before the three load forms): - output LUT of `postfx_aces:CS_BakeACESWithGamutCompressLUT_QuasiLogShaper` (64-cube RGBA16F, slice 0 read back): 1 distinct texel of 4096 before, about 3300 after, in two runs; - the composite's 2560x1440 R10G10B10A2 target: 2 distinct values before, 27 000–81 000 after; - presented world frames: one flat colour (0x262626) before, the scene after (still overexposed: the lighting has other faults). - `xcl shaders <pack> --export-hlsl <dir> --record-hash 14f33bcccd1ec01d --split 0` with `XCL_HEAP_WINDOWS=1` on `3ce7f30` (`postfx_aces:CS_BakeACESWithGamutCompressLUT_QuasiLogShaper`, 4 windows): its 6 table loads (`global_load_dwordx3` after `s_getpc_b64`) are `xcl_cload`, its 3 descriptor table loads (`s_load_dwordx4/x8`) plain memory loads, no `xcl_gload`, and `s_getpc_b64` gives high dword 0. - Linux + NVIDIA, by pr1sm-dev (comment on this PR; RTX 3070 8 GB, driver 595.91.07, Wine 11.22 + vkd3d-proton master `30b0eb9b`, release `x86_64-pc-windows-gnu`, the retail title on the HLSL path with `XCL_HEAP_WINDOWS=1`, 120 s): the previous head `b7209c2` ended in the driver at 9.4 s compiling a program with the table (status `0x3` in `winevulkan`), no frames; with `1bfa10d` (the change to the three load forms, now squashed into this commit) the run reached 120 s, that program compiled in 288 ms and 2785 frames were shown. One run each. - `xcl shaders <pack> --direct --hash 56c0cd3b82a00c6e --validate` (`indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes`): translates in about 1 s and validates, 3.4 MB DXIL with heap windows. On the HLSL path that program is 28 MB of DXIL, so keeping it on the direct translator matters for compile time. **Regression run** main: ``` xcl-smoke v1 commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb gpu: NVIDIA GeForce RTX 5080 title: 16b5e5d4 seconds: 60 exit: 0x0 frames shown: 1383 (PresentX 1383) presents per 2 s (last 3): 35 52 56 device removals: 0 crashes: 0 peak commit: 19703 MB ``` this PR: pending for the rebased head. Since #2624 a PR that changes the translator first prepares all ~26,500 shaders with a cold cache, about 70 min on this machine before `smoke.ps1` sees the title start; I'll add the block after that run. Anyone with the title is welcome to run `scripts/smoke.ps1` on this head and post the block. **Not tested** - AMD and Intel GPUs; a debug build. - The smoke runs cover the title's first 60 s (logos, intro): its post chain and LUT bakes run only in the world, so they do not reach the changed loads. The world numbers above come from the local branch, not from `main`. - Byte / short global loads, MUBUF `buffer_load`, the legacy GS path and the per-lane form (`XCL_PER_LANE`) still read memory at such addresses. - A program that writes into its own code region (none found in the pack). - Linux + NVIDIA with the one-window tag: pr1sm-dev's run was on an earlier head, with several windows. **AI use** - Claude Code. Claude Opus 5.5 coordinated the investigation, ran the title, the tests and the regression runs, reviewed the change and wrote this description. Claude Fable 5.2 subagents found the cause from the shader disassembly and wrote the HLSL and direct DXIL change and their tests; Claude Opus 5.5 subagents wrote the load classes (`code_loads.rs`) and their test, ported the change to `main`, added the one-window tag and its tests after thehollowedone's finding, squashed it and ran the whole suite on this commit and on `main`. The Linux / NVIDIA run is pr1sm-dev's (their comment names their tool and model). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
itsSio commented 2026-11-25 12:06:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by itsSio on 2026-11-25T11:23:51Z.


Tested

Independent debug verification on clean 23047743c72f180bd142e5802ef0920c97ab30cb. Windows 11 Pro 26200, x64 MSVC, unoptimized dev/test with debug info off. cargo build --workspace --locked succeeded on both PCs. cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture exited 101 on both:

GPU / driver CPU, RAM, toolchain Passed / failed / ignored Runtime SKIPPED
RTX 5080 / 32.0.16.1088 Ryzen 7 9800X3D, 32 GiB; Rust 1.97.0, DXC/DXIL 1.9.2609.5 1227 / 2 / 46 25
RTX 2080 SUPER / 32.0.16.1088 Ryzen 5 5600X, 16 GiB; Rust 1.99.1, DXC/DXIL 1.8.2502.11 1227 / 2 / 46 27

Both logged 20 native-wave64 skips, three per-lane f16/f32 refusals, and one skip each for unavailable driver-cache control and heap windows. The RTX 2080 SUPER also logged two missing-D3D12-debug-layer skips.

cargo test -p xcl --lib --locked constant_data_after_the_program -- --test-threads=1 --nocapture: 2 / 0 / 0, no runtime skips, on each of the RTX 5080, RTX 2080 SUPER, and Radeon RDNA2 iGPU (32.0.21043.5001, same Ryzen 7 system and toolchain). Both the HLSL and direct-DXIL constant-table tests passed.

The two workspace failures had identical assertions on both PCs: rerouted_disk_entries_follow_the_direct_translator (68 vs 1), and pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa (format 85, got 28). I ran each on the exact parent 5478c4a7c1ae5adba127c8d27018d7fdbf3a8725 on both PCs using cargo test -p xcl --lib --locked <fully-qualified-name> -- --exact --test-threads=1 --nocapture. All four invocations reproduced the corresponding exact assertion, each 0 / 1 / 0, no skips. These signatures predate this PR; the head workspace results remain red.

Not tested

Retail smoke, title shader samples, full AMD workspace, Intel, release mode, and performance. The parent checks were targeted, not full-workspace runs.

AI use

Ran via Samaritan:

  • OpenCode with OpenAI GPT-6.2 Sol (openai/gpt-6.2-sol): scoped and ran the two-PC head and parent tests, checked logs, and wrote this report. No subagents contributed to this check.
<!-- greyfinch-sync:ivall/xcl:comment:7160991433 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7160991433). Originally posted by [itsSio](https://github.com/itsSio) on 2026-11-25T11:23:51Z. --- **Tested** Independent debug verification on clean `23047743c72f180bd142e5802ef0920c97ab30cb`. Windows 11 Pro 26200, x64 MSVC, unoptimized dev/test with debug info off. `cargo build --workspace --locked` succeeded on both PCs. `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture` exited 101 on both: | GPU / driver | CPU, RAM, toolchain | Passed / failed / ignored | Runtime SKIPPED | | --- | --- | ---: | ---: | | RTX 5080 / `32.0.16.1088` | Ryzen 7 9800X3D, 32 GiB; Rust 1.97.0, DXC/DXIL 1.9.2609.5 | **1227 / 2 / 46** | 25 | | RTX 2080 SUPER / `32.0.16.1088` | Ryzen 5 5600X, 16 GiB; Rust 1.99.1, DXC/DXIL 1.8.2502.11 | **1227 / 2 / 46** | 27 | Both logged 20 native-wave64 skips, three per-lane f16/f32 refusals, and one skip each for unavailable driver-cache control and heap windows. The RTX 2080 SUPER also logged two missing-D3D12-debug-layer skips. `cargo test -p xcl --lib --locked constant_data_after_the_program -- --test-threads=1 --nocapture`: **2 / 0 / 0**, no runtime skips, on each of the RTX 5080, RTX 2080 SUPER, and Radeon RDNA2 iGPU (`32.0.21043.5001`, same Ryzen 7 system and toolchain). Both the HLSL and direct-DXIL constant-table tests passed. The two workspace failures had identical assertions on both PCs: `rerouted_disk_entries_follow_the_direct_translator` (68 vs 1), and `pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa` (format 85, got 28). I ran each on the exact parent `5478c4a7c1ae5adba127c8d27018d7fdbf3a8725` on both PCs using `cargo test -p xcl --lib --locked <fully-qualified-name> -- --exact --test-threads=1 --nocapture`. All four invocations reproduced the corresponding exact assertion, each **0 / 1 / 0**, no skips. These signatures predate this PR; the head workspace results remain red. **Not tested** Retail smoke, title shader samples, full AMD workspace, Intel, release mode, and performance. The parent checks were targeted, not full-workspace runs. **AI use** Ran via Samaritan: - OpenCode with OpenAI GPT-6.2 Sol (`openai/gpt-6.2-sol`): scoped and ran the two-PC head and parent tests, checked logs, and wrote this report. No subagents contributed to this check.
CharlyRien commented 2026-11-25 12:06:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CharlyRien on 2026-11-25T11:57:25Z.


In-title test on an RTX 3090 (32-lane waves), on a different local stack: with this change ported, the presented world frame is no longer flat grey, and the output LUT matches your numbers. One run, with two deviations from the PR that are listed below, so read it as a second data point, not as a test of this head.

Setup

  • RTX 3090 24 GB (driver 616.56, 32-lane waves, split wave64 form), Ryzen 9 5950X, 32 GB, Windows 11 22631, TdrDelay 30 s, release.
  • Tree: main 689f2db + #1329 (ac4b997), #1448, #1323, #889, #684, #929, #640, #1850 (0861c8c), #765, #541 (6bd8f64), #724 (rebased, 3442b58), #1887, #1803 (cb00751), #1982, #1405, #1464, #1989 (197b104, applied by hand), then this PR's first head 039a363 cherry-picked (conflicts in dxil/kernel.rs, recomp/pso.rs, shaders.rs and the two test files, resolved by hand; both translators kept). Not the current head 2304774.
  • Local changes that matter for what follows: copies that make the buffers in the GPU view of the title's 24 GB reservation readable (#697), the heap addresses in the two-pass mesh compute pass (my comment on #2092), a depth-twin to depth copy at each use on top of #1989, the title's stall watchdog neutralised, compute programs of 4 MB or more not built, render-target dumps.
  • Env: XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_NETWORK=0 XCL_PAGE_BUDGET_MB=1024 XCL_GPU_WAIT_RELEASE_MS=250 (as #1046).
  • Deviation 1: only programs that contain an s_getpc_b64 get the table (a local switch). Deviation 2: only containers with such a program were retranslated (258 used ones plus 261 mesh containers, about 13 minutes); the others kept their cached translation, on the reading that the emitted HLSL is unchanged when there is no table. Neither was checked against the full change.

Measured

  • The PR's two tests on this card: gpu::dxil::core_tests::gpu_direct_loads_read_the_constant_data_after_the_program ... ok, gpu::recomp::tests::gpu_loads_read_the_constant_data_after_the_program ... ok, 2 passed; 0 failed.
  • 64-cube RGBA16F output LUT, read back in a world frame: 166 521 distinct texels of 262 144, 3 236 distinct in slice 0 (you report about 3 300 after, 1 before). I have no "before" readback of the LUT on this stack.
  • Presented 3840x2160 frame, sampled every 4th texel, six consecutive dumped frames 126 to 147 s into the run:
    • before (same stack without the port, another run and binary, 152 s): 1 154 distinct values, most common ff3f3836 (12.6 %), flat grey on screen;
    • after: the first three frames are near-white (78 distinct RGB values in one of them), then 4 809, 49 949 and 53 735 distinct values; in the last two an object of the scene is recognisable, blown out, white and teal, with the letterbox bars and a subtitle line.
  • The lit HDR target stays very dark (brightest channel p50 2.6e-6 in one frame), which matches your "still overexposed: the lighting has other faults" and what you describe on #505.
  • Depth and G-buffer coverage were also higher than in the "before" run (main depth fully covered in the last frame, against 9 % covered). I cannot attribute that to this change: different run, different frames.

Not tested / not established

  • The current head, and the full change without the two deviations.
  • An A/B on one binary: the "before" is a different binary of the same stack, so the change of the presented frame is attributed to this PR by your explanation and the LUT numbers, not by a controlled pair here.
  • One more run of the same binary died at 129 s with exit code 0xC0000409 before any dump; cause not found, and a local diagnostic of mine is a suspect, so I am not reporting it against this PR.
  • Frame rate, and anything past 147 s: the run was stopped there on purpose. On this stack without the port the device is removed 24 to 64 s into the world (#1452); no run with the port went far enough to say whether that changes.

AI use: Claude Code (Claude Fable 5.2 coordinating; a Claude Fable 5.2 agent did the port, the runs and the dumps). I looked at the last dumped frame and checked its log line; the other numbers are from the agent's notes.

<!-- greyfinch-sync:ivall/xcl:comment:7161728947 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7161728947). Originally posted by [CharlyRien](https://github.com/CharlyRien) on 2026-11-25T11:57:25Z. --- **In-title test on an RTX 3090 (32-lane waves), on a different local stack: with this change ported, the presented world frame is no longer flat grey, and the output LUT matches your numbers.** One run, with two deviations from the PR that are listed below, so read it as a second data point, not as a test of this head. **Setup** - RTX 3090 24 GB (driver 616.56, 32-lane waves, split wave64 form), Ryzen 9 5950X, 32 GB, Windows 11 22631, `TdrDelay` 30 s, release. - Tree: `main` `689f2db` + #1329 (`ac4b997`), #1448, #1323, #889, #684, #929, #640, #1850 (`0861c8c`), #765, #541 (`6bd8f64`), #724 (rebased, `3442b58`), #1887, #1803 (`cb00751`), #1982, #1405, #1464, #1989 (`197b104`, applied by hand), then this PR's **first head `039a363`** cherry-picked (conflicts in `dxil/kernel.rs`, `recomp/pso.rs`, `shaders.rs` and the two test files, resolved by hand; both translators kept). Not the current head `2304774`. - Local changes that matter for what follows: copies that make the buffers in the GPU view of the title's 24 GB reservation readable (#697), the heap addresses in the two-pass mesh compute pass (my comment on #2092), a depth-twin to depth copy at each use on top of #1989, the title's stall watchdog neutralised, compute programs of 4 MB or more not built, render-target dumps. - Env: `XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_NETWORK=0 XCL_PAGE_BUDGET_MB=1024 XCL_GPU_WAIT_RELEASE_MS=250` (as #1046). - **Deviation 1**: only programs that contain an `s_getpc_b64` get the table (a local switch). **Deviation 2**: only containers with such a program were retranslated (258 used ones plus 261 mesh containers, about 13 minutes); the others kept their cached translation, on the reading that the emitted HLSL is unchanged when there is no table. Neither was checked against the full change. **Measured** - The PR's two tests on this card: `gpu::dxil::core_tests::gpu_direct_loads_read_the_constant_data_after_the_program ... ok`, `gpu::recomp::tests::gpu_loads_read_the_constant_data_after_the_program ... ok`, `2 passed; 0 failed`. - 64-cube RGBA16F output LUT, read back in a world frame: 166 521 distinct texels of 262 144, **3 236 distinct in slice 0** (you report about 3 300 after, 1 before). I have no "before" readback of the LUT on this stack. - Presented 3840x2160 frame, sampled every 4th texel, six consecutive dumped frames 126 to 147 s into the run: - before (same stack without the port, another run and binary, 152 s): 1 154 distinct values, most common `ff3f3836` (12.6 %), flat grey on screen; - after: the first three frames are near-white (78 distinct RGB values in one of them), then 4 809, 49 949 and **53 735 distinct** values; in the last two an object of the scene is recognisable, blown out, white and teal, with the letterbox bars and a subtitle line. - The lit HDR target stays very dark (brightest channel p50 2.6e-6 in one frame), which matches your "still overexposed: the lighting has other faults" and what you describe on #505. - Depth and G-buffer coverage were also higher than in the "before" run (main depth fully covered in the last frame, against 9 % covered). I cannot attribute that to this change: different run, different frames. **Not tested / not established** - The current head, and the full change without the two deviations. - An A/B on one binary: the "before" is a different binary of the same stack, so the change of the presented frame is attributed to this PR by your explanation and the LUT numbers, not by a controlled pair here. - One more run of the same binary died at 129 s with exit code `0xC0000409` before any dump; cause not found, and a local diagnostic of mine is a suspect, so I am not reporting it against this PR. - Frame rate, and anything past 147 s: the run was stopped there on purpose. On this stack without the port the device is removed 24 to 64 s into the world (#1452); no run with the port went far enough to say whether that changes. **AI use**: Claude Code (Claude Fable 5.2 coordinating; a Claude Fable 5.2 agent did the port, the runs and the dumps). I looked at the last dumped frame and checked its log line; the other numbers are from the agent's notes.
DavidM1911 commented 2026-11-25 17:07:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T16:31:24Z.


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

  • cargo test -p xcl --lib: 1 real failure, deterministic (also fails --test-threads=1):
hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa
  assertion failed: format 85 kept — left: 28, right: 85 (device_x.rs:1376)

The new test's own assertion fails — UAV stripping keeps the wrong format. Needs a fix before merge.

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7168115394 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7168115394). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T16:31:24Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: **1 real failure**, deterministic (also fails `--test-threads=1`): ``` hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa assertion failed: format 85 kept — left: 28, right: 85 (device_x.rs:1376) ``` The new test's own assertion fails — UAV stripping keeps the wrong format. Needs a fix before merge. — Devin
MacieGx commented 2026-11-25 21:05:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MacieGx on 2026-11-25T20:57:22Z.


@DavidM1911 pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa is not touched by this PR: it failed on main at the time too (checked alone on c9a5d58), and it passes on the rebased head (full suite in the description).

<!-- greyfinch-sync:ivall/xcl:comment:7174415486 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7174415486). Originally posted by [MacieGx](https://github.com/MacieGx) on 2026-11-25T20:57:22Z. --- @DavidM1911 `pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa` is not touched by this PR: it failed on `main` at the time too (checked alone on `c9a5d58`), and it passes on the rebased head (full suite in the description).
bmjask commented 2026-11-25 21:11:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T21:11:29Z.

Review: COMMENTED


No concrete source-level defect found. Post-program rodata recognition and CODE_ADDRESS_HI layout gating are correct across HLSL/Direct-DXIL; current CI/smoke and direct GPU coverage are strong. Residual gaps: direct geometry/legacy GS/per-lane intentionally remain unsupported, no byte/short/MUBUF coverage, and add a multi-program FSSM case to ensure one program cannot alias later program rodata. AMD/Intel validation would help. I found no blocker.

<!-- greyfinch-sync:ivall/xcl:review:6065042628 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#pullrequestreview-6065042628). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-25T21:11:29Z. **Review:** COMMENTED --- No concrete source-level defect found. Post-program rodata recognition and CODE_ADDRESS_HI layout gating are correct across HLSL/Direct-DXIL; current CI/smoke and direct GPU coverage are strong. Residual gaps: direct geometry/legacy GS/per-lane intentionally remain unsupported, no byte/short/MUBUF coverage, and add a multi-program FSSM case to ensure one program cannot alias later program rodata. AMD/Intel validation would help. I found no blocker.
oni-swr commented 2026-11-25 22:06:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-25T21:12:29Z.


Tested

  • Windows 11 Pro build 26200; AMD Radeon RX 7800 XT 16 GB (driver 32.0.31035.1003); AMD Ryzen 7 5700X3D CPU; Rust 1.100.0 MSVC; DXC/DXIL 1.8.2502.11 from Windows SDK 10.0.26100.0. Debug profile. XCL_ADAPTER=radeon.
  • Tested the current PR head b7209c2cdd5c179a05dd19cb24ccd91be40a27b1 (the head had moved from 980eb78 in the handoff). Baseline origin/main was 6d12f58a229bc73889878a448c64dc3af25eeba0.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1,424 passed, 1 failed, 46 ignored, 25 SKIPPED notices (exit 101). The sole failure was gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, also the sole baseline failure.
  • cargo test -p xcl --lib constant_data_after_the_program -- --test-threads=1: 2 passed, 0 failed, 0 ignored, 0 skipped; both GPU readback tests ran on the RX 7800 XT.
  • Current-main baseline cargo test --workspace --no-fail-fast -- --test-threads=4: 1,422 passed, 1 failed, 46 ignored, 25 SKIPPED notices (exit 101).

Not tested

  • A retail title or game data; no dumps were used.

AI use

  • Codex (gpt-6-luna) ran the tests and prepared this report.
<!-- greyfinch-sync:ivall/xcl:comment:7174756739 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7174756739). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-25T21:12:29Z. --- **Tested** - Windows 11 Pro build 26200; AMD Radeon RX 7800 XT 16 GB (driver 32.0.31035.1003); AMD Ryzen 7 5700X3D CPU; Rust 1.100.0 MSVC; DXC/DXIL 1.8.2502.11 from Windows SDK 10.0.26100.0. Debug profile. `XCL_ADAPTER=radeon`. - Tested the current PR head `b7209c2cdd5c179a05dd19cb24ccd91be40a27b1` (the head had moved from `980eb78` in the handoff). Baseline `origin/main` was `6d12f58a229bc73889878a448c64dc3af25eeba0`. - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1,424 passed, 1 failed, 46 ignored, 25 `SKIPPED` notices (exit 101). The sole failure was `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`, also the sole baseline failure. - `cargo test -p xcl --lib constant_data_after_the_program -- --test-threads=1`: 2 passed, 0 failed, 0 ignored, 0 skipped; both GPU readback tests ran on the RX 7800 XT. - Current-main baseline `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1,422 passed, 1 failed, 46 ignored, 25 `SKIPPED` notices (exit 101). **Not tested** - A retail title or game data; no dumps were used. **AI use** - Codex (gpt-6-luna) ran the tests and prepared this report.
pr1sm-dev commented 2026-11-25 22:06:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pr1sm-dev on 2026-11-25T21:22:45Z.


On Linux + NVIDIA (vkd3d-proton), the driver crashes in vkCreateComputePipelines on programs that get the new constant tables, including one of the ACES LUT bakes this PR names. Without the PR the same programs compile fine. The SPIR-V is valid, so this looks like a driver bug that the new table code triggers, not a translation error.

Setup: RTX 3070 8 GB, NVIDIA 595.91.07, Linux 6.17, Wine 11.22, vkd3d-proton master 30b0eb9b + #257 + the two dxil-spirv dominator patches from #1269. Local tree, not clean main: upstream 06c9f55 + #2092 + our commits, with this PR's diff at 980eb78 applied unchanged. I compared against the current head b7209c2: its recomp/emit.rs and gpu/xbox.rs hunks are identical, and the crashing programs go through the HLSL path.

What happens:

  • Title runs and xcl shaders --precompile --pipelines end with status 3, after err:vulkan:vkCreateComputePipelines Exception 0xc0000005 in Unix call. The same command lines on the tree without the PR run clean (3-min precompile sample: 23,200 records, no fault).
  • With XCL_PSO_TRACE=1, the thread that dies is always inside a driver compile of a table-carrying program with no driver blob:
    • In one run, a 13 KB console compute program whose DXIL grows from 29,296 B to 42,360 B with the PR.
    • In a run where only the 10 ACES LUT bakes got tables (a local allow-list), one of those bakes (133,712 B DXIL), after 1,616 other compiles had finished.
  • The DXIL converts with dxil-spirv to SPIR-V that spirv-val --target-env vulkan1.3 accepts. One of them holds a 78-dword OpConstantComposite table.
  • Emitting tables of up to 512 dwords as a chain of selects instead of static const uint xcl_rodata[] (no array at all) does not help. So the array form itself is not the trigger.

Edit, later the same evening: the trigger is the code-address window logic. With s_getpc_b64 given high dword 0 (as with one window) and the xcl_w == 0xC0DE - xcl_uma_base && test dropped from xcl_gload*, the tables load by their low address only, and the driver stops faulting:

  • The ACES bake that faulted before compiles (1.6 s).
  • A title run with tables for all programs ran 240 s with no driver fault.
  • A 3-min precompile sample ran clean.
  • In 4 runs with that variant, none faulted in a driver compile.

With tables for the 10 ACES bakes on that variant, the presented frame stops being flat grey here as well: the world scene now comes through the composite. I have not checked why the driver chokes on the window test, and this variant is only a diagnosis build: a table read can then be confused with a load of the title's memory at the same low dword. So it is not a fix in itself, but it points at the part of the read path that needs another form on NVIDIA Linux.

Trap for others testing this: after one such crash, the translated-shader cache keeps the translations with their tables. Later runs then crash even with tables switched off, until that cache folder (translated/v2/<source id>) is moved aside.

I can try variants of the read path here if you have one in mind (each test is a short build + a ~1-minute run).

AI use: investigated and written with Claude Code (Claude Opus 5.5); all results are from real runs on the machine above.

<!-- greyfinch-sync:ivall/xcl:comment:7174997160 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7174997160). Originally posted by [pr1sm-dev](https://github.com/pr1sm-dev) on 2026-11-25T21:22:45Z. --- **On Linux + NVIDIA (vkd3d-proton), the driver crashes in `vkCreateComputePipelines` on programs that get the new constant tables, including one of the ACES LUT bakes this PR names.** Without the PR the same programs compile fine. The SPIR-V is valid, so this looks like a driver bug that the new table code triggers, not a translation error. **Setup:** RTX 3070 8 GB, NVIDIA 595.91.07, Linux 6.17, Wine 11.22, vkd3d-proton master `30b0eb9b` + #257 + the two dxil-spirv dominator patches from #1269. **Local tree, not clean `main`:** upstream `06c9f55` + #2092 + our commits, with this PR's diff at `980eb78` applied unchanged. I compared against the current head `b7209c2`: its `recomp/emit.rs` and `gpu/xbox.rs` hunks are identical, and the crashing programs go through the HLSL path. **What happens:** - Title runs and `xcl shaders --precompile --pipelines` end with status 3, after `err:vulkan:vkCreateComputePipelines Exception 0xc0000005 in Unix call`. The same command lines on the tree without the PR run clean (3-min precompile sample: 23,200 records, no fault). - With `XCL_PSO_TRACE=1`, the thread that dies is always inside a driver compile of a table-carrying program with no driver blob: - In one run, a 13 KB console compute program whose DXIL grows from 29,296 B to 42,360 B with the PR. - In a run where only the 10 ACES LUT bakes got tables (a local allow-list), one of those bakes (133,712 B DXIL), after 1,616 other compiles had finished. - The DXIL converts with dxil-spirv to SPIR-V that `spirv-val --target-env vulkan1.3` accepts. One of them holds a 78-dword `OpConstantComposite` table. - Emitting tables of up to 512 dwords as a chain of selects instead of `static const uint xcl_rodata[]` (no array at all) does **not** help. So the array form itself is not the trigger. **Edit, later the same evening: the trigger is the code-address window logic.** With `s_getpc_b64` given high dword 0 (as with one window) and the `xcl_w == 0xC0DE - xcl_uma_base &&` test dropped from `xcl_gload*`, the tables load by their low address only, and the driver stops faulting: - The ACES bake that faulted before compiles (1.6 s). - A title run with tables for all programs ran 240 s with no driver fault. - A 3-min precompile sample ran clean. - In 4 runs with that variant, none faulted in a driver compile. With tables for the 10 ACES bakes on that variant, **the presented frame stops being flat grey here as well:** the world scene now comes through the composite. I have not checked why the driver chokes on the window test, and this variant is only a diagnosis build: a table read can then be confused with a load of the title's memory at the same low dword. So it is not a fix in itself, but it points at the part of the read path that needs another form on NVIDIA Linux. **Trap for others testing this:** after one such crash, the translated-shader cache keeps the translations *with* their tables. Later runs then crash even with tables switched off, until that cache folder (`translated/v2/<source id>`) is moved aside. I can try variants of the read path here if you have one in mind (each test is a short build + a ~1-minute run). *AI use: investigated and written with Claude Code (Claude Opus 5.5); all results are from real runs on the machine above.*
MacieGx commented 2026-11-25 23:09:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MacieGx on 2026-11-25T22:26:59Z.


@pr1sm-dev thanks for the careful bisect, the window test was the right lead. Here is a variant that keeps code addresses apart from title memory without that test on the loads that do not need it: branch https://github.com/MacieGx/xcl/tree/recomp/getpc-constant-data-v2, one commit (1bfa10d) on this PR's head.

  1. At translation, a forward dataflow over the program's blocks marks which registers hold an address from s_getpc_b64 (offsets added to it keep the mark; a load clears it).
  2. A load whose address never comes from it is a plain memory load again, as before this PR, with no table test.
  3. A load whose address always comes from it reads only the table (xcl_cload*): no memory access and no window index.
  4. A load that depends on the path reads memory and takes the table value with a branch-free select on the raw high dword (== 0xC0DE); no xcl_w - xcl_uma_base test.
  5. s_getpc_b64 gets high dword 0xC0DE only in a program with such a mixed load and several windows; otherwise 0. The ACES bake 14f33bcccd1ec01d has none: its 6 table loads become xcl_cload and the getpc high dword is 0, i.e. your working variant without the table/memory mix-up.

The direct DXIL path does the same. On Windows / RTX 5080 the two GPU tests (now also with a load that reads the table on one path and memory on the other) pass, plus gpu::recomp and gpu::dxil (only the known fuzz_validate_and_gpu_* OOM failures, the same without the change). Not run in the title yet and nothing tested on Linux. If it compiles cleanly on your setup (after moving translated/v2/<source id> aside), I'll fold it into this PR with fresh regression runs.

AI use: Claude Code (Claude Opus 5.5 coordinating; a Claude Opus 5.5 subagent wrote the change and ran the tests).

<!-- greyfinch-sync:ivall/xcl:comment:7176375666 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7176375666). Originally posted by [MacieGx](https://github.com/MacieGx) on 2026-11-25T22:26:59Z. --- @pr1sm-dev thanks for the careful bisect, the window test was the right lead. Here is a variant that keeps code addresses apart from title memory without that test on the loads that do not need it: branch https://github.com/MacieGx/xcl/tree/recomp/getpc-constant-data-v2, one commit (`1bfa10d`) on this PR's head. 1. At translation, a forward dataflow over the program's blocks marks which registers hold an address from `s_getpc_b64` (offsets added to it keep the mark; a load clears it). 2. A load whose address never comes from it is a plain memory load again, as before this PR, with no table test. 3. A load whose address always comes from it reads only the table (`xcl_cload*`): no memory access and no window index. 4. A load that depends on the path reads memory and takes the table value with a branch-free select on the raw high dword (`== 0xC0DE`); no `xcl_w - xcl_uma_base` test. 5. `s_getpc_b64` gets high dword `0xC0DE` only in a program with such a mixed load and several windows; otherwise 0. The ACES bake `14f33bcccd1ec01d` has none: its 6 table loads become `xcl_cload` and the getpc high dword is 0, i.e. your working variant without the table/memory mix-up. The direct DXIL path does the same. On Windows / RTX 5080 the two GPU tests (now also with a load that reads the table on one path and memory on the other) pass, plus `gpu::recomp` and `gpu::dxil` (only the known `fuzz_validate_and_gpu_*` OOM failures, the same without the change). Not run in the title yet and nothing tested on Linux. If it compiles cleanly on your setup (after moving `translated/v2/<source id>` aside), I'll fold it into this PR with fresh regression runs. AI use: Claude Code (Claude Opus 5.5 coordinating; a Claude Opus 5.5 subagent wrote the change and ran the tests).
pr1sm-dev commented 2026-11-26 00:05:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pr1sm-dev on 2026-11-26T00:04:55Z.


@MacieGx v2 (1bfa10d) on Linux + NVIDIA: the crash is gone here. The same title run that ends in the driver at 9.4 s on this PR's head ran its full 120 s with v2, and the program it ends on compiles in 288 ms. One run each, A then B, same settings.

Setup: RTX 3070 8 GB, NVIDIA 595.91.07, Wine 11.22 + vkd3d-proton master 30b0eb9b with #257's patch; release builds (x86_64-pc-windows-gnu) of your branch as is: A = b7209c2 (this PR's head), B = 1bfa10d, both on main 6d12f58, no local changes. Neither build had run here before, so each started with translated/v2 folders of its own (nothing from earlier trees). The retail title, HLSL path (no XCL_DIRECT_DXIL), XCL_HEAP_WINDOWS=1, XCL_PSO_TRACE=1, VKD3D_CONFIG=ignore_shared_fence,pipeline_library_log,no_descriptor_heap,retain_psos, XCL_SHORT_MOVIES=1, XCL_NETWORK=0, A / DOWN pressed by XCL_PRESS_AT, 120 s.

A b7209c2 B 1bfa10d
end status 0x3 at 9.4 s, in winevulkan ← d3d12core ran to 120 s, no error line
the program A ends on driver compile started (37,760 B DXIL), never finished 29,288 B DXIL, compiled in 288 ms
frames shown none 2,785

Also seen, for completeness:

  • With XCL_DIRECT_DXIL=1 (A only, otherwise the same, 120 s) A did not end: no error and presents to the end. So on this machine the HLSL path is the one that shows it.
  • B's process did not exit by itself after XCL_RUN_SECONDS ended the title at 120 s; my run script's timeout ended it. A's direct-DXIL run exited normally. I have not looked into it and can't say it has anything to do with this change.
  • On nvidia-dev (c044dc6, which carries an earlier form of this PR) with XCL_DIRECT_DXIL=1 and the switches from #2057, two runs ended the same way (status 0x3 with the same winevulkan ← d3d12core stack, at 43.8 s and 17.4 s; in the second, traced run, during a compute pipeline's driver compile that never finished). The DXIL of the program in the second run converts with the native dxil-spirv to SPIR-V that spirv-val (Vulkan 1.3) passes and that holds two constant arrays (29 and 78 words). 1bfa10d does not cherry-pick onto nvidia-dev (conflicts in dxil/core_tests.rs, dxil/lower_mem.rs, recomp/emit.rs), so v2 is not tested there.

AI use: Claude Code (Claude Opus 5.5) made the builds and runs and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7178373827 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7178373827). Originally posted by [pr1sm-dev](https://github.com/pr1sm-dev) on 2026-11-26T00:04:55Z. --- @MacieGx **v2 (`1bfa10d`) on Linux + NVIDIA: the crash is gone here.** The same title run that ends in the driver at 9.4 s on this PR's head ran its full 120 s with v2, and the program it ends on compiles in 288 ms. One run each, A then B, same settings. **Setup:** RTX 3070 8 GB, NVIDIA 595.91.07, Wine 11.22 + vkd3d-proton master `30b0eb9b` with #257's patch; release builds (`x86_64-pc-windows-gnu`) of your branch as is: A = `b7209c2` (this PR's head), B = `1bfa10d`, both on `main` `6d12f58`, no local changes. Neither build had run here before, so each started with `translated/v2` folders of its own (nothing from earlier trees). The retail title, HLSL path (no `XCL_DIRECT_DXIL`), `XCL_HEAP_WINDOWS=1`, `XCL_PSO_TRACE=1`, `VKD3D_CONFIG=ignore_shared_fence,pipeline_library_log,no_descriptor_heap,retain_psos`, `XCL_SHORT_MOVIES=1`, `XCL_NETWORK=0`, A / DOWN pressed by `XCL_PRESS_AT`, 120 s. | | A `b7209c2` | B `1bfa10d` | |---|---|---| | end | status `0x3` at 9.4 s, in `winevulkan` ← `d3d12core` | ran to 120 s, no error line | | the program A ends on | driver compile started (37,760 B DXIL), never finished | 29,288 B DXIL, compiled in 288 ms | | frames shown | none | 2,785 | **Also seen, for completeness:** - With `XCL_DIRECT_DXIL=1` (A only, otherwise the same, 120 s) A did not end: no error and presents to the end. So on this machine the HLSL path is the one that shows it. - B's process did not exit by itself after `XCL_RUN_SECONDS` ended the title at 120 s; my run script's timeout ended it. A's direct-DXIL run exited normally. I have not looked into it and can't say it has anything to do with this change. - On `nvidia-dev` (`c044dc6`, which carries an earlier form of this PR) with `XCL_DIRECT_DXIL=1` and the switches from #2057, two runs ended the same way (status `0x3` with the same `winevulkan` ← `d3d12core` stack, at 43.8 s and 17.4 s; in the second, traced run, during a compute pipeline's driver compile that never finished). The DXIL of the program in the second run converts with the native dxil-spirv to SPIR-V that `spirv-val` (Vulkan 1.3) passes and that holds two constant arrays (29 and 78 words). `1bfa10d` does not cherry-pick onto `nvidia-dev` (conflicts in `dxil/core_tests.rs`, `dxil/lower_mem.rs`, `recomp/emit.rs`), so v2 is not tested there. AI use: Claude Code (Claude Opus 5.5) made the builds and runs and wrote this comment.
MacieGx commented 2026-11-26 01:05:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MacieGx on 2026-11-26T00:31:38Z.


@pr1sm-dev thank you, that settles it. v2 is now folded into this PR: one commit, d2dee32, rebased onto main 08db802, with a new regression run and the full suite in the description, and your run credited under Tested.

<!-- greyfinch-sync:ivall/xcl:comment:7178848569 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7178848569). Originally posted by [MacieGx](https://github.com/MacieGx) on 2026-11-26T00:31:38Z. --- @pr1sm-dev thank you, that settles it. v2 is now folded into this PR: one commit, `d2dee32`, rebased onto `main` `08db802`, with a new regression run and the full suite in the description, and your run credited under **Tested**.
DavidM1911 commented 2026-11-26 01:05:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T00:59:24Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7179314330 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7179314330). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T00:59:24Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
thehollowedone commented 2026-11-26 02:08:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-26T01:57:42Z.


Independent RTX 3080 Ti check of head d2dee32: the checked-in HLSL and direct-DXIL constant-data GPU tests pass (2 passed, 0 failed, 0 ignored, 0 SKIPPED). A test-only address-collision variant fails on both backends (0 passed, 2 failed, 0 ignored, 0 SKIPPED).

In each existing one-window fixture, set st.sgpr[2] = block + 4 instead of 0x900, and place the existing [4242, 4343] memory words at mem[(st.sgpr[2] / 4) as usize..]. The mixed register-pair load then returns [0x7AB1_E003, 0x7AB1_E001]; the second value should be the memory word 4343. The direct-DXIL fixture includes its existing third memory word 4444. This exercises ordinary memory at the same low offset as the program's constant table; the code-address load still returns the table word.

The one-window mixed-load selection currently checks the low offset without a code-address tag in HLSL and direct DXIL. It appears mixed code/memory loads need a distinguishable code pointer in one-window mode too, with both fixture variants kept as regressions.

Command for each run: cargo test --offline --locked -p xcl --lib constant_data_after_the_program -- --nocapture --test-threads=1 using an isolated Cargo target. Windows 11 build 26300, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11. Synthetic inputs only; no title run. AI-assisted: Codex (GPT-6.2 Sol) reviewed the code, changed the local test fixture, ran both GPU checks, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7180320819 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7180320819). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-26T01:57:42Z. --- Independent RTX 3080 Ti check of [head `d2dee32`](https://github.com/xcl-dev/xcl/pull/2229/commits/d2dee320f21f099c4d3acba3dd64b5e805efb6d6): the checked-in HLSL and direct-DXIL constant-data GPU tests pass (2 passed, 0 failed, 0 ignored, 0 SKIPPED). A test-only address-collision variant fails on both backends (0 passed, 2 failed, 0 ignored, 0 SKIPPED). In each existing one-window fixture, set `st.sgpr[2] = block + 4` instead of `0x900`, and place the existing `[4242, 4343]` memory words at `mem[(st.sgpr[2] / 4) as usize..]`. The mixed register-pair load then returns `[0x7AB1_E003, 0x7AB1_E001]`; the second value should be the memory word `4343`. The direct-DXIL fixture includes its existing third memory word `4444`. This exercises ordinary memory at the same low offset as the program's constant table; the code-address load still returns the table word. The one-window mixed-load selection currently checks the low offset without a code-address tag in [HLSL](https://github.com/xcl-dev/xcl/blob/d2dee320f21f099c4d3acba3dd64b5e805efb6d6/crates/xcl/src/gpu/recomp/emit.rs#L5792) and [direct DXIL](https://github.com/xcl-dev/xcl/blob/d2dee320f21f099c4d3acba3dd64b5e805efb6d6/crates/xcl/src/gpu/dxil/lower_window.rs#L182). It appears mixed code/memory loads need a distinguishable code pointer in one-window mode too, with both fixture variants kept as regressions. Command for each run: `cargo test --offline --locked -p xcl --lib constant_data_after_the_program -- --nocapture --test-threads=1` using an isolated Cargo target. Windows 11 build 26300, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11. Synthetic inputs only; no title run. AI-assisted: Codex (GPT-6.2 Sol) reviewed the code, changed the local test fixture, ran both GPU checks, and drafted this report.
thehollowedone commented 2026-11-26 03:06:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-26T02:09:06Z.


A separate classifier regression on #2229 head d2dee32 is reproducible. The checked-in loads_from_s_getpc_read_the_code_and_the_others_memory CPU test passed 1/0/0. A local test-only program with S_GETPC_B64 s[0:1], S_CSELECT_B64 s[8:9], s[0:1], 0, then S_LOAD_DWORD through s[8:9] failed 0/1/0: code_loads returned Some(Code) for the load, where either selected address is possible and Some(Maybe) is expected. No skips in either run.

The select classification joins register uses only; the inline-zero operand is omitted by sgpr_uses. Joining both selected operands, treating the immediate as data, appears to address this case. The test-only fixture added 11 lines; no production change or commit was made.

Commands: cargo test --offline --locked -p xcl --lib loads_from_s_getpc_read_the_code_and_the_others_memory -- --nocapture --test-threads=1 and cargo test --offline --locked -p xcl --lib inline_zero_select_makes_code_load_conditional -- --nocapture --test-threads=1, in an isolated target. Windows 11 build 26300, Ryzen 7 9800X3D, Rust 1.99.1 MSVC. CPU-only synthetic classification; no GPU or title run. AI-assisted: Codex (GPT-6.2 Sol) created and ran the local regression and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7180511043 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7180511043). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-26T02:09:06Z. --- A separate classifier regression on [#2229 head `d2dee32`](https://github.com/xcl-dev/xcl/pull/2229/commits/d2dee320f21f099c4d3acba3dd64b5e805efb6d6) is reproducible. The checked-in `loads_from_s_getpc_read_the_code_and_the_others_memory` CPU test passed 1/0/0. A local test-only program with `S_GETPC_B64 s[0:1]`, `S_CSELECT_B64 s[8:9], s[0:1], 0`, then `S_LOAD_DWORD` through `s[8:9]` failed 0/1/0: `code_loads` returned `Some(Code)` for the load, where either selected address is possible and `Some(Maybe)` is expected. No skips in either run. The [select classification](https://github.com/xcl-dev/xcl/blob/d2dee320f21f099c4d3acba3dd64b5e805efb6d6/crates/xcl/src/gpu/recomp/code_loads.rs#L132-L133) joins register uses only; the inline-zero operand is omitted by `sgpr_uses`. Joining both selected operands, treating the immediate as data, appears to address this case. The test-only fixture added 11 lines; no production change or commit was made. Commands: `cargo test --offline --locked -p xcl --lib loads_from_s_getpc_read_the_code_and_the_others_memory -- --nocapture --test-threads=1` and `cargo test --offline --locked -p xcl --lib inline_zero_select_makes_code_load_conditional -- --nocapture --test-threads=1`, in an isolated target. Windows 11 build 26300, Ryzen 7 9800X3D, Rust 1.99.1 MSVC. CPU-only synthetic classification; no GPU or title run. AI-assisted: Codex (GPT-6.2 Sol) created and ran the local regression and drafted this report.
MacieGx commented 2026-11-26 03:06:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MacieGx on 2026-11-26T03:04:26Z.


@thehollowedone thanks, a real hole: with one window a mixed load could take ordinary memory at the table's low offset for the table. Fixed in 3ce7f30: a program with a mixed load now tags its code pointer with 0xC0DE in the high dword in every window mode, and the select tests the raw high dword. Programs whose loads are only from the table or only from memory keep high dword 0, which is what the Linux driver needed. Your variant is now two regression tests, one per backend, next to the existing ones. The full suite and a new regression run are in the description.

<!-- greyfinch-sync:ivall/xcl:comment:7181370854 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7181370854). Originally posted by [MacieGx](https://github.com/MacieGx) on 2026-11-26T03:04:26Z. --- @thehollowedone thanks, a real hole: with one window a mixed load could take ordinary memory at the table's low offset for the table. Fixed in `3ce7f30`: a program with a mixed load now tags its code pointer with `0xC0DE` in the high dword in every window mode, and the select tests the raw high dword. Programs whose loads are only from the table or only from memory keep high dword 0, which is what the Linux driver needed. Your variant is now two regression tests, one per backend, next to the existing ones. The full suite and a new regression run are in the description.
upipibi commented 2026-11-26 04:07:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-26T04:00:12Z.


NVIDIA test report for 3ce7f30: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug.

  • cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4 (xaudio2 hangs on this machine, also on main):
  • this PR: 1300 passed, 0 failed, 27 ignored; 25 SKIPPED lines, all no-wave64 or driver-cache, the same 25 as on the base.
  • Base 08db802, same command: 1295 passed, 0 failed, 27 ignored (the difference is this PR's 5 new tests).
  • cargo test -p xcl --lib constant_data_after_the_program -- --test-threads=1 --nocapture, 3 runs: 4 passed, 0 failed, 0 ignored each, 0 SKIPPED (HLSL and direct DXIL, both fixture variants).

Lib tests only; no title run.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7182207896 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7182207896). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T04:00:12Z. --- NVIDIA test report for `3ce7f30`: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug. - `cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4` (xaudio2 hangs on this machine, also on `main`): - this PR: 1300 passed, 0 failed, 27 ignored; 25 SKIPPED lines, all no-wave64 or driver-cache, the same 25 as on the base. - Base `08db802`, same command: 1295 passed, 0 failed, 27 ignored (the difference is this PR's 5 new tests). - `cargo test -p xcl --lib constant_data_after_the_program -- --test-threads=1 --nocapture`, 3 runs: 4 passed, 0 failed, 0 ignored each, 0 SKIPPED (HLSL and direct DXIL, both fixture variants). Lib tests only; no title run. AI-assisted (Claude Code, Claude Opus 5.5).
LocranKing commented 2026-11-26 05:05:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-26T04:48:45Z.


Independent NVIDIA test report on exact head 3ce7f30fa5ea60dab1a1c99ae35c31c810c9415c (clean detached checkout, no local changes).

Tested

  • Hardware: NVIDIA GeForce RTX 3060 Ti 8 GB (Ampere, wave32, driver 32.0.16.2140 / 621.40), AMD Ryzen 5 5500, 32 GB RAM, Windows 11 Home (build 26300), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), Windows SDK 10.0.26100.0.
  • cargo build --workspace + cargo test --workspace --no-fail-fast -- --test-threads=4 (debug): 1434 passed, 0 failed, 47 ignored (xcl --lib: 1309 passed, 0 failed, 27 ignored).
  • 27 SKIPPED GPU tests on this adapter: 21 wave64-only (no wave64), 3 wave32 per-lane f16/f32 semantics, 1 no heap windows, 1 no D3D12 debug layer (0x887A002D), 1 cannot disable driver cache without Developer Mode (0x887A002D).

Regression run
scripts/smoke.ps1 -Seconds 60, release builds of origin/main (b49be18) and this PR's head (3ce7f30):

main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3060 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1409 (PresentX 1409)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14032 MB

PR:

xcl-smoke v1
commit: 3ce7f30fa5ea60dab1a1c99ae35c31c810c9415c
gpu: NVIDIA GeForce RTX 3060 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1554 (PresentX 1554)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13993 MB

Not tested

  • AMD / Intel / Linux GPUs; XCL_SAMPLE_* tests; the 60 s smoke run covers boot/intro/menus and does not enter the 3D world.

AI use

  • Antigravity (Gemini 4 Hydrogen) ran the builds, test suite, and smoke.ps1 commands on this machine and drafted this report from the captured outputs.
<!-- greyfinch-sync:ivall/xcl:comment:7182924019 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7182924019). Originally posted by [LocranKing](https://github.com/LocranKing) on 2026-11-26T04:48:45Z. --- Independent NVIDIA test report on exact head `3ce7f30fa5ea60dab1a1c99ae35c31c810c9415c` (clean detached checkout, no local changes). **Tested** - Hardware: NVIDIA GeForce RTX 3060 Ti 8 GB (Ampere, wave32, driver `32.0.16.2140` / 621.40), AMD Ryzen 5 5500, 32 GB RAM, Windows 11 Home (build 26300), Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), Windows SDK `10.0.26100.0`. - `cargo build --workspace` + `cargo test --workspace --no-fail-fast -- --test-threads=4` (debug): 1434 passed, 0 failed, 47 ignored (`xcl --lib`: 1309 passed, 0 failed, 27 ignored). - 27 `SKIPPED` GPU tests on this adapter: 21 wave64-only (`no wave64`), 3 wave32 per-lane f16/f32 semantics, 1 `no heap windows`, 1 no D3D12 debug layer (`0x887A002D`), 1 cannot disable driver cache without Developer Mode (`0x887A002D`). **Regression run** `scripts/smoke.ps1 -Seconds 60`, release builds of `origin/main` (`b49be18`) and this PR's head (`3ce7f30`): main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3060 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1409 (PresentX 1409) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14032 MB ``` PR: ``` xcl-smoke v1 commit: 3ce7f30fa5ea60dab1a1c99ae35c31c810c9415c gpu: NVIDIA GeForce RTX 3060 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1554 (PresentX 1554) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13993 MB ``` **Not tested** - AMD / Intel / Linux GPUs; `XCL_SAMPLE_*` tests; the 60 s smoke run covers boot/intro/menus and does not enter the 3D world. **AI use** - Antigravity (Gemini 4 Hydrogen) ran the builds, test suite, and `smoke.ps1` commands on this machine and drafted this report from the captured outputs.
futurepro62 commented 2026-11-26 06:06:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-26T05:38:04Z.


NVIDIA and AMD full-suite run, to go with the reports above by LocranKing, upipibi, since none of them covers AMD. Tested exact head 3ce7f30f (on its base 08db802).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1422 passed, 0 failed, 45 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, dispatch_chain_native_wave64_builds_whole, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: gpu_direct_loads_read_the_constant_data_after_the_program, gpu_direct_loads_read_the_constant_data_after_the_program_not_the_memory_at_its_offset, loads_from_s_getpc_read_the_code_and_the_others_memory, gpu_loads_read_the_constant_data_after_the_program, gpu_loads_read_the_constant_data_after_the_program_not_the_memory_at_its_offset.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1433 passed, 0 failed, 47 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main b49be183 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7183664752 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7183664752). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-26T05:38:04Z. --- NVIDIA and AMD full-suite run, to go with the reports above by LocranKing, upipibi, since none of them covers AMD. Tested exact head `3ce7f30f` (on its base `08db802`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **1422 passed, 0 failed, 45 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `dispatch_chain_native_wave64_builds_whole`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - The new tests ran and passed: `gpu_direct_loads_read_the_constant_data_after_the_program`, `gpu_direct_loads_read_the_constant_data_after_the_program_not_the_memory_at_its_offset`, `loads_from_s_getpc_read_the_code_and_the_others_memory`, `gpu_loads_read_the_constant_data_after_the_program`, `gpu_loads_read_the_constant_data_after_the_program_not_the_memory_at_its_offset`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **1433 passed, 0 failed, 47 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `b49be183` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Prime1997 commented 2026-11-26 12:28:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-26T12:28:39Z.

Review: COMMENTED


Needs changes — keep the useful work. Checked head 3ce7f30fa5ea60dab1a1c99ae35c31c810c9415c.

The conditional-source classification still loses the non-register alternative when a program-data pointer is selected against an inline constant such as zero. SDWA also needs the actual scalar/vector selected source, including scalar constants and NULL. The local repair preserves those alternatives and includes code_loads.rs in the translator cache identity, so an older misclassification is not retained through cached output.

Local validation: head plus an uncommitted repair and regression fixtures: 7 passed, 0 failed, 0 ignored, 0 skipped. These are CPU checks of the local repair, not a claim that the unmodified PR passed them. Separate negative-control checks produced 3 passes and 4 expected failures.

Build command: cargo test --locked --offline -p xcl --lib --no-run --message-format=json --target-dir <isolated target> (only the private absolute target path is replaced here). Each selected test executable was then run separately as <test-exe> <exact-name> --exact --test-threads=1 --nocapture.

Selected exact tests
  • gpu::recomp::code_loads::tests::scalar_selects_include_constant_addresses
  • gpu::recomp::code_loads::tests::vector_select_includes_inline_zero_address
  • gpu::recomp::code_loads::tests::selects_keep_definite_code_and_data_loads
  • gpu::recomp::code_loads::tests::loads_from_s_getpc_read_the_code_and_the_others_memory
  • gpu::recomp::code_loads::tests::sdwa_selects_include_scalar_constant_addresses
  • gpu::recomp::code_loads::tests::sdwa_vector_register_numbers_are_not_constants
  • gpu::recomp::code_loads::tests::sdwa_selects_track_scalar_register_addresses

Latest-main source comparison: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7; full-head merge-tree result: clean. This is a source compatibility check, not a tested integration build. Local repair patch SHA-256: a6df4718f105df9db45a3cd904fc9211c022511c81189554e9a39ccd49b5b839.

Windows 11 Pro build 26200, i5-10400, 32 GiB RAM, Rust 1.100.0 MSVC debug tests. RTX 3060 Ti / driver 32.0.16.1714 is present but was not exercised. No full-suite, GPU or title result is claimed; installed builds and game data were untouched.

AI use: Codex (GPT-6) reviewed the source, prepared the local repair/fixtures, ran the checks and drafted this report.

Optional temporary Discord for coordinating this contributor work, helping test and comparing results.

<!-- greyfinch-sync:ivall/xcl:review:6074127297 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#pullrequestreview-6074127297). Originally posted by [Prime1997](https://github.com/Prime1997) on 2026-11-26T12:28:39Z. **Review:** COMMENTED --- **Needs changes — keep the useful work.** Checked head `3ce7f30fa5ea60dab1a1c99ae35c31c810c9415c`. The conditional-source classification still loses the non-register alternative when a program-data pointer is selected against an inline constant such as zero. SDWA also needs the actual scalar/vector selected source, including scalar constants and NULL. The local repair preserves those alternatives and includes `code_loads.rs` in the translator cache identity, so an older misclassification is not retained through cached output. **Local validation:** head plus an uncommitted repair and regression fixtures: **7 passed, 0 failed, 0 ignored, 0 skipped**. These are CPU checks of the local repair, not a claim that the unmodified PR passed them. Separate negative-control checks produced 3 passes and 4 expected failures. Build command: `cargo test --locked --offline -p xcl --lib --no-run --message-format=json --target-dir <isolated target>` (only the private absolute target path is replaced here). Each selected test executable was then run separately as `<test-exe> <exact-name> --exact --test-threads=1 --nocapture`. <details><summary>Selected exact tests</summary> - `gpu::recomp::code_loads::tests::scalar_selects_include_constant_addresses` - `gpu::recomp::code_loads::tests::vector_select_includes_inline_zero_address` - `gpu::recomp::code_loads::tests::selects_keep_definite_code_and_data_loads` - `gpu::recomp::code_loads::tests::loads_from_s_getpc_read_the_code_and_the_others_memory` - `gpu::recomp::code_loads::tests::sdwa_selects_include_scalar_constant_addresses` - `gpu::recomp::code_loads::tests::sdwa_vector_register_numbers_are_not_constants` - `gpu::recomp::code_loads::tests::sdwa_selects_track_scalar_register_addresses` </details> Latest-main source comparison: `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`; full-head merge-tree result: clean. This is a source compatibility check, not a tested integration build. Local repair patch SHA-256: `a6df4718f105df9db45a3cd904fc9211c022511c81189554e9a39ccd49b5b839`. Windows 11 Pro build 26200, i5-10400, 32 GiB RAM, Rust 1.100.0 MSVC debug tests. RTX 3060 Ti / driver 32.0.16.1714 is present but was not exercised. No full-suite, GPU or title result is claimed; installed builds and game data were untouched. AI use: Codex (GPT-6) reviewed the source, prepared the local repair/fixtures, ran the checks and drafted this report. Optional temporary [Discord](https://discord.gg/gK3y7WRRY) for coordinating this contributor work, helping test and comparing results.
ClosetPie107 commented 2026-11-26 16:06:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-26T15:08:20Z.


AMD RX 9070 (RDNA4, RADV / Linux) test report on 3ce7f30f

Setup

  • AMD Radeon RX 9070 16 GB (RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, 30 GiB RAM, CachyOS (kernel 7.3.5)
  • Proton Experimental (experimental-11.0-20261112), DXVK v3.1.1-209, patched vkd3d-proton master (ec207194, dxil-spirv b540c8a2), DXC 1.9.2609.5
  • Release x86_64-pc-windows-gnu build

Tested

  • constant_data_after_the_program GPU tests (XCL_ADAPTER=9070, --test-threads=1):
    • Default HLSL: 4 passed, 0 failed, 0 ignored, 0 skipped (peak VRAM 715 MiB)
    • Direct DXIL (XCL_DIRECT_DXIL=1): 4 passed, 0 failed, 0 ignored, 0 skipped (peak VRAM 703 MiB)
    • Covers gpu_loads_read_the_constant_data_after_the_program* and gpu_direct_loads_read_the_constant_data_after_the_program*.
  • code_loads and getpc unit tests (both HLSL and XCL_DIRECT_DXIL=1): 1 passed, 0 failed, 0 ignored, 0 skipped each.

Not tested

  • Full workspace test suite on 3ce7f30f, Windows, NVIDIA, retail game run.

AI use

  • T3 Code / Antigravity (Gemini 4 Neon) built the test binary, ran the tests on this machine, and drafted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7195838339 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7195838339). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-11-26T15:08:20Z. --- **AMD RX 9070 (RDNA4, RADV / Linux) test report on `3ce7f30f`** **Setup** - AMD Radeon RX 9070 16 GB (RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, 30 GiB RAM, CachyOS (kernel 7.3.5) - Proton Experimental (`experimental-11.0-20261112`), DXVK `v3.1.1-209`, patched vkd3d-proton `master` (`ec207194`, `dxil-spirv` `b540c8a2`), DXC `1.9.2609.5` - Release `x86_64-pc-windows-gnu` build **Tested** - **`constant_data_after_the_program` GPU tests (`XCL_ADAPTER=9070`, `--test-threads=1`):** - Default HLSL: **4 passed, 0 failed, 0 ignored, 0 skipped** (peak VRAM `715 MiB`) - Direct DXIL (`XCL_DIRECT_DXIL=1`): **4 passed, 0 failed, 0 ignored, 0 skipped** (peak VRAM `703 MiB`) - Covers `gpu_loads_read_the_constant_data_after_the_program*` and `gpu_direct_loads_read_the_constant_data_after_the_program*`. - **`code_loads` and `getpc` unit tests** (both HLSL and `XCL_DIRECT_DXIL=1`): **1 passed, 0 failed, 0 ignored, 0 skipped** each. **Not tested** - Full workspace test suite on `3ce7f30f`, Windows, NVIDIA, retail game run. **AI use** - T3 Code / Antigravity (Gemini 4 Neon) built the test binary, ran the tests on this machine, and drafted this report.
bielfreedom commented 2026-11-26 18:13:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bielfreedom on 2026-11-26T18:13:26Z.


AMD Windows, translation size and driver time for #2229 on an RX 9070 XT: the current head 3ce7f30 is cheap. It changes 261 of 2,689 retail compute programs and grows their total direct DXIL by 0.06 %. On the two programs I timed, nothing changed that the driver can see. The older version cherry-picked into amd-dev (6e83f828) grows the DXIL by 11 % over 1,009 programs and slows AMD's driver by about 20 % on them. Details and the bisection are in #2088.

Setup: RX 9070 XT (driver 32.0.32029.2010), Ryzen 7 7700, 32 GB RAM, Windows 11, release. This head and its base 08db802, each with a local timing patch in xcl shaders. --precompile --only cs [--pipelines], XCL_DIRECT_DXIL=1, switch windows, XCL_PSO_DISK_CACHE=0, a fresh translation cache and exe name per run.

base 08db802 3ce7f30
direct DXIL, all 2,689 programs 885.9 MB 886.4 MB (+0.06 %, 261 changed)
620491641aa9bad6 DXIL / driver 377,952 B / 14.9, 13.3 s 378,236 B / 14.5, 16.8 s
ed2f8fa2e996c6a6 pieces / driver 11, byte-identical / 10.8, 11.2 s 11, byte-identical / 9.9, 9.2 s

The 284-byte program's driver times overlap between the two builds, within this machine's noise.

AI use: Claude Code (Claude Opus 5.5) built the binaries, ran the measurements and wrote this; I posted it.

<!-- greyfinch-sync:ivall/xcl:comment:7200199284 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7200199284). Originally posted by [bielfreedom](https://github.com/bielfreedom) on 2026-11-26T18:13:26Z. --- **AMD Windows, translation size and driver time for #2229 on an RX 9070 XT: the current head `3ce7f30` is cheap.** It changes 261 of 2,689 retail compute programs and grows their total direct DXIL by 0.06 %. On the two programs I timed, nothing changed that the driver can see. The older version cherry-picked into `amd-dev` (`6e83f828`) grows the DXIL by 11 % over 1,009 programs and slows AMD's driver by about 20 % on them. Details and the bisection are in #2088. **Setup:** RX 9070 XT (driver 32.0.32029.2010), Ryzen 7 7700, 32 GB RAM, Windows 11, release. This head and its base `08db802`, each with a local timing patch in `xcl shaders`. `--precompile --only cs [--pipelines]`, `XCL_DIRECT_DXIL=1`, switch windows, `XCL_PSO_DISK_CACHE=0`, a fresh translation cache and exe name per run. | | base `08db802` | `3ce7f30` | |---|---:|---:| | direct DXIL, all 2,689 programs | 885.9 MB | 886.4 MB (+0.06 %, 261 changed) | | `620491641aa9bad6` DXIL / driver | 377,952 B / 14.9, 13.3 s | 378,236 B / 14.5, 16.8 s | | `ed2f8fa2e996c6a6` pieces / driver | 11, byte-identical / 10.8, 11.2 s | 11, byte-identical / 9.9, 9.2 s | The 284-byte program's driver times overlap between the two builds, within this machine's noise. **AI use:** Claude Code (Claude Opus 5.5) built the binaries, ran the measurements and wrote this; I posted it.
Alm0stSurely commented 2026-11-27 03:55:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Alm0stSurely on 2026-11-27T03:55:57Z.


RTX 5080 / Proton Experimental / NVIDIA 620.73.04, Series X profile. I checked a backport of 98a629a3 on our #2057-based build against the ACES bake actually observed in two title traces. Both traces show native pipeline creation for CS_BakeACESWithGamutCompressLUT_QuasiLogShaper (12 and 15 ms). The control CLI, starting with an empty translation cache, reproduced the title’s cached output byte-for-byte for all three sampled records.

With direct DXIL, four heap windows and split wave64, the ACES program changes from 125,652 to 126,348 bytes. A negative control without the PC-relative load stays byte-identical at 159,688 bytes. All four constant-data GPU tests (HLSL and direct DXIL, including the same-offset cases) ran and passed under Proton. The traces establish pipeline creation; the LUT contents and the effect on the movement-tutorial image still need measurement.

Test preparation and analysis assisted by OpenAI Codex (gpt-6.2-astra).

In-title follow-up: I kept the original executable, save profile, runtime settings and 1,207 of 1,208 starting cache entries. The only changed entry contained the corrected ACES translation. A file-access monitor saw XCL read it. The native driver created the 126,348-byte pipeline at +129.7 s (919 ms, no driver blob supplied). An isolated cold pipeline creation with the same executable also succeeded. The title displayed the Art Production credit at 6:58; the host memory guard ended the run at 7:04, before the tutorial. Pipeline creation can happen during preload. Dispatch at the tutorial, LUT output and an effect on the 3D scene remain unmeasured.

<!-- greyfinch-sync:ivall/xcl:comment:7209384773 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7209384773). Originally posted by [Alm0stSurely](https://github.com/Alm0stSurely) on 2026-11-27T03:55:57Z. --- RTX 5080 / Proton Experimental / NVIDIA 620.73.04, Series X profile. I checked a backport of `98a629a3` on our #2057-based build against the ACES bake actually observed in two title traces. Both traces show native pipeline creation for `CS_BakeACESWithGamutCompressLUT_QuasiLogShaper` (12 and 15 ms). The control CLI, starting with an empty translation cache, reproduced the title’s cached output byte-for-byte for all three sampled records. With direct DXIL, four heap windows and split wave64, the ACES program changes from 125,652 to 126,348 bytes. A negative control without the PC-relative load stays byte-identical at 159,688 bytes. All four constant-data GPU tests (HLSL and direct DXIL, including the same-offset cases) ran and passed under Proton. The traces establish pipeline creation; the LUT contents and the effect on the movement-tutorial image still need measurement. Test preparation and analysis assisted by OpenAI Codex (gpt-6.2-astra). In-title follow-up: I kept the original executable, save profile, runtime settings and 1,207 of 1,208 starting cache entries. The only changed entry contained the corrected ACES translation. A file-access monitor saw XCL read it. The native driver created the 126,348-byte pipeline at +129.7 s (919 ms, no driver blob supplied). An isolated cold pipeline creation with the same executable also succeeded. The title displayed the Art Production credit at 6:58; the host memory guard ended the run at 7:04, before the tutorial. Pipeline creation can happen during preload. Dispatch at the tutorial, LUT output and an effect on the 3D scene remain unmeasured.
SzczepanGrela commented 2026-11-27 05:05:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SzczepanGrela on 2026-11-27T05:05:38Z.


Current head still misclassifies NULL-selected addresses, with wrong GPU readbacks. Reproduced on exact 98a629a32933862efe2bb756c1ef4182dd433805, compared with base 8b957bec6f82495aec940944c6bf47faa02db590. Inline-zero and literal-zero controls pass on head; NULL (125) alternatives do not.

Minimal scalar case: after S_GETPC_B64 plus an offset sets s[0:1] to the table at 0x200, set SCC to 0, then encode:

S_CSELECT_B64: SDST=8, SSRC0=0, SSRC1=125
S_LOAD_DWORDX2: SDATA=20, SBASE=4, OFFSET=0, SOFFSET=125

The selected pointer is NULL, so the load should read memory at 0. With memory words 0xBAD00000, 0xBAD00025, head returns 0, 0. Changing only SSRC1 from 125 to inline zero 128 returns the correct memory words. Main also returns those memory words for the NULL case.

Other paired cases on the same head:

Select before the load NULL result Inline-zero control
S_CSELECT_B32 selects the pointer high word, low word fixed at 0x200 Table 0x7AB10000, 0x7AB10001 instead of memory 0xBAD01280, 0xBAD012A5 Correct
V_CNDMASK_B32, plain or SDWA with scalar S0/S1 Memory-selected lanes receive table words Correct

For all five NULL variants, captured code_loads output is Code; their corresponding inline-zero controls are Maybe. Each pair's instruction bytes differ only in that operand's 125 versus 128 field. The HLSL NULL cases use xcl_cload*. In reads, the constant alternative covers 128..=255, while NULL 125 is omitted from register reads and from the SDWA scalar helper's constant case.

Tested

  • RX 9070 16 GB, RADV GFX1201 / Mesa 26.3.1-arch3.5, Ryzen 7 7700, CachyOS 7.3.0-5-cachyos. Windows GNU release, Rust 1.97.1, GE-Proton11-12 / Wine 11.0 Staging, vkd3d-proton 8293130ebe370b1+ (local asserts-disabled build), DXC/DXIL 1.9.2602.17.
  • Separate source copies, append-only test module; original code/assertions preserved. Main uses its existing no-rodata translation APIs. Build each: cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --no-run --message-format=json-render-diagnostics.
  • Original head filters through Wine: <unit.exe> constant_data_after_the_program gpu::recomp::code_loads::tests:: translated_identity_tracks_the_code_load_analysis --nocapture --test-threads=1, then --test-threads=4: 7 passed, 0 failed each.
  • Added filter <unit.exe> workflow_rodata_select_matrix --nocapture --test-threads=1, three fresh processes per source. Each process runs 20 programs through HLSL and direct DXIL, native wave32/64, two runtime scalar/VCC selections: 160 dispatches. Main: 1 passed, 0 failed each, matching its legacy memory-only behavior. Head: 0 passed, 1 failed each, with the same 32 incorrect dispatches / 1,168 wrong load words per process, confined to the five NULL cases. Inline/literal zero, SDWA code-source moves/adds, high-numbered VGPR sources, table-only, memory-only, branch-merged and second-block/outside-block controls agree with expectations.
  • 960 matrix dispatches, including 480 native wave64, plus 12 separate physical-width probes. Independently re-encoded every instruction from the public ISA tables and checked 2,024,736 load/sentinel/memory/width words. All memory and sentinel checks pass; captures repeat byte-for-byte per source. 0 ignored, 0 skipped.

Inherited XCL_* cleared; network off, RX 9070 selected, GPU required, private enabled caches per process. These are kernel-ABI synthetic tests.

Not tested

Latest main c2ee10e4e905eb736e56953c52b749e18bcc7ede, advanced after the baseline was pinned, or an integration build on it; its translator/runner files are unchanged. Full suite, FSSM/guest pipeline integration, native Windows, other GPUs, retail workload, scripts/smoke.ps1, timing or FPS.

AI use

OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the diff, wrote the added fixture/captures, ran comparisons, independently verified encoded operands, load semantics, sentinels, memory, wave metadata and source/executable provenance, and drafted this report. Publication authorized by the account owner.

<!-- greyfinch-sync:ivall/xcl:comment:7210342489 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7210342489). Originally posted by [SzczepanGrela](https://github.com/SzczepanGrela) on 2026-11-27T05:05:38Z. --- **Current head still misclassifies NULL-selected addresses, with wrong GPU readbacks.** Reproduced on exact `98a629a32933862efe2bb756c1ef4182dd433805`, compared with base `8b957bec6f82495aec940944c6bf47faa02db590`. Inline-zero and literal-zero controls pass on head; NULL (`125`) alternatives do not. Minimal scalar case: after `S_GETPC_B64` plus an offset sets `s[0:1]` to the table at `0x200`, set SCC to 0, then encode: ```text S_CSELECT_B64: SDST=8, SSRC0=0, SSRC1=125 S_LOAD_DWORDX2: SDATA=20, SBASE=4, OFFSET=0, SOFFSET=125 ``` The selected pointer is NULL, so the load should read memory at 0. With memory words `0xBAD00000, 0xBAD00025`, head returns **0, 0**. Changing only `SSRC1` from `125` to inline zero `128` returns the correct memory words. Main also returns those memory words for the NULL case. Other paired cases on the same head: | Select before the load | NULL result | Inline-zero control | |---|---|---| | `S_CSELECT_B32` selects the pointer high word, low word fixed at `0x200` | Table `0x7AB10000, 0x7AB10001` instead of memory `0xBAD01280, 0xBAD012A5` | Correct | | `V_CNDMASK_B32`, plain or SDWA with scalar S0/S1 | Memory-selected lanes receive table words | Correct | For all five NULL variants, captured `code_loads` output is `Code`; their corresponding inline-zero controls are `Maybe`. Each pair's instruction bytes differ only in that operand's `125` versus `128` field. The HLSL NULL cases use `xcl_cload*`. In [`reads`](https://github.com/xcl-dev/xcl/blob/98a629a32933862efe2bb756c1ef4182dd433805/crates/xcl/src/gpu/recomp/code_loads.rs#L124), the constant alternative covers `128..=255`, while NULL 125 is omitted from register reads and from the SDWA scalar helper's constant case. **Tested** - RX 9070 16 GB, RADV GFX1201 / Mesa `26.3.1-arch3.5`, Ryzen 7 7700, CachyOS `7.3.0-5-cachyos`. Windows GNU release, Rust `1.97.1`, GE-Proton11-12 / Wine 11.0 Staging, vkd3d-proton `8293130ebe370b1+` (local asserts-disabled build), DXC/DXIL `1.9.2602.17`. - Separate source copies, append-only test module; original code/assertions preserved. Main uses its existing no-rodata translation APIs. Build each: `cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --no-run --message-format=json-render-diagnostics`. - Original head filters through Wine: `<unit.exe> constant_data_after_the_program gpu::recomp::code_loads::tests:: translated_identity_tracks_the_code_load_analysis --nocapture --test-threads=1`, then `--test-threads=4`: **7 passed, 0 failed** each. - Added filter `<unit.exe> workflow_rodata_select_matrix --nocapture --test-threads=1`, three fresh processes per source. Each process runs 20 programs through HLSL and direct DXIL, native wave32/64, two runtime scalar/VCC selections: **160 dispatches**. Main: **1 passed, 0 failed** each, matching its legacy memory-only behavior. Head: **0 passed, 1 failed** each, with the same **32 incorrect dispatches / 1,168 wrong load words** per process, confined to the five NULL cases. Inline/literal zero, SDWA code-source moves/adds, high-numbered VGPR sources, table-only, memory-only, branch-merged and second-block/outside-block controls agree with expectations. - **960 matrix dispatches**, including **480 native wave64**, plus 12 separate physical-width probes. Independently re-encoded every instruction from the public ISA tables and checked **2,024,736 load/sentinel/memory/width words**. All memory and sentinel checks pass; captures repeat byte-for-byte per source. **0 ignored, 0 skipped**. Inherited `XCL_*` cleared; network off, RX 9070 selected, GPU required, private enabled caches per process. These are kernel-ABI synthetic tests. **Not tested** Latest main `c2ee10e4e905eb736e56953c52b749e18bcc7ede`, advanced after the baseline was pinned, or an integration build on it; its translator/runner files are unchanged. Full suite, FSSM/guest pipeline integration, native Windows, other GPUs, retail workload, `scripts/smoke.ps1`, timing or FPS. **AI use** OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the diff, wrote the added fixture/captures, ran comparisons, independently verified encoded operands, load semantics, sentinels, memory, wave metadata and source/executable provenance, and drafted this report. Publication authorized by the account owner.
Celegans12 commented 2026-11-27 20:58:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Celegans12 on 2026-11-27T20:58:42Z.


I tested #2229 on plain main, in the world of the retail title from #505 (package 1.0.2.1), on an RTX 3080 Laptop GPU under Windows. Your description says main alone doesn't reach the world, so the world numbers there come from your local branch. On this machine main does reach it on warm shader caches, so here is the PR on main by itself. The frame changes from one flat dark grey to one flat near-white. There is no scene detail in either build.

Tested. I cherry-picked 98a629a onto main 06f90c19, giving local commit 95dbc8c0. The pick was clean, and git range-diff shows it is identical to the PR head. I compared its release build against plain main 06f90c19. Each build ran once on warm caches, through scripts/smoke.ps1 -Seconds 900 (network off), with these switches: XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_PREPARE=0 XCL_FRAME_DUMP=60 and XCL_PRESS_A_AT=15,25,…,185. Before these runs, each build had run its own shader preparation to the end once.

main 06f90c19 main + #2229 (95dbc8c0)
World picture (frame dumps after the opening cutscene) one flat colour, mean RGB ≈ (49, 51, 57), luma 51, std 0.7 one flat colour, mean RGB ≈ (239, 250, 255), luma 248, std 0.7
Scene detail none; only the UI prompt is drawn on top none; only the UI prompt is drawn on top
First dump showing the "Move around" prompt 839 s 302 s
Presents, 180–540 s ~1.2 per second ~1.9 per second
End of run full 900 s, exit 0, 2,744 frames steady presents end at ~590 s; at 824.7 s, 0xc0000005 at game_scarlett_master.exe+0x23cf683 (write to 0x0)
Device removals / peak commit 0 / 46.1 GB 0 / 41.5 GB

The picture numbers are the per-channel mean and the luma spread over each whole frame dump. In the #2229 run, every world frame from 1940 to 2660 is that same near-white colour.

So on plain main + #2229, the frame stays flat; it is just near-white now instead of dark grey. That fits your note that the world result needed the other work on your branch. I didn't look at the G-buffer or at the LUT texture itself. The slight cyan tint might be the 3-D LUT page sharing that #2753 is about. #2753 is not in this build, and I haven't tested it.

On this machine, +0x23cf683 is where the title has crashed before when its frames stop for a long time. I've seen it on older main builds during world loading. In this run the steady frames ended about 235 s before the crash. With one run per build, I can't tell whether that stop has anything to do with the PR.

Smoke blocks, test suite and setup

95dbc8c0 is the PR on a newer main, not the PR head, so these blocks are not a Regression run for the PR itself.

xcl-smoke v1
commit: 06f90c1986f43698d0405eff3c2ab0af230e1ed9
gpu: NVIDIA GeForce RTX 3080 Laptop GPU
title: 9cc6a39e
seconds: 900
exit: 0x0
frames shown: 2744 (PresentX 2744)
presents per 2 s (last 3): 2 3 3
device removals: 0
crashes: 0
peak commit: 46108 MB
xcl-smoke v1
commit: 95dbc8c036ab83f1b8aa099e0472bf937c552a4c
gpu: NVIDIA GeForce RTX 3080 Laptop GPU
title: 9cc6a39e
seconds: 900
exit: 0xc0000005
frames shown: none logged (the run did not reach its end)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 2
peak commit: 41549 MB
  • RTX 3080 Laptop 16 GB (driver 32.0.16.2114, 32-lane waves), i9-11900H, 32 GB, Windows 11 26300, Rust 1.100 MSVC, DXC 1.9.2609.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4 on 95dbc8c0: 1,465 passed, 0 failed, 47 ignored. 25 SKIPPED: 21 for no wave64, 3 per-lane forms refused (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32), and 1 for no heap windows.

Not tested: AMD and other NVIDIA GPUs or drivers; the HLSL path (only XCL_DIRECT_DXIL=1); more than one warm run per build; #2229 on its own base 8b957bec; together with #2753; the NULL-select case reported above. On cold driver caches, earlier runs of both builds stood still from ~105 s, before the world, so those runs say nothing about the picture.

AI use: Claude Code with Claude Opus 5.5 ran the builds and runs, measured the frames and drafted this. I reviewed it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7228017385 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7228017385). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-11-27T20:58:42Z. --- I tested #2229 on plain `main`, in the world of the retail title from #505 (package 1.0.2.1), on an RTX 3080 Laptop GPU under Windows. Your description says main alone doesn't reach the world, so the world numbers there come from your local branch. On this machine main does reach it on warm shader caches, so here is the PR on main by itself. The frame changes from one flat dark grey to one flat near-white. There is no scene detail in either build. **Tested.** I cherry-picked `98a629a` onto `main` `06f90c19`, giving local commit `95dbc8c0`. The pick was clean, and `git range-diff` shows it is identical to the PR head. I compared its release build against plain `main` `06f90c19`. Each build ran once on warm caches, through `scripts/smoke.ps1 -Seconds 900` (network off), with these switches: `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_PREPARE=0 XCL_FRAME_DUMP=60` and `XCL_PRESS_A_AT=15,25,…,185`. Before these runs, each build had run its own shader preparation to the end once. | | main `06f90c19` | main + #2229 (`95dbc8c0`) | |---|---|---| | World picture (frame dumps after the opening cutscene) | one flat colour, mean RGB ≈ (49, 51, 57), luma 51, std 0.7 | one flat colour, mean RGB ≈ (239, 250, 255), luma 248, std 0.7 | | Scene detail | none; only the UI prompt is drawn on top | none; only the UI prompt is drawn on top | | First dump showing the "Move around" prompt | 839 s | 302 s | | Presents, 180–540 s | ~1.2 per second | ~1.9 per second | | End of run | full 900 s, exit 0, 2,744 frames | steady presents end at ~590 s; at 824.7 s, `0xc0000005` at `game_scarlett_master.exe+0x23cf683` (write to `0x0`) | | Device removals / peak commit | 0 / 46.1 GB | 0 / 41.5 GB | The picture numbers are the per-channel mean and the luma spread over each whole frame dump. In the #2229 run, every world frame from 1940 to 2660 is that same near-white colour. So on plain main + #2229, the frame stays flat; it is just near-white now instead of dark grey. That fits your note that the world result needed the other work on your branch. I didn't look at the G-buffer or at the LUT texture itself. The slight cyan tint might be the 3-D LUT page sharing that #2753 is about. #2753 is not in this build, and I haven't tested it. On this machine, `+0x23cf683` is where the title has crashed before when its frames stop for a long time. I've seen it on older main builds during world loading. In this run the steady frames ended about 235 s before the crash. With one run per build, I can't tell whether that stop has anything to do with the PR. <details><summary>Smoke blocks, test suite and setup</summary> `95dbc8c0` is the PR on a newer main, not the PR head, so these blocks are not a Regression run for the PR itself. ``` xcl-smoke v1 commit: 06f90c1986f43698d0405eff3c2ab0af230e1ed9 gpu: NVIDIA GeForce RTX 3080 Laptop GPU title: 9cc6a39e seconds: 900 exit: 0x0 frames shown: 2744 (PresentX 2744) presents per 2 s (last 3): 2 3 3 device removals: 0 crashes: 0 peak commit: 46108 MB ``` ``` xcl-smoke v1 commit: 95dbc8c036ab83f1b8aa099e0472bf937c552a4c gpu: NVIDIA GeForce RTX 3080 Laptop GPU title: 9cc6a39e seconds: 900 exit: 0xc0000005 frames shown: none logged (the run did not reach its end) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 2 peak commit: 41549 MB ``` - RTX 3080 Laptop 16 GB (driver 32.0.16.2114, 32-lane waves), i9-11900H, 32 GB, Windows 11 26300, Rust 1.100 MSVC, DXC 1.9.2609. - `cargo build --workspace && cargo test --workspace -- --test-threads=4` on `95dbc8c0`: 1,465 passed, 0 failed, 47 ignored. 25 SKIPPED: 21 for no wave64, 3 per-lane forms refused (`V_MUL_F16`, `V_PK_MUL_F16`, `V_CVT_F16_F32`), and 1 for no heap windows. </details> **Not tested:** AMD and other NVIDIA GPUs or drivers; the HLSL path (only `XCL_DIRECT_DXIL=1`); more than one warm run per build; #2229 on its own base `8b957bec`; together with #2753; the NULL-select case reported above. On cold driver caches, earlier runs of both builds stood still from ~105 s, before the world, so those runs say nothing about the picture. AI use: Claude Code with Claude Opus 5.5 ran the builds and runs, measured the frames and drafted this. I reviewed it before posting.
grahamster2 commented 2026-11-27 23:24:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by grahamster2 on 2026-11-27T23:24:11Z.


Retail test on NVIDIA: #2229 gives the title a real picture instead of the flat grey one, but on this setup it also makes the title hang shortly after the world loads. Without #2229, the same build and environment keep running.

Setup

  • RTX 3080 10 GB, Ryzen 5 7600X, 31 GB RAM, Windows 11, Series S mode (XCL_DEVICE_TYPE=lockhart).
  • Base: main 6089122a plus default-off local diagnostics, with #3074/#3075 (XCL_PAGE_ALIAS) merged.
  • #2229 cherry-picked (98a629a3). There was one conflict in shaders.rs: I kept main's mem_windows: windows and added rodata: f.rodata(p).
  • Warm shader cache prepared for that exact build. Same scripted path into the world in every run.

Runs

run #2229 #2753 XCL_PAGE_ALIAS result
99 no no 1 world at ~11 fps for the full 720 s, no queue-wait timeouts, grey picture
101 yes yes 1 cutscene in colour (dark night with city lights, orange horizon glow); world reached at ~11 fps, then from 546 s queue.Wait ... did not complete within 5000 ms (216 of them), 0 presents from 634 s
102 yes no 1 the same stall, earlier: first timeout at 364 s, 45 of them
103 yes no off a different failure: everything stops at ~193 s on the way into the world (0 submits, 0 draws, 0 dispatches, no DirectStorage requests; audio decoding keeps going), and there are no queue-wait timeouts. Run 93 (same environment, no #2229, alias off) carries on into the world at that point.

First timeout in run 102:

D3D12.X: GPU queue.Wait at 0x70417fef0 >= 0xd25 did not complete within 5000 ms (waiter=q3/ty0, prod=qSome(4)/tySome(2), recorded=0xd26, submitted=0xd26, completed=0xd24) – released on CPU to prevent GPU hang

So the hang follows #2229 with alias on and with alias off, and #2753 isn't needed to reproduce it. That matches the report on #1833 that colour was only reached in runs that later crashed. My guess, which I haven't checked, is that one of the 676 programs that now get real constant data takes a much longer or never-ending path on the GPU (a loop bound or count read from the table). I'm happy to run a build with extra logging, or to bisect by shader hash if there's a switch to limit rodata to a subset.

<!-- greyfinch-sync:ivall/xcl:comment:7230112980 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7230112980). Originally posted by [grahamster2](https://github.com/grahamster2) on 2026-11-27T23:24:11Z. --- Retail test on NVIDIA: #2229 gives the title a real picture instead of the flat grey one, but on this setup it also makes the title hang shortly after the world loads. Without #2229, the same build and environment keep running. **Setup** - RTX 3080 10 GB, Ryzen 5 7600X, 31 GB RAM, Windows 11, Series S mode (`XCL_DEVICE_TYPE=lockhart`). - Base: main `6089122a` plus default-off local diagnostics, with #3074/#3075 (`XCL_PAGE_ALIAS`) merged. - #2229 cherry-picked (`98a629a3`). There was one conflict in `shaders.rs`: I kept main's `mem_windows: windows` and added `rodata: f.rodata(p)`. - Warm shader cache prepared for that exact build. Same scripted path into the world in every run. **Runs** | run | #2229 | #2753 | `XCL_PAGE_ALIAS` | result | |---|---|---|---|---| | 99 | no | no | 1 | world at ~11 fps for the full 720 s, no queue-wait timeouts, grey picture | | 101 | yes | yes | 1 | cutscene in colour (dark night with city lights, orange horizon glow); world reached at ~11 fps, then from 546 s `queue.Wait ... did not complete within 5000 ms` (216 of them), 0 presents from 634 s | | 102 | yes | no | 1 | the same stall, earlier: first timeout at 364 s, 45 of them | | 103 | yes | no | off | a different failure: everything stops at ~193 s on the way into the world (0 submits, 0 draws, 0 dispatches, no DirectStorage requests; audio decoding keeps going), and there are no queue-wait timeouts. Run 93 (same environment, no #2229, alias off) carries on into the world at that point. | First timeout in run 102: ``` D3D12.X: GPU queue.Wait at 0x70417fef0 >= 0xd25 did not complete within 5000 ms (waiter=q3/ty0, prod=qSome(4)/tySome(2), recorded=0xd26, submitted=0xd26, completed=0xd24) – released on CPU to prevent GPU hang ``` So the hang follows #2229 with alias on and with alias off, and #2753 isn't needed to reproduce it. That matches the report on #1833 that colour was only reached in runs that later crashed. My guess, which I haven't checked, is that one of the 676 programs that now get real constant data takes a much longer or never-ending path on the GPU (a loop bound or count read from the table). I'm happy to run a build with extra logging, or to bisect by shader hash if there's a switch to limit `rodata` to a subset.
grahamster2 commented 2026-11-27 23:33:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by grahamster2 on 2026-11-27T23:33:30Z.


Correction to my guess above: it's probably not a runaway shader. None of the three runs had a device removal or TDR. Windows would reset the GPU if a single dispatch ran past the ~2 s TDR limit, so the GPU isn't stuck inside one program.

What the log does show at the first timeout (run 102) is a cross-queue wait that never completes:

  • queue 3 waits for 0xd25, which queue 4 produces (prod=qSome(4));
  • queue 4 has completed only up to 0xd24, with 0xd26 submitted;
  • 0.27 s later, the next timeouts show the same pattern with producers on queues 1 and 0;
  • XCL's own queue waits are all met ("unmet ... none").

So it looks more like a chain of queue waits that never resolves. My guess is that #2229 changes what some programs compute, and with that what the title submits or waits on. In run 103 (alias off), the title stops submitting entirely at ~193 s, with no timeouts. That would fit the title's CPU side waiting on a result that doesn't arrive. I haven't verified any of this; it's what the logs point to.

<!-- greyfinch-sync:ivall/xcl:comment:7230232375 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7230232375). Originally posted by [grahamster2](https://github.com/grahamster2) on 2026-11-27T23:33:30Z. --- Correction to my guess above: it's probably not a runaway shader. None of the three runs had a device removal or TDR. Windows would reset the GPU if a single dispatch ran past the ~2 s TDR limit, so the GPU isn't stuck inside one program. What the log does show at the first timeout (run 102) is a cross-queue wait that never completes: - queue 3 waits for `0xd25`, which queue 4 produces (`prod=qSome(4)`); - queue 4 has completed only up to `0xd24`, with `0xd26` submitted; - 0.27 s later, the next timeouts show the same pattern with producers on queues 1 and 0; - XCL's own queue waits are all met ("unmet ... none"). So it looks more like a chain of queue waits that never resolves. My guess is that #2229 changes what some programs compute, and with that what the title submits or waits on. In run 103 (alias off), the title stops submitting entirely at ~193 s, with no timeouts. That would fit the title's CPU side waiting on a result that doesn't arrive. I haven't verified any of this; it's what the logs point to.
grahamster2 commented 2026-11-28 02:04:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by grahamster2 on 2026-11-28T02:04:16Z.


Bisect progress on the #2229 hang (NVIDIA, retail, XCL_PAGE_ALIAS=1).

I added a local switch that limits which of the 669 records with s_getpc_b64 and trailing data get their constant data (the rest get zeros, as on main). It's cache-safe: withheld records are stored under their own translation identity. Branch rodata-narrow on grahamster2/xcl, commit 03f4763f, as a diagnostic aid, not a proposal.

Results (720 s per run if clean):

  • Only the 10 postfx_aces LUT bakes get data: clean for 720 s, ~11 fps, no queue-wait timeouts.
  • One record plus those 10 is enough to hang: d8e643cfff09f362 InstanceCulling:CS_Grass_BatchCullReflect_c47eb2b0_Wrapped. The title stops submitting on the way into the world, the same failure as run 103 above. That took nine halving runs from the 659 non-ACES records.
  • It's not the only one: with every record given data except the 8 InstanceCulling:* ones, the title still freezes at ~376 s. I'm bisecting the other half now and will post the full list.

InstanceCulling is a work-generation pass: its output decides how much work later passes do, so a wrong value read from the table could plausibly give an indirect dispatch or draw count that never finishes. That's a guess I haven't checked against the record's code.

<!-- greyfinch-sync:ivall/xcl:comment:7232109581 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7232109581). Originally posted by [grahamster2](https://github.com/grahamster2) on 2026-11-28T02:04:16Z. --- Bisect progress on the #2229 hang (NVIDIA, retail, `XCL_PAGE_ALIAS=1`). I added a local switch that limits which of the 669 records with `s_getpc_b64` and trailing data get their constant data (the rest get zeros, as on main). It's cache-safe: withheld records are stored under their own translation identity. Branch `rodata-narrow` on grahamster2/xcl, commit 03f4763f, as a diagnostic aid, not a proposal. **Results (720 s per run if clean):** - **Only the 10 `postfx_aces` LUT bakes get data:** clean for 720 s, ~11 fps, no queue-wait timeouts. - **One record plus those 10 is enough to hang:** `d8e643cfff09f362 InstanceCulling:CS_Grass_BatchCullReflect_c47eb2b0_Wrapped`. The title stops submitting on the way into the world, the same failure as run 103 above. That took nine halving runs from the 659 non-ACES records. - **It's not the only one:** with every record given data except the 8 `InstanceCulling:*` ones, the title still freezes at ~376 s. I'm bisecting the other half now and will post the full list. `InstanceCulling` is a work-generation pass: its output decides how much work later passes do, so a wrong value read from the table could plausibly give an indirect dispatch or draw count that never finishes. That's a guess I haven't checked against the record's code.
grahamster2 commented 2026-11-28 17:25:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by grahamster2 on 2026-11-28T17:25:20Z.


What the culprit record's constant table controls (from the HLSL export of d8e643cfff09f362 InstanceCulling:CS_Grass_BatchCullReflect).

The table: 6 dwords at code offset 8916, [4, 1, 1, 1, 1, 0xBF810000], i.e. a view count followed by four "enabled" flags (then the s_endpgm word).

What the program does with it:

  • It walks a view loop s34 = 0..3 and exits at s34 == 4. The s_getpc_b64 pairs read 8924+4i / 8928+4i as "is view i+1 enabled" (s_load_dword, s_cmp_lg 0, skip).
  • For each enabled view, each lane does a buffer_atomic_add on a 20-byte-stride record, which looks like a DrawIndexed indirect-args InstanceCount, and stores its instance index into that view's list.

Consequences:

  • With zeros (main), only view 0 gets grass. With #2229 the data is correct, so grass is also emitted into views 1–3 (reflection / cascade views), up to 4× the grass draw work through indirect args.
  • No table read goes past the table, and no loop bound comes from the table: the inner loop bounds come from the constant buffer.

So the hang doesn't look like #2229 reading wrong data. It looks like #2229 making the title take paths it never took on main (grass drawn into the extra views via indirect draws), and something on that path not working in XCL on NVIDIA yet. The other culprit(s) beyond the 8 InstanceCulling records may follow the same pattern; I haven't analysed them.

I'm now testing VIctory-NVIDIA-style loop caps and table clamping as a control, though from the above I don't expect them to change this record's behaviour.

<!-- greyfinch-sync:ivall/xcl:comment:7243003415 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7243003415). Originally posted by [grahamster2](https://github.com/grahamster2) on 2026-11-28T17:25:20Z. --- What the culprit record's constant table controls (from the HLSL export of `d8e643cfff09f362 InstanceCulling:CS_Grass_BatchCullReflect`). **The table:** 6 dwords at code offset 8916, `[4, 1, 1, 1, 1, 0xBF810000]`, i.e. a view count followed by four "enabled" flags (then the `s_endpgm` word). **What the program does with it:** - It walks a view loop `s34 = 0..3` and exits at `s34 == 4`. The `s_getpc_b64` pairs read `8924+4i` / `8928+4i` as "is view i+1 enabled" (`s_load_dword`, `s_cmp_lg 0`, skip). - For each enabled view, each lane does a `buffer_atomic_add` on a 20-byte-stride record, which looks like a DrawIndexed indirect-args InstanceCount, and stores its instance index into that view's list. **Consequences:** - With zeros (main), only view 0 gets grass. With #2229 the data is correct, so grass is also emitted into views 1–3 (reflection / cascade views), up to 4× the grass draw work through indirect args. - No table read goes past the table, and no loop bound comes from the table: the inner loop bounds come from the constant buffer. So the hang doesn't look like #2229 reading wrong data. It looks like #2229 making the title take paths it never took on main (grass drawn into the extra views via indirect draws), and something on that path not working in XCL on NVIDIA yet. The other culprit(s) beyond the 8 InstanceCulling records may follow the same pattern; I haven't analysed them. I'm now testing VIctory-NVIDIA-style loop caps and table clamping as a control, though from the above I don't expect them to change this record's behaviour.
Royalflamejlh commented 2026-11-30 02:51:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-30T02:51:08Z.


@MacieGx this conflicts with main (1c5acde4) in 10 files (build.rs, gpu/dxil/{coverage,kernel,lower,lower_mem,lower_window}.rs, gpu/recomp/{emit,mod,pso,tests}.rs), which keeps it out of the merge queue (#3041). Could you rebase it onto main? main has an earlier copy of this change (41f1a85a). The Linux branch in #3067 carries this head over it: it is what took the world from flat grey there.

AI use: Claude Code (Claude Fable 5.2) made the trial merge and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7267372590 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7267372590). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-11-30T02:51:08Z. --- @MacieGx this conflicts with `main` (`1c5acde4`) in 10 files (`build.rs`, `gpu/dxil/{coverage,kernel,lower,lower_mem,lower_window}.rs`, `gpu/recomp/{emit,mod,pso,tests}.rs`), which keeps it out of the merge queue (#3041). Could you rebase it onto `main`? `main` has an earlier copy of this change (`41f1a85a`). The Linux branch in #3067 carries this head over it: it is what took the world from flat grey there. AI use: Claude Code (Claude Fable 5.2) made the trial merge and wrote this.
Foniass commented 2026-12-01 07:37:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:37:53Z.


Triage (#1607) – head 98a629a

An earlier form of this change is already on main: commit 41f1a85 (same title, cherry-picked from your branch and merged with the world-main merge fc4481d), with the branching xcl_gload and high dword 0 for one window. What this head adds on top is not on main: recomp/code_loads.rs (the dataflow that sorts loads into code / memory / maybe), the three load forms, and the CODE_ADDRESS_HI tag with one window (the NVIDIA-Linux crash and one-window mixed-load fixes). Main has since also gained f80cc57 (no xcl_rodata probes without s_getpc_b64) and 644b518.
The PR conflicts because of this; rebased onto main it should shrink to the delta over 41f1a85. #3368 and #3434 fix other rodata cases (sub-dword and straddling loads) and do not overlap.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304292109 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2229#issuecomment-7304292109). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:37:53Z. --- **Triage (#1607)** – head 98a629a An earlier form of this change is already on main: commit 41f1a85 (same title, cherry-picked from your branch and merged with the world-main merge fc4481d), with the branching `xcl_gload` and high dword 0 for one window. What this head adds on top is not on main: `recomp/code_loads.rs` (the dataflow that sorts loads into code / memory / maybe), the three load forms, and the `CODE_ADDRESS_HI` tag with one window (the NVIDIA-Linux crash and one-window mixed-load fixes). Main has since also gained f80cc57 (no `xcl_rodata` probes without `s_getpc_b64`) and 644b518. The PR conflicts because of this; rebased onto main it should shrink to the delta over 41f1a85. #3368 and #3434 fix other rodata cases (sub-dword and straddling loads) and do not overlap. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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/2229:upstream-pr/2229'
git switch 'upstream-pr/2229'

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