Recompiler: direct DXIL cache entries change when its sources do #1947

Manually merged
github merged 1 commit from gh-pr/1947/head into gh-pr/1947/base 2026-11-26 05:10:58 +00:00
Owner

@⁠pvfreis on GitHub · 2026-11-24 23:47 UTC · original
pvfreis:dxil-cache-hash → main · +54 −4 · 3 files · 1 commits · merged 2026-11-25 01:05 UTC

The on-disk translated cache is keyed by the HLSL path's sources (XCL_TRANSLATOR_SOURCE_ID), but of gpu/dxil only by TRANSLATOR_VERSION, which is bumped by hand. Unless something merged with it changes the HLSL path's sources, a gpu/dxil change that doesn't bump the number, or bumps it to one already used, leaves the old translator's containers in use under XCL_DIRECT_DXIL.

main has such a case now: #1900 (20cf130) puts the MSAA textureLoad before getDimensions, because AMD's driver compiler crashes on the other order, and doesn't bump it. For a program with an MSAA image load, a direct cache written at 689f2db still gives the old order at 20cf130 (see Tested).

This does for the direct path what bfb8133d (#1745) did for the per-lane sources, by listing the directory. MatyEjsr noted the gap on #1714 and IgorAntunes66 on #1741.

Related to #1269: it asks for shaders compiled directly into DXIL, and a direct-translator change tested over an existing cache can run and measure the old containers. If goal:world-load fits, please set it.

What is in it

  • build.rs: hashes every .rs file of gpu/dxil but the test files (*tests.rs) into XCL_DIRECT_DXIL_SOURCE_ID. Tests inside the other files are hashed with them. A new file (#1793 adds one) is not left out.
  • recomp/pso.rs: that hash is part of the direct entries' identity only (and the per-lane entries', which extend it). HLSL-path entries keep theirs. A unit test.
  • dxil/kernel.rs: the comment of TRANSLATOR_VERSION. The constant stays, for changes in pso.rs.

Cost

  • Merging this re-keys existing direct entries once.
  • Any gpu/dxil edit, even a comment, makes the next run with XCL_DIRECT_DXIL translate again (programs that fall back to HLSL still hit the DXC cache).
  • With #1809 the direct version is part of every default user's compute identity, so any gpu/dxil edit would re-key those entries too. imnicho raised that on #1809 for the hand bumps, and it now tags compute entries only. This PR makes it happen on every edit rather than on every bump.

Tested

  • RTX 3060 12 GB (driver 617.14), Ryzen 9 5900XT, 32 GB, Windows 11 (26300), Rust 1.100.0, debug
  • cargo test --workspace --locked --no-fail-fast -- --test-threads=4 at 1831ec4a: 977 passed, 0 failed, 45 ignored (22 SKIPPED lines: 18 no wave64, 3 wave32 per-lane forms refused, 1 no heap windows)
  • direct_dxil_identity_tracks_its_sources fails with the source left out of direct_version and passes with it (cargo test -p xcl --lib shader_cache_tests: 13 passed, 1 failed / 14 passed; this diff on 689f2db)
  • #1900's case, with a scratch test (not in the PR): the real direct translator on an MSAA IMAGE_LOAD program, through translated::cached with XCL_DIRECT_DXIL=1, builds run one after the other over one cache directory:
    • main: written at 689f2db; at 20cf130 the 689f2db container is served (getDimensions before textureLoad), while a fresh translation there has textureLoad first
    • with this diff: written at 689f2db + this diff; at 1831ec4a it is translated again (textureLoad first), and a rerun is a hit
  • build script output (this diff on 689f2db): editing dxil/module/opt.rs or adding a file changes only XCL_DIRECT_DXIL_SOURCE_ID; editing dxil/ops_tests.rs changes none

Regression run

main:

xcl-smoke v1
commit: 20cf13022f764208384c610c2ae6a3f4eed201a2
gpu: NVIDIA GeForce RTX 3060
title: b6ca0868
seconds: 60
exit: 0x0
frames shown: 1513 (PresentX 1513)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 20615 MB

PR:

xcl-smoke v1
commit: 1831ec4a5abb1c3ae0ca4ab3803776f7fafe30cb
gpu: NVIDIA GeForce RTX 3060
title: b6ca0868
seconds: 60
exit: 0x0
frames shown: 1530 (PresentX 1531)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 20446 MB

(the second of two pairs, run main, PR, main, PR; the first: main 1477 frames, peak 21803 MB; PR 1478 frames, 22433 MB; no removal or crash in either. Release builds.)

Not tested

  • the smoke runs take the HLSL path (default settings), so they don't reach the direct entries
  • a stale container in a title; AMD, so neither the driver crash #1900 fixes nor its return from a cached container
  • that identity() passes the hash on is covered only by the scratch test, not by the unit test
  • direct_compute / direct_graphics in pso.rs stay outside the hash, as before: bump TRANSLATOR_VERSION for those (#1913 changes direct_graphics without one; it also edits hashed sources, which changes the identity anyway)
  • the build together with any of the PRs below

Overlaps (open PRs, merged in a scratch tree with this PR and with main 62265d3, 2026-11-24 23:45Z):

AI use

  • Claude Code (Claude Opus 5.5) wrote the fix and the test, ran the tests and wrote this text; a second Claude Opus 5.5 agent reviewed the diff. A Claude Fable 5.2 agent checked this text against the logs. I have read the diff and the text.

🤖 Generated with Claude Code

**@⁠pvfreis** on GitHub · 2026-11-24 23:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/1947) `pvfreis:dxil-cache-hash` → `main` · +54 −4 · 3 files · 1 commits · merged 2026-11-25 01:05 UTC The on-disk translated cache is keyed by the HLSL path's sources (`XCL_TRANSLATOR_SOURCE_ID`), but of `gpu/dxil` only by `TRANSLATOR_VERSION`, which is bumped by hand. Unless something merged with it changes the HLSL path's sources, a `gpu/dxil` change that doesn't bump the number, or bumps it to one already used, leaves the old translator's containers in use under `XCL_DIRECT_DXIL`. `main` has such a case now: #1900 (20cf130) puts the MSAA `textureLoad` before `getDimensions`, because AMD's driver compiler crashes on the other order, and doesn't bump it. For a program with an MSAA image load, a direct cache written at 689f2db still gives the old order at 20cf130 (see **Tested**). This does for the direct path what bfb8133d (#1745) did for the per-lane sources, by listing the directory. MatyEjsr noted the gap [on #1714](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1714) and IgorAntunes66 [on #1741](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1741). Related to #1269: it asks for shaders compiled directly into DXIL, and a direct-translator change tested over an existing cache can run and measure the old containers. If `goal:world-load` fits, please set it. **What is in it** - `build.rs`: hashes every `.rs` file of `gpu/dxil` but the test files (`*tests.rs`) into `XCL_DIRECT_DXIL_SOURCE_ID`. Tests inside the other files are hashed with them. A new file (#1793 adds one) is not left out. - `recomp/pso.rs`: that hash is part of the direct entries' identity only (and the per-lane entries', which extend it). HLSL-path entries keep theirs. A unit test. - `dxil/kernel.rs`: the comment of `TRANSLATOR_VERSION`. The constant stays, for changes in `pso.rs`. **Cost** - Merging this re-keys existing direct entries once. - Any `gpu/dxil` edit, even a comment, makes the next run with `XCL_DIRECT_DXIL` translate again (programs that fall back to HLSL still hit the DXC cache). - With #1809 the direct version is part of every default user's compute identity, so any `gpu/dxil` edit would re-key those entries too. imnicho raised that on #1809 for the hand bumps, and it now tags compute entries only. This PR makes it happen on every edit rather than on every bump. **Tested** - RTX 3060 12 GB (driver 617.14), Ryzen 9 5900XT, 32 GB, Windows 11 (26300), Rust 1.100.0, debug - `cargo test --workspace --locked --no-fail-fast -- --test-threads=4` at `1831ec4a`: 977 passed, 0 failed, 45 ignored (22 SKIPPED lines: 18 no wave64, 3 wave32 per-lane forms refused, 1 no heap windows) - `direct_dxil_identity_tracks_its_sources` fails with the source left out of `direct_version` and passes with it (`cargo test -p xcl --lib shader_cache_tests`: 13 passed, 1 failed / 14 passed; this diff on 689f2db) - #1900's case, with a scratch test (not in the PR): the real direct translator on an MSAA `IMAGE_LOAD` program, through `translated::cached` with `XCL_DIRECT_DXIL=1`, builds run one after the other over one cache directory: - `main`: written at 689f2db; at 20cf130 the 689f2db container is served (`getDimensions` before `textureLoad`), while a fresh translation there has `textureLoad` first - with this diff: written at 689f2db + this diff; at `1831ec4a` it is translated again (`textureLoad` first), and a rerun is a hit - build script output (this diff on 689f2db): editing `dxil/module/opt.rs` or adding a file changes only `XCL_DIRECT_DXIL_SOURCE_ID`; editing `dxil/ops_tests.rs` changes none **Regression run** main: ``` xcl-smoke v1 commit: 20cf13022f764208384c610c2ae6a3f4eed201a2 gpu: NVIDIA GeForce RTX 3060 title: b6ca0868 seconds: 60 exit: 0x0 frames shown: 1513 (PresentX 1513) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 20615 MB ``` PR: ``` xcl-smoke v1 commit: 1831ec4a5abb1c3ae0ca4ab3803776f7fafe30cb gpu: NVIDIA GeForce RTX 3060 title: b6ca0868 seconds: 60 exit: 0x0 frames shown: 1530 (PresentX 1531) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 20446 MB ``` (the second of two pairs, run main, PR, main, PR; the first: main 1477 frames, peak 21803 MB; PR 1478 frames, 22433 MB; no removal or crash in either. Release builds.) **Not tested** - the smoke runs take the HLSL path (default settings), so they don't reach the direct entries - a stale container in a title; AMD, so neither the driver crash #1900 fixes nor its return from a cached container - that `identity()` passes the hash on is covered only by the scratch test, not by the unit test - `direct_compute` / `direct_graphics` in `pso.rs` stay outside the hash, as before: bump `TRANSLATOR_VERSION` for those (#1913 changes `direct_graphics` without one; it also edits hashed sources, which changes the identity anyway) - the build together with any of the PRs below Overlaps (open PRs, merged in a scratch tree with this PR and with `main` 62265d3, 2026-11-24 23:45Z): - `TRANSLATOR_VERSION`: #1707 and #1739 bump 6 to 7, which `main` already has; #1720, #1742, #1793, #1800, #1801, #1818, #1834, #1906, #1908, #1919, #1923, #1938, #1939 and #1940 all bump 7 to 8 (#1720 and #1919 also change `emit.rs`, which is hashed). All sixteen merge cleanly with this PR; for their `gpu/dxil` changes the bump becomes optional. #1544, #1546, #1699, #1737 and #1850 bump it too and conflict with `main` already. - no bump: for example #1870, #1874 and #1898 change the emitted containers only in `gpu/dxil`. - `pso.rs`: #1809 conflicts (its direct entries need `direct_version(..)` too). #1472 calls `identity_with` in its tests and merges cleanly. - `build.rs`: #1082, #1316, #1413, #1448, #1548 and #1692 merge cleanly; #1630 conflicts with `main` already. - #1895 reports a different gap (`XCL_DXIL_NO_OPT`). **AI use** - Claude Code (Claude Opus 5.5) wrote the fix and the test, ran the tests and wrote this text; a second Claude Opus 5.5 agent reviewed the diff. A Claude Fable 5.2 agent checked this text against the logs. I have read the diff and the text. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The translated cache's identity covers the HLSL path's sources
(XCL_TRANSLATOR_SOURCE_ID), but of gpu/dxil only TRANSLATOR_VERSION,
which is bumped by hand. Two changes that bump it to the same number,
or one that does not bump it (#1900), leave containers of the old
translator in use.

build.rs hashes every .rs file of gpu/dxil but the *tests.rs ones into
XCL_DIRECT_DXIL_SOURCE_ID, which only the direct entries' identity
includes (and the per-lane entries', which extend it). The HLSL path's
entries keep theirs, as with bfb8133d for the per-lane sources. The
directory is listed rather than named file by file, so that a new file
is not left out. TRANSLATOR_VERSION stays, for changes of pso.rs's
direct_compute / direct_graphics; edits of gpu/dxil no longer need it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:10:56 +00:00
github manually merged commit 1831ec4a5a into gh-pr/1947/base 2026-11-26 05:10:58 +00:00
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 00:26 UTC · original

RTX 3070 (Ampere, driver 616.56, Windows 11, debug) at 1831ec4: cargo test -p xcl --lib -- --skip gpu_ gives 817 passed, 0 failed, and the gpu_ tests with XCL_DIRECT_DXIL=1 give 110 passed, the same as main.

A live example of the "bumps it to one already used" case: three open PRs each bump TRANSLATOR_VERSION from 7 to 8 right now (#1946, #1950, #1952). Whichever two merge later would each need to renumber by hand. With this PR in, none of them needs a bump, since all three only change gpu/dxil files.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-25 00:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/1947#issuecomment-7148504940) RTX 3070 (Ampere, driver 616.56, Windows 11, debug) at `1831ec4`: `cargo test -p xcl --lib -- --skip gpu_` gives 817 passed, 0 failed, and the `gpu_` tests with `XCL_DIRECT_DXIL=1` give 110 passed, the same as `main`. A live example of the "bumps it to one already used" case: three open PRs each bump `TRANSLATOR_VERSION` from 7 to 8 right now (#1946, #1950, #1952). Whichever two merge later would each need to renumber by hand. With this PR in, none of them needs a bump, since all three only change `gpu/dxil` files. AI-assisted (Claude Code).
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-25 00:22 UTC · original · edited 2026-11-25 00:40 UTC

Full-suite run, since this PR has no test report yet. Tested exact head 1831ec4 (on its base 20cf130).

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::dxil::fuzz_tests: 967 passed, 0 failed, 43 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, 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: direct_dxil_identity_tracks_its_sources.
  • 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: 976 passed, 0 failed, 45 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 80f4819 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 and const_and_null_mask_operands_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.
**@⁠futurepro62** on GitHub · 2026-11-25 00:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/1947#issuecomment-7148448905) · edited 2026-11-25 00:40 UTC Full-suite run, since this PR has no test report yet. Tested exact head `1831ec4` (on its base `20cf130`). **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::dxil::fuzz_tests`: **967 passed, 0 failed, 43 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`, `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: `direct_dxil_identity_tracks_its_sources`. - 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`: **976 passed, 0 failed, 45 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 `80f4819` 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 and `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://git.gtahub.st/github/xcl-dev--xcl/issues/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.
Author
Owner

@⁠anes66 on GitHub · 2026-11-25 00:49 UTC · original

CPU-only build-script validation on exact head 1831ec4a5abb1c3ae0ca4ab3803776f7fafe30cb passed. Optional regression companion d8dc190, directly on that head, adds one integration test; no runtime/build-script changes remain in the patch.

Tested

  • Windows 10 Pro 19045, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug. No translator, DXC or GPU execution, no retail files.
  • The test copies Rust sources into a scratch tree, compiles this PR's actual build.rs against that tree, and checks all three emitted identity strings across 17 script invocations. It does not reimplement the hash.
  • Editing dxil/cfg.rs or dxil/module/opt.rs changes only the direct identity; editing recomp/lower.rs changes only per-lane; editing recomp/emit.rs changes only the common source identity. Restoring the bytes restores all identities.
  • New top-level/nested runtime files are included. Reversing their creation order preserves the identity; renaming a source changes it; deleting both probe files restores the baseline. Editing standalone ops_tests.rs or adding a non-Rust file changes none of the three.
  • Negative control: omitting recursive directory traversal from the real script makes the new test fail on the nested runtime source. The control was restored before the final passing run and commit.
  • cargo test --locked -p xcl --test direct_source_identity -- --nocapture --test-threads=1: 1 passed / 0 failed / 0 ignored, no skips.
  • cargo test --locked -p xcl --lib gpu::recomp::pso::shader_cache_tests:: -- --nocapture --test-threads=1: 14 passed / 0 failed / 0 ignored, no skips.

Not tested
Cargo's filesystem-change scheduling (the test invokes the compiled script itself), full workspace/GPU suite, release, retail cache reuse, or integration onto newer main. Compiling the script requires rustc and the normal MSVC build environment. No competing upstream PR.

AI use
Codex (GPT-6; exact variant unavailable) wrote the regression and temporary control, ran CPU validation and prepared this report.

**@⁠anes66** on GitHub · 2026-11-25 00:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/1947#issuecomment-7148924697) CPU-only build-script validation on exact head `1831ec4a5abb1c3ae0ca4ab3803776f7fafe30cb` passed. Optional regression companion [d8dc190](https://github.com/anes66/xcl/commit/d8dc19014cad6ab25e82d383182eda412a9cdff3), directly on that head, adds one integration test; no runtime/build-script changes remain in the patch. **Tested** - Windows 10 Pro 19045, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug. No translator, DXC or GPU execution, no retail files. - The test copies Rust sources into a scratch tree, compiles this PR's actual `build.rs` against that tree, and checks all three emitted identity strings across 17 script invocations. It does not reimplement the hash. - Editing `dxil/cfg.rs` or `dxil/module/opt.rs` changes only the direct identity; editing `recomp/lower.rs` changes only per-lane; editing `recomp/emit.rs` changes only the common source identity. Restoring the bytes restores all identities. - New top-level/nested runtime files are included. Reversing their creation order preserves the identity; renaming a source changes it; deleting both probe files restores the baseline. Editing standalone `ops_tests.rs` or adding a non-Rust file changes none of the three. - Negative control: omitting recursive directory traversal from the real script makes the new test fail on the nested runtime source. The control was restored before the final passing run and commit. - `cargo test --locked -p xcl --test direct_source_identity -- --nocapture --test-threads=1`: **1 passed / 0 failed / 0 ignored**, no skips. - `cargo test --locked -p xcl --lib gpu::recomp::pso::shader_cache_tests:: -- --nocapture --test-threads=1`: **14 passed / 0 failed / 0 ignored**, no skips. **Not tested** Cargo's filesystem-change scheduling (the test invokes the compiled script itself), full workspace/GPU suite, release, retail cache reuse, or integration onto newer main. Compiling the script requires `rustc` and the normal MSVC build environment. No competing upstream PR. **AI use** Codex (GPT-6; exact variant unavailable) wrote the regression and temporary control, ran CPU validation and prepared this report.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 01:03 UTC · original

Tested

Clean PR head 1831ec4a5abb1c3ae0ca4ab3803776f7fafe30cb on an AMD Ryzen 7 3800X, Windows 11 Enterprise Evaluation 26200.9974, Rust 1.100.0 x86_64-pc-windows-msvc (debug). The host has an Intel Arc A770 (driver 32.0.101.9175). These checks were CPU-only. Cargo target, temporary files and the DXIL cache used private directories on L: with CARGO_INCREMENTAL=0.

cargo test --locked -p xcl --lib -j 2 -- --nocapture --test-threads=2 translated_identity_tracks_sources_and_dxc translated_namespace_tracks_every_request_input translations_on_disk_need_the_same_bytes_and_identity translated_v2_ignores_valid_entries_outside_its_namespace direct_dxil_identity_never_collides_with_hlsl direct_dxil_identity_tracks_its_sources direct_and_hlsl_disk_entries_are_separate

7 passed, 0 failed, 0 ignored, 0 skipped (946 filtered out). This exercised source and backend identities, cache hits and misses across namespaces and rejection of truncated entries.

I also ran cargo run --offline -j 2 -vv --bin xcl in five states of a scratch Cargo package that used the PR's unchanged build.rs and copied source inputs. All five runs exited 0 and matched their assertions. An unchanged rerun reused the build output. Editing src/gpu/dxil/module/opt.rs reran the build script and changed only the direct identity (8f217b15dfe94ce9 to 80f5ea9901858109). Restoring the bytes reran the script and restored the original value. Editing src/gpu/dxil/ops_tests.rs reran the script and preserved all three identities.

Not tested

Full workspace suite, release build, DXC or shader execution on the GPU, retail-title cache reuse or smoke runs.

AI use

Codex (gpt-6.2-sol) ran the tests, wrote the scratch probe and prepared this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 01:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/1947#issuecomment-7149159502) **Tested** Clean PR head `1831ec4a5abb1c3ae0ca4ab3803776f7fafe30cb` on an AMD Ryzen 7 3800X, Windows 11 Enterprise Evaluation 26200.9974, Rust 1.100.0 `x86_64-pc-windows-msvc` (debug). The host has an Intel Arc A770 (driver 32.0.101.9175). These checks were CPU-only. Cargo target, temporary files and the DXIL cache used private directories on `L:` with `CARGO_INCREMENTAL=0`. ```powershell cargo test --locked -p xcl --lib -j 2 -- --nocapture --test-threads=2 translated_identity_tracks_sources_and_dxc translated_namespace_tracks_every_request_input translations_on_disk_need_the_same_bytes_and_identity translated_v2_ignores_valid_entries_outside_its_namespace direct_dxil_identity_never_collides_with_hlsl direct_dxil_identity_tracks_its_sources direct_and_hlsl_disk_entries_are_separate ``` **7 passed, 0 failed, 0 ignored, 0 skipped** (946 filtered out). This exercised source and backend identities, cache hits and misses across namespaces and rejection of truncated entries. I also ran `cargo run --offline -j 2 -vv --bin xcl` in five states of a scratch Cargo package that used the PR's unchanged `build.rs` and copied source inputs. All five runs exited 0 and matched their assertions. An unchanged rerun reused the build output. Editing `src/gpu/dxil/module/opt.rs` reran the build script and changed only the direct identity (`8f217b15dfe94ce9` to `80f5ea9901858109`). Restoring the bytes reran the script and restored the original value. Editing `src/gpu/dxil/ops_tests.rs` reran the script and preserved all three identities. **Not tested** Full workspace suite, release build, DXC or shader execution on the GPU, retail-title cache reuse or smoke runs. **AI use** Codex (`gpt-6.2-sol`) ran the tests, wrote the scratch probe and prepared this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 02:50 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 02:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/1947#issuecomment-7151256973) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This discussion has been locked. Commenting is limited to contributors.
No description provided.