Shaders: DXC compiles skip dxil.dll's validator and XCL signs the DXIL #1608

Open
chippy01 wants to merge 1 commit from upstream-pr/1618 into main
chippy01 commented 2026-11-24 18:17:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by chippy01 on 2026-11-24T18:17:01Z.


Part of #1269.

Every DXC compile runs dxil.dll's validator, which signs the container: D3D12 refuses DXIL without a valid hash. Since #1426, XCL computes that hash itself (gpu::dxil::container::hash, the retail DXBC digest). A title's compiles and xcl shaders --precompile now run DXC with -Vd and sign the container in XCL: the same bytes as before, without the validator's run. On 253 programs of the retail title's pack the validator was 6.4 % of DXC's time and refused none of them.

(The first revision of this PR used the runtime's BYPASS hash instead; it was reworked onto #1426's digest once that was merged, so it no longer depends on the runtime and the caches see the same DXIL as before.)

What is in it

  • crates/xcl/src/gpu/recomp/dxc.rs: compile_without_validator() turns it on for the process (XCL_DXC_VALIDATE=1 keeps the validator); compile_here adds -Vd and sign writes the digest into the container DXC left unsigned. Tests: unsigned_containers_get_the_hash_the_validator_writes (four DXC-signed containers of tests/data/dxil get their own hash back after it is zeroed) and unvalidated_compiles_give_the_validators_container (a CS and a PS through DXC both ways: the same bytes).
  • crates/xcl/src/host.rs: the title host turns it on. crates/xcl/src/shaders.rs: xcl shaders --precompile turns it on. The unit tests do not: the validator stays their oracle.
  • README.md: one line.

Tested

  • NVIDIA GeForce RTX 3070 Ti 8 GB (driver 621.24), AMD Ryzen 9 7900X, 32 GB RAM, Windows 11 Pro 26200, rustc 1.100.0 stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (Windows SDK 10.0.26100.0); tests in debug, runs in release.

  • cargo build --workspace + cargo test --workspace --no-fail-fast -- --test-threads=4 on main 06c9f55 with this change: 1267 passed, 0 failed, 46 ignored. SKIPPED: 21 GPU cases for want of wave64 on this card (among them gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, dispatch_chain_native_wave64_builds_whole and the lower / lower_dxil wave64 comparisons), 3 lower_dxil f16 / f32 per-lane cases the per-lane form refuses, and heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).

  • Seen while testing, in code this PR does not touch:

    • 06c9f55, the first suite run: the lib test binary stopped on a device removal (0x887a0006, device hung) while the hle::d3d12x::list_x cross-queue Wait64BitValueX tests ran (the log ends with cross_queue_cycle_and_same_queue_fifo_do_not_deadlock's >= 0x702 waits). The lib tests never turn this PR's path on (only the title host and --precompile do); the lib binary alone, and then the whole suite above, passed.
    • f087b99 (the previous base): two tests failed with and without this change; #2245 has fixed both on main.
    • c160d86: concurrent_cache_misses_compile_once failed once on its timing check (cached-only waited 1.09 s, limit 200 ms) and passed in the next run.
  • With the sign call removed, unvalidated_compiles_give_the_validators_container fails; with the digest taken over the wrong bytes, both new tests fail.

  • DXC time with and without the validator, on 253 programs of the retail title's shaders.rpf (every 100th by name: xcl shaders --recomp with XCL_DUMP_HLSL, XCL_RECOMP_WINDOWS=4), with XCL's arguments (-HV 2021, -O1 over 1 MB of HLSL) and the SDK's dxc.exe, one compile at a time, the order alternating per program:

    HLSL programs validated -Vd saved
    < 64 KB 55 6.9 s 6.8 s 1.7 %
    64 KB – 256 KB 129 49.2 s 46.9 s 4.7 %
    256 KB – 1 MB 46 64.7 s 61.4 s 5.1 %
    1 – 8 MB (-O1) 23 212.5 s 196.7 s 7.4 %
    all 253 333.2 s 311.8 s 6.4 %

    All 253 compile both ways and the validator refused none. For all 253, container::hash of the -Vd container equals the hash dxil.dll wrote, and the rest of the container is identical.

  • The same 253 in one process on 23 threads, one IDxcCompiler3 per thread as in XCL's pool: 38.8 s and 37.5 s validated, 35.8 s and 37.3 s with -Vd (alternating; the largest programs set the wall time); peak commit 3.7 – 3.8 GB either way.

  • Retail title, 60 s runs of scripts/smoke.ps1 on the working tree before the commit, on c160d86: from an empty XCL_DXIL_CACHE, the log has DXC: compiles skip dxil.dll's validator and are signed by XCL, 12 compiles, 0 failures, 0 failed pipelines, 1393 frames; all 12 containers carry the correct hash and are byte for byte the ones main's validator made for the same programs in its own run from an empty cache. On 06c9f55, with the shared warm cache: 1593 and 1643 frames (main 06c9f55: 1555 and 1625). No device removal or crash in these runs. The title stays in its menus in 60 s, so they show the output is unchanged, not a speed-up.

  • One run of an earlier head (8b9fec0, on c160d86) ended at 34.6 s with an access violation in title_textures::refresh → subresources → the detiler, reading title memory that was no longer mapped (the class of #1393). This PR does not touch that path; the next run of the same build was clean, and no run of this change or of main on this machine has crashed since.

Regression run

main (06c9f55), the second of two runs (the first showed 1555 frames):

xcl-smoke v1
commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324
gpu: NVIDIA GeForce RTX 3070 Ti
title: a08c0918
seconds: 60
exit: 0x0
frames shown: 1625 (PresentX 1625)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15554 MB

this PR's head:

xcl-smoke v1
commit: 80fb8a442e00048de994e30f7f67a253dded0a25      
gpu: NVIDIA GeForce RTX 3070 Ti
title: a08c0918
seconds: 60
exit: 0x0
frames shown: 1576 (PresentX 1576)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17456 MB

Not tested

  • AMD and Intel GPUs, Windows 10, Wine / vkd3d-proton (the DXIL is the same as before on any of them).
  • A world load: the gain is in the compiles the caches do not have, ~6 % of DXC's time; the driver's compile, which dominates for the biggest programs, is untouched.
  • DXIL the validator would refuse now reaches the driver unchecked (as the direct path's does since #1426). None of the 253 programs was refused; XCL_DXC_VALIDATE=1 brings the validator back for a title.

AI use

  • Claude Code with Claude Opus 5.5: Measured the validator's share, co-authored the change, created its tests and this description, and made the test and title runs reported here. I reviewed the diff and the numbers.
<!-- greyfinch-sync:ivall/xcl:issue:5477833972 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1618). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-24T18:17:01Z. --- Part of #1269. Every DXC compile runs `dxil.dll`'s validator, which signs the container: D3D12 refuses DXIL without a valid hash. Since #1426, XCL computes that hash itself (`gpu::dxil::container::hash`, the retail DXBC digest). A title's compiles and `xcl shaders --precompile` now run DXC with `-Vd` and sign the container in XCL: the same bytes as before, without the validator's run. On 253 programs of the retail title's pack the validator was 6.4 % of DXC's time and refused none of them. (The first revision of this PR used the runtime's BYPASS hash instead; it was reworked onto #1426's digest once that was merged, so it no longer depends on the runtime and the caches see the same DXIL as before.) **What is in it** - `crates/xcl/src/gpu/recomp/dxc.rs`: `compile_without_validator()` turns it on for the process (`XCL_DXC_VALIDATE=1` keeps the validator); `compile_here` adds `-Vd` and `sign` writes the digest into the container DXC left unsigned. Tests: `unsigned_containers_get_the_hash_the_validator_writes` (four DXC-signed containers of `tests/data/dxil` get their own hash back after it is zeroed) and `unvalidated_compiles_give_the_validators_container` (a CS and a PS through DXC both ways: the same bytes). - `crates/xcl/src/host.rs`: the title host turns it on. `crates/xcl/src/shaders.rs`: `xcl shaders --precompile` turns it on. The unit tests do not: the validator stays their oracle. - `README.md`: one line. **Tested** - NVIDIA GeForce RTX 3070 Ti 8 GB (driver 621.24), AMD Ryzen 9 7900X, 32 GB RAM, Windows 11 Pro 26200, rustc 1.100.0 `stable-x86_64-pc-windows-msvc`, DXC 1.8.2502.11 (Windows SDK 10.0.26100.0); tests in debug, runs in release. - `cargo build --workspace` + `cargo test --workspace --no-fail-fast -- --test-threads=4` on `main` `06c9f55` with this change: 1267 passed, 0 failed, 46 ignored. SKIPPED: 21 GPU cases for want of wave64 on this card (among them `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `dispatch_chain_native_wave64_builds_whole` and the `lower` / `lower_dxil` wave64 comparisons), 3 `lower_dxil` f16 / f32 per-lane cases the per-lane form refuses, and `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - Seen while testing, in code this PR does not touch: - `06c9f55`, the first suite run: the lib test binary stopped on a device removal (`0x887a0006`, device hung) while the `hle::d3d12x::list_x` cross-queue `Wait64BitValueX` tests ran (the log ends with `cross_queue_cycle_and_same_queue_fifo_do_not_deadlock`'s `>= 0x702` waits). The lib tests never turn this PR's path on (only the title host and `--precompile` do); the lib binary alone, and then the whole suite above, passed. - `f087b99` (the previous base): two tests failed with and without this change; #2245 has fixed both on `main`. - `c160d86`: `concurrent_cache_misses_compile_once` failed once on its timing check (`cached-only waited 1.09 s`, limit 200 ms) and passed in the next run. - With the `sign` call removed, `unvalidated_compiles_give_the_validators_container` fails; with the digest taken over the wrong bytes, both new tests fail. - DXC time with and without the validator, on 253 programs of the retail title's `shaders.rpf` (every 100th by name: `xcl shaders --recomp` with `XCL_DUMP_HLSL`, `XCL_RECOMP_WINDOWS=4`), with XCL's arguments (`-HV 2021`, `-O1` over 1 MB of HLSL) and the SDK's `dxc.exe`, one compile at a time, the order alternating per program: | HLSL | programs | validated | `-Vd` | saved | |---|---|---|---|---| | < 64 KB | 55 | 6.9 s | 6.8 s | 1.7 % | | 64 KB – 256 KB | 129 | 49.2 s | 46.9 s | 4.7 % | | 256 KB – 1 MB | 46 | 64.7 s | 61.4 s | 5.1 % | | 1 – 8 MB (`-O1`) | 23 | 212.5 s | 196.7 s | 7.4 % | | all | 253 | 333.2 s | 311.8 s | 6.4 % | All 253 compile both ways and the validator refused none. For all 253, `container::hash` of the `-Vd` container equals the hash `dxil.dll` wrote, and the rest of the container is identical. - The same 253 in one process on 23 threads, one `IDxcCompiler3` per thread as in XCL's pool: 38.8 s and 37.5 s validated, 35.8 s and 37.3 s with `-Vd` (alternating; the largest programs set the wall time); peak commit 3.7 – 3.8 GB either way. - Retail title, 60 s runs of `scripts/smoke.ps1` on the working tree before the commit, on `c160d86`: from an empty `XCL_DXIL_CACHE`, the log has `DXC: compiles skip dxil.dll's validator and are signed by XCL`, 12 compiles, 0 failures, 0 failed pipelines, 1393 frames; all 12 containers carry the correct hash and are byte for byte the ones `main`'s validator made for the same programs in its own run from an empty cache. On `06c9f55`, with the shared warm cache: 1593 and 1643 frames (`main` `06c9f55`: 1555 and 1625). No device removal or crash in these runs. The title stays in its menus in 60 s, so they show the output is unchanged, not a speed-up. - One run of an earlier head (`8b9fec0`, on `c160d86`) ended at 34.6 s with an access violation in `title_textures::refresh` → `subresources` → the detiler, reading title memory that was no longer mapped (the class of #1393). This PR does not touch that path; the next run of the same build was clean, and no run of this change or of `main` on this machine has crashed since. **Regression run** `main` (`06c9f55`), the second of two runs (the first showed 1555 frames): ``` xcl-smoke v1 commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324 gpu: NVIDIA GeForce RTX 3070 Ti title: a08c0918 seconds: 60 exit: 0x0 frames shown: 1625 (PresentX 1625) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15554 MB ``` this PR's head: ``` xcl-smoke v1 commit: 80fb8a442e00048de994e30f7f67a253dded0a25 gpu: NVIDIA GeForce RTX 3070 Ti title: a08c0918 seconds: 60 exit: 0x0 frames shown: 1576 (PresentX 1576) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17456 MB ``` **Not tested** - AMD and Intel GPUs, Windows 10, Wine / vkd3d-proton (the DXIL is the same as before on any of them). - A world load: the gain is in the compiles the caches do not have, ~6 % of DXC's time; the driver's compile, which dominates for the biggest programs, is untouched. - DXIL the validator would refuse now reaches the driver unchecked (as the direct path's does since #1426). None of the 253 programs was refused; `XCL_DXC_VALIDATE=1` brings the validator back for a title. **AI use** - Claude Code with Claude Opus 5.5: Measured the validator's share, co-authored the change, created its tests and this description, and made the test and title runs reported here. I reviewed the diff and the numbers.
upstream-sync changed title from [PR #1618] Shaders: skip DXC's validator where the runtime takes the BYPASS hash to [PR #1618] Shaders: DXC compiles skip dxil.dll's validator and XCL signs the DXIL 2026-11-24 21:07:08 +00:00
MatyEjsr commented 2026-11-24 21:09:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MatyEjsr on 2026-11-24T20:12:38Z.


Updated independent Windows / NVIDIA GPU verification on the rebased head b6f4f75b8f17c66cbbd02787ff55612fbda6a46c (superseding earlier run on 8b9fec0; base 1d027e5, verified clean merge with current main 568e7db) using DXC 1.9.2602.17.

Tested

  • Hardware & OS: Windows 11 Pro for Workstations 10.0.26200 (Build 26200; Developer Mode enabled), AMD Ryzen 7 7800X3D (8-core), NVIDIA GeForce RTX 3090 24 GB (driver 617.42, wave32), 31.4 GB RAM
  • Toolchain: rustc 1.100.0 (stable-x86_64-pc-windows-msvc), debug and release builds, Windows SDK DXC dxcompiler 1.9.2602.17 (21d28f72) + dxil 1.9.2602.17
  • git merge-tree --write-tree main HEAD (against main 568e7db): exit 0 (no conflicts, including alongside b937c33 in dxc.rs)
  • cargo build --workspace -j 8: ok (14.78s, 0 errors, 0 warnings in PR files)
  • cargo build --release --workspace -j 8: ok (35.64s, 0 errors, 0 warnings in PR files)
  • cargo test --workspace -j 8 -- --test-threads=4: 961 passed, 0 failed, 43 ignored, 22 SKIPPED
    • 18 no wave64 skips (gpu::recomp::lower::tests::{a_2d_or_3d_group_agrees_with_the_hlsl_path_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, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu}, gpu::recomp::lower_dxil::tests::{a_per_lane_2d_or_3d_group_runs_on_the_gpu, f16_programs_on_the_gpu [2 wave64 cases], f32_programs_on_the_gpu [6 wave64 cases], f64_programs_on_the_gpu, integer_programs_on_the_gpu [2 wave64 cases]}, gpu::recomp::tests::{gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware})
    • 3 per-lane form refusals (gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu wave32 f16 arithmetic / f16 packed, f32_programs_on_the_gpu wave32 f32 conversions)
    • 1 no heap windows skip (heap_window_out_of_memory_falls_back_to_the_switch_form)
  • cargo test -p xcl --lib -- "gpu::recomp::dxc::" --nocapture: 16 passed, 0 failed, 0 ignored, 0 SKIPPED (0.44s with dxil.dll; 0.45s with a dxcompiler.dll-only directory without dxil.dll). Both unsigned_containers_get_the_hash_the_validator_writes and unvalidated_compiles_give_the_validators_container pass on DXC 1.9.2602.17.
  • cargo test --test e2e -j 8 -- --nocapture: 3 passed, 0 failed, 0 ignored, 0 SKIPPED across all four configurations:
    • default (-Vd + XCL signing, 1.92s): logs DXC: compiles skip dxil.dll's validator and are signed by XCL (XCL_DXC_VALIDATE=1 validates them)
    • XCL_DXC_VALIDATE=1 (1.90s): opt-out works; validator stays enabled
    • XCL_DIRECT_DXIL=1 (1.92s): passes with XCL signing enabled for DXC compiles
    • dxcompiler.dll-only directory without dxil.dll (1.93s): logs no dxil.dll and signs in XCL; D3D12 accepts the resulting shaders
  • Release cold xcl shaders <pack> --precompile --limit 256 (alternating 2x2 runs with XCL_TRANSLATED_CACHE=0, XCL_PSO_DISK_CACHE=0, XCL_PSO_PRELOAD=0, and a fresh XCL_DXIL_CACHE per run; 7 compile threads, 4 memory windows, split wave64):
    • Default (-Vd + XCL signing): 285 compiled, 115 already cached, 0 errors, 6 GS skipped — wall time 6.61 s and 6.70 s (6.6 s reported)
    • XCL_DXC_VALIDATE=1 (dxil.dll 1.9.2602.17): 285 compiled, 115 already cached, 0 errors, 6 GS skipped — wall time 6.90 s and 6.97 s (6.8 s and 6.9 s reported)
    • SHA-256 comparison across all 285 compiled .dxil outputs on DXC 1.9.2602.17: 285/285 byte-for-byte identical (0 mismatches, 0 missing on either side), with a consistent ~4% wall-clock speedup on this 7-thread slice.

Code review

  • Rebase onto 1d027e5 resolved the earlier merge conflict cleanly and merges cleanly with current main (568e7db).
  • Minimal, well-scoped diff (dxc.rs, host.rs, shaders.rs, README.md): WITHOUT_VALIDATOR stays off in tests and diagnostic CLI sweeps (--compile, --measure-pso), enables only in host_main and xcl shaders --precompile, honors XCL_DXC_VALIDATE=1, leaves toolchain_identity() intact for disk cache compatibility, and sign() only populates zeroed DXBC hashes.

Not tested

  • AMD / Intel GPUs, native hardware wave64, heap-window OOM fallback (XCL_HEAP_WINDOWS=1), retail title scripts/smoke.ps1 / world-load runs, Wine / vkd3d-proton, and XCL_SAMPLE_* tests.

AI use

  • agy with gemini-4-neon-high (audited by gemini-4-neon-medium): reviewed the rebased diff, ran the debug and release builds, workspace/targeted tests, and cold --precompile byte-identity and timing checks, and wrote/audited this report.
<!-- greyfinch-sync:ivall/xcl:comment:7143194969 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1618#issuecomment-7143194969). Originally posted by [MatyEjsr](https://github.com/MatyEjsr) on 2026-11-24T20:12:38Z. --- Updated independent Windows / NVIDIA GPU verification on the rebased head `b6f4f75b8f17c66cbbd02787ff55612fbda6a46c` (superseding earlier run on `8b9fec0`; base `1d027e5`, verified clean merge with current `main` `568e7db`) using DXC 1.9.2602.17. **Tested** - Hardware & OS: Windows 11 Pro for Workstations 10.0.26200 (Build 26200; Developer Mode enabled), AMD Ryzen 7 7800X3D (8-core), NVIDIA GeForce RTX 3090 24 GB (driver 617.42, wave32), 31.4 GB RAM - Toolchain: rustc 1.100.0 (`stable-x86_64-pc-windows-msvc`), debug and release builds, Windows SDK DXC `dxcompiler 1.9.2602.17 (21d28f72)` + `dxil 1.9.2602.17` - `git merge-tree --write-tree main HEAD` (against `main` `568e7db`): exit 0 (no conflicts, including alongside `b937c33` in `dxc.rs`) - `cargo build --workspace -j 8`: ok (14.78s, 0 errors, 0 warnings in PR files) - `cargo build --release --workspace -j 8`: ok (35.64s, 0 errors, 0 warnings in PR files) - `cargo test --workspace -j 8 -- --test-threads=4`: **961 passed, 0 failed, 43 ignored, 22 SKIPPED** - 18 `no wave64` skips (`gpu::recomp::lower::tests::{a_2d_or_3d_group_agrees_with_the_hlsl_path_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, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu}`, `gpu::recomp::lower_dxil::tests::{a_per_lane_2d_or_3d_group_runs_on_the_gpu, f16_programs_on_the_gpu [2 wave64 cases], f32_programs_on_the_gpu [6 wave64 cases], f64_programs_on_the_gpu, integer_programs_on_the_gpu [2 wave64 cases]}`, `gpu::recomp::tests::{gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware}`) - 3 per-lane form refusals (`gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` wave32 f16 arithmetic / f16 packed, `f32_programs_on_the_gpu` wave32 f32 conversions) - 1 `no heap windows` skip (`heap_window_out_of_memory_falls_back_to_the_switch_form`) - `cargo test -p xcl --lib -- "gpu::recomp::dxc::" --nocapture`: **16 passed, 0 failed, 0 ignored, 0 SKIPPED** (0.44s with `dxil.dll`; 0.45s with a `dxcompiler.dll`-only directory without `dxil.dll`). Both `unsigned_containers_get_the_hash_the_validator_writes` and `unvalidated_compiles_give_the_validators_container` pass on DXC 1.9.2602.17. - `cargo test --test e2e -j 8 -- --nocapture`: **3 passed, 0 failed, 0 ignored, 0 SKIPPED** across all four configurations: - default (`-Vd` + XCL signing, 1.92s): logs `DXC: compiles skip dxil.dll's validator and are signed by XCL (XCL_DXC_VALIDATE=1 validates them)` - `XCL_DXC_VALIDATE=1` (1.90s): opt-out works; validator stays enabled - `XCL_DIRECT_DXIL=1` (1.92s): passes with XCL signing enabled for DXC compiles - `dxcompiler.dll`-only directory without `dxil.dll` (1.93s): logs `no dxil.dll` and signs in XCL; D3D12 accepts the resulting shaders - Release cold `xcl shaders <pack> --precompile --limit 256` (alternating 2x2 runs with `XCL_TRANSLATED_CACHE=0`, `XCL_PSO_DISK_CACHE=0`, `XCL_PSO_PRELOAD=0`, and a fresh `XCL_DXIL_CACHE` per run; 7 compile threads, 4 memory windows, split wave64): - Default (`-Vd` + XCL signing): **285 compiled, 115 already cached, 0 errors, 6 GS skipped** — wall time **6.61 s** and **6.70 s** (`6.6 s` reported) - `XCL_DXC_VALIDATE=1` (`dxil.dll` 1.9.2602.17): **285 compiled, 115 already cached, 0 errors, 6 GS skipped** — wall time **6.90 s** and **6.97 s** (`6.8 s` and `6.9 s` reported) - SHA-256 comparison across all 285 compiled `.dxil` outputs on DXC 1.9.2602.17: **285/285 byte-for-byte identical** (`0` mismatches, `0` missing on either side), with a consistent ~4% wall-clock speedup on this 7-thread slice. **Code review** - Rebase onto `1d027e5` resolved the earlier merge conflict cleanly and merges cleanly with current `main` (`568e7db`). - Minimal, well-scoped diff (`dxc.rs`, `host.rs`, `shaders.rs`, `README.md`): `WITHOUT_VALIDATOR` stays off in tests and diagnostic CLI sweeps (`--compile`, `--measure-pso`), enables only in `host_main` and `xcl shaders --precompile`, honors `XCL_DXC_VALIDATE=1`, leaves `toolchain_identity()` intact for disk cache compatibility, and `sign()` only populates zeroed `DXBC` hashes. **Not tested** - AMD / Intel GPUs, native hardware wave64, heap-window OOM fallback (`XCL_HEAP_WINDOWS=1`), retail title `scripts/smoke.ps1` / world-load runs, Wine / vkd3d-proton, and `XCL_SAMPLE_*` tests. **AI use** - agy with gemini-4-neon-high (audited by gemini-4-neon-medium): reviewed the rebased diff, ran the debug and release builds, workspace/targeted tests, and cold `--precompile` byte-identity and timing checks, and wrote/audited this report.
DavidM1911 commented 2026-11-24 21:09:36 +00:00 (Migrated from github.com)

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


Verification on RTX 3060 Ti (Windows 11): merge conflict with current main in crates/xcl/src/gpu/recomp/pso.rs — needs a rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7143839845 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1618#issuecomment-7143839845). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T20:37:44Z. --- Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** in `crates/xcl/src/gpu/recomp/pso.rs` — needs a rebase before it can be tested.
chippy01 commented 2026-11-24 21:09:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by chippy01 on 2026-11-24T20:57:14Z.


@DavidM1911 yep doing it as soon as i have time.

<!-- greyfinch-sync:ivall/xcl:comment:7144278189 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1618#issuecomment-7144278189). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-24T20:57:14Z. --- @DavidM1911 yep doing it as soon as i have time.
chippy01 commented 2026-11-25 10:10:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by chippy01 on 2026-11-25T09:42:09Z.


@DavidM1911 No more merge conflict if you want to test

<!-- greyfinch-sync:ivall/xcl:comment:7158686105 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1618#issuecomment-7158686105). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-25T09:42:09Z. --- @DavidM1911 No more merge conflict if you want to test
raylitebull commented 2026-11-25 11:09:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T10:49:19Z.


Diff audit on b6f4f75 (dxc.rs, host.rs, shaders.rs, README.md) looks clean, Build and test + PR description are green, and RTX 3070 Ti + RTX 3090 verification is thorough (285/285 byte-for-byte DXIL parity with DXC -Vd + XCL container::hash).

Only item needed before merge is an AMD (and/or Intel) verification pass on b6f4f75.

<!-- greyfinch-sync:ivall/xcl:comment:7160217831 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1618#issuecomment-7160217831). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T10:49:19Z. --- Diff audit on `b6f4f75` (`dxc.rs`, `host.rs`, `shaders.rs`, `README.md`) looks clean, `Build and test` + `PR description` are green, and RTX 3070 Ti + RTX 3090 verification is thorough (285/285 byte-for-byte DXIL parity with DXC `-Vd` + XCL `container::hash`). Only item needed before merge is an AMD (and/or Intel) verification pass on `b6f4f75`.
chippy01 commented 2026-11-25 15:08:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by chippy01 on 2026-11-25T15:00:28Z.


Thanks for the audit. I have no AMD or Intel card, so those stay under Not tested. The driver gets the same bytes it gets on main: XCL's digest matched dxil.dll's signature on 253/253 programs here (DXC 1.8) and 285/285 in MatyEjsr's run (DXC 1.9). A run on AMD or Intel from anyone is welcome.

Since your audit the PR was rebased twice, onto main 06c9f55 now (head 80fb8a4). Its added and removed lines are the same as in b6f4f75; only the code around them on main changed.

<!-- greyfinch-sync:ivall/xcl:comment:7166155767 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1618#issuecomment-7166155767). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-25T15:00:28Z. --- Thanks for the audit. I have no AMD or Intel card, so those stay under **Not tested**. The driver gets the same bytes it gets on `main`: XCL's digest matched `dxil.dll`'s signature on 253/253 programs here (DXC 1.8) and 285/285 in MatyEjsr's run (DXC 1.9). A run on AMD or Intel from anyone is welcome. Since your audit the PR was rebased twice, onto `main` `06c9f55` now (head `80fb8a4`). Its added and removed lines are the same as in `b6f4f75`; only the code around them on `main` changed.
chippy01 commented 2026-11-25 15:08:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by chippy01 on 2026-11-25T15:00:34Z.


@DavidM1911 Rebased again, onto main 06c9f55 (head 80fb8a4): no conflict, if you still want to test it.

<!-- greyfinch-sync:ivall/xcl:comment:7166158619 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1618#issuecomment-7166158619). Originally posted by [chippy01](https://github.com/chippy01) on 2026-11-25T15:00:34Z. --- @DavidM1911 Rebased again, onto `main` `06c9f55` (head `80fb8a4`): no conflict, if you still want to test it.
DavidM1911 commented 2026-11-26 01:05:39 +00:00 (Migrated from github.com)

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


Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7178804972 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1618#issuecomment-7178804972). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T00:29:05Z. --- Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.
rgroenewoudt commented 2026-11-26 19:21:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by rgroenewoudt on 2026-11-26T19:21:23Z.


AMD Windows test of head 80fb8a4 (on its base main 06c9f55, not rebased; the PR conflicts with current main).

Tested

  • AMD Radeon RX 9070 (RDNA4), driver 32.0.32029.2010; AMD Ryzen 9 5950X, 32 GB RAM; Windows 11 Pro build 26300; rustc 1.100.0 stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); debug build.
  • cargo build --workspace + cargo test --workspace --no-fail-fast -- --test-threads=4: 1265 passed, 2 failed, 46 ignored.
    • Both new tests pass: unsigned_containers_get_the_hash_the_validator_writes, unvalidated_compiles_give_the_validators_container (DXC -Vd + XCL's digest gives the same container as dxil.dll, CS and PS, on this DXC).
    • The 2 failures are the AMD fuzz failures of #2115, not this PR: fuzz_validate_and_gpu_1 (seed 722: res[30] = 0x1, CPU 0x7fffffff) and fuzz_validate_and_gpu_3 (seed 1599: res[193] = 0x1, CPU 0x0). The base 06c9f55 without the PR fails the same two seeds the same way (cargo test -p xcl --lib fuzz_validate_and_gpu: 2 passed, 2 failed).
    • SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).

Not tested

  • A title run or scripts/smoke.ps1 with this PR, and the DXC time saved: not measured here.
  • After a rebase onto current main: compile_here is now compile_whole + compile_linked there, so the linked path (IDxcLinker) needs -Vd and sign too; not checked.

AI use

  • Claude Code (Claude Opus 5.5): ran the build and tests, wrote this report; checked by me before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7201494471 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1618#issuecomment-7201494471). Originally posted by [rgroenewoudt](https://github.com/rgroenewoudt) on 2026-11-26T19:21:23Z. --- **AMD Windows test of head `80fb8a4`** (on its base `main` `06c9f55`, not rebased; the PR conflicts with current `main`). **Tested** - AMD Radeon RX 9070 (RDNA4), driver 32.0.32029.2010; AMD Ryzen 9 5950X, 32 GB RAM; Windows 11 Pro build 26300; rustc 1.100.0 `stable-x86_64-pc-windows-msvc`; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); debug build. - `cargo build --workspace` + `cargo test --workspace --no-fail-fast -- --test-threads=4`: **1265 passed, 2 failed, 46 ignored**. - Both new tests pass: `unsigned_containers_get_the_hash_the_validator_writes`, `unvalidated_compiles_give_the_validators_container` (DXC `-Vd` + XCL's digest gives the same container as `dxil.dll`, CS and PS, on this DXC). - The 2 failures are the AMD fuzz failures of #2115, not this PR: `fuzz_validate_and_gpu_1` (`seed 722: res[30] = 0x1, CPU 0x7fffffff`) and `fuzz_validate_and_gpu_3` (`seed 1599: res[193] = 0x1, CPU 0x0`). The base `06c9f55` without the PR fails the same two seeds the same way (`cargo test -p xcl --lib fuzz_validate_and_gpu`: 2 passed, 2 failed). - SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). **Not tested** - A title run or `scripts/smoke.ps1` with this PR, and the DXC time saved: not measured here. - After a rebase onto current `main`: `compile_here` is now `compile_whole` + `compile_linked` there, so the linked path (`IDxcLinker`) needs `-Vd` and `sign` too; not checked. **AI use** - Claude Code (Claude Opus 5.5): ran the build and tests, wrote this report; checked by me before posting.
Foniass commented 2026-12-01 06:18:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:18:06Z.


Triage (#1607) – head 80fb8a4

No open or merged PR skips the DXC validator (-Vd) and signs the container with gpu::dxil::container::hash. #2202 is about the coverage gate's validator sweep and does not change this path.
The diff looks correct: sign only fills a zero hash on a DXBC container, and the test compares it with the validator's output.
One cost to weigh: with the validator off, a translator bug that makes invalid DXIL is no longer refused with a message at compile time. It reaches the driver signed, as a PSO failure or a device removal. XCL_DXC_VALIDATE=1 is the only way back.
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:7302716346 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1618#issuecomment-7302716346). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:18:06Z. --- **Triage (#1607)** – head 80fb8a4 No open or merged PR skips the DXC validator (`-Vd`) and signs the container with `gpu::dxil::container::hash`. #2202 is about the coverage gate's validator sweep and does not change this path. The diff looks correct: `sign` only fills a zero hash on a `DXBC` container, and the test compares it with the validator's output. One cost to weigh: with the validator off, a translator bug that makes invalid DXIL is no longer refused with a message at compile time. It reaches the driver signed, as a PSO failure or a device removal. `XCL_DXC_VALIDATE=1` is the only way back. 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/1618:upstream-pr/1618'
git switch 'upstream-pr/1618'

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