Shaders: load DXC from host paths shadowed by console mounts #833

Open
github-bot wants to merge 1 commit from github-bot/gh-833 into main AGit
Owner

@⁠JFyuhong on GitHub · 2026-11-24 06:26 UTC · original
JFyuhong:codex/dxc-host-path → main · +62 −4 · 4 files · 1 commits · open

A Windows SDK on D: passed launcher preflight, but the title process searched the game's mounted D: for DXC. On this machine the title presented black frames until the SDK DLLs were copied to another drive. Related to the shader-cache path fix in #331.

What is in it

  • Use the existing thread-local VFS guard during DXC discovery and when reading DLL metadata for the shader cache key.
  • The regression test shadows the SDK directory, compiles a shader, verifies title reads still see the mount, and reuses the cache in a fresh process without the mount.

Tested

  • Windows 11 build 26300, i7-14650HX, RTX 4060 Laptop 8 GB, driver 616.92, MSVC Rust 1.93.1, DXC 1.8.2502.11.
  • scripts/test.ps1 (debug workspace build and tests, four test threads): 714 reported passed, 0 failed, 41 ignored. Two GPU tests reported SKIPPED (no native wave64). The optional XCL_SAMPLE_* inputs were unset.
  • cargo test --release -p xcl --test e2e title_loads_host_dxc_under_a_console_mount -- --exact --nocapture: 0 passed / 1 failed on main with the new test (compiler DLL not found), 1 passed / 0 failed on this branch.
  • A separate retail run on this branch loaded both SDK DLLs directly from D:\Windows Kits\10\bin\10.0.26100.0\x64 and displayed the player selection screen. A longer run reached 1,517 PresentX calls and hit the previously reported loading crash at game_scarlett_master.exe+0x23cf683 after 229 s (#675).

Regression run

Release builds, read-only title mount, same working DXC directory on C: for both runs. Both used scripts/smoke.ps1 -Game W:\game_scarlett_master.exe -Seconds 60.

Main

xcl-smoke v1
commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2
gpu: NVIDIA GeForce RTX 4060 Laptop GPU
title: 419239bf
seconds: 60
exit: 0x0
frames shown: 515 (PresentX 515)
presents per 2 s (last 3): 25 25 24
device removals: 0
crashes: 0
peak commit: 15298 MB

PR

xcl-smoke v1
commit: 9e24a1fb61f5d2681e74aad76c4b5c788611bc5f
gpu: NVIDIA GeForce RTX 4060 Laptop GPU
title: 419239bf
seconds: 60
exit: 0x0
frames shown: 909 (PresentX 909)
presents per 2 s (last 3): 41 44 43
device removals: 0
crashes: 0
peak commit: 15247 MB

Not tested

  • AMD hardware and other DXC versions. The smoke runs cover startup through player selection.

AI use

  • Codex (GPT-6) diagnosed the SDK path collision, wrote the change and regression test, and ran the local tests and smoke checks.
**@⁠JFyuhong** on GitHub · 2026-11-24 06:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/833) `JFyuhong:codex/dxc-host-path` → `main` · +62 −4 · 4 files · 1 commits · open A Windows SDK on `D:` passed launcher preflight, but the title process searched the game's mounted `D:` for DXC. On this machine the title presented black frames until the SDK DLLs were copied to another drive. Related to the shader-cache path fix in #331. **What is in it** - Use the existing thread-local VFS guard during DXC discovery and when reading DLL metadata for the shader cache key. - The regression test shadows the SDK directory, compiles a shader, verifies title reads still see the mount, and reuses the cache in a fresh process without the mount. **Tested** - Windows 11 build 26300, i7-14650HX, RTX 4060 Laptop 8 GB, driver 616.92, MSVC Rust 1.93.1, DXC 1.8.2502.11. - `scripts/test.ps1` (debug workspace build and tests, four test threads): 714 reported passed, 0 failed, 41 ignored. Two GPU tests reported `SKIPPED` (no native wave64). The optional `XCL_SAMPLE_*` inputs were unset. - `cargo test --release -p xcl --test e2e title_loads_host_dxc_under_a_console_mount -- --exact --nocapture`: 0 passed / 1 failed on main with the new test (compiler DLL not found), 1 passed / 0 failed on this branch. - A separate retail run on this branch loaded both SDK DLLs directly from `D:\Windows Kits\10\bin\10.0.26100.0\x64` and displayed the player selection screen. A longer run reached 1,517 PresentX calls and hit the previously reported loading crash at `game_scarlett_master.exe+0x23cf683` after 229 s (#675). **Regression run** Release builds, read-only title mount, same working DXC directory on C: for both runs. Both used `scripts/smoke.ps1 -Game W:\game_scarlett_master.exe -Seconds 60`. Main ``` xcl-smoke v1 commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2 gpu: NVIDIA GeForce RTX 4060 Laptop GPU title: 419239bf seconds: 60 exit: 0x0 frames shown: 515 (PresentX 515) presents per 2 s (last 3): 25 25 24 device removals: 0 crashes: 0 peak commit: 15298 MB ``` PR ``` xcl-smoke v1 commit: 9e24a1fb61f5d2681e74aad76c4b5c788611bc5f gpu: NVIDIA GeForce RTX 4060 Laptop GPU title: 419239bf seconds: 60 exit: 0x0 frames shown: 909 (PresentX 909) presents per 2 s (last 3): 41 44 43 device removals: 0 crashes: 0 peak commit: 15247 MB ``` **Not tested** - AMD hardware and other DXC versions. The smoke runs cover startup through player selection. **AI use** - Codex (GPT-6) diagnosed the SDK path collision, wrote the change and regression test, and ran the local tests and smoke checks.
A title can mount D: over the Windows SDK. Preflight finds the compiler, but the game process then looks for its DLLs in the title files. Use the existing thread-local guard for DXC discovery and the DLL metadata used in the shader cache key.

Assisted-by: Codex (GPT-6)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:34:01 +00:00
Author
Owner

@⁠dcastell1 on GitHub · 2026-11-24 06:55 UTC · original

Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on main@beaa245:

patch -p1 < this PR            # clean, no fuzz
cargo test --workspace -- --test-threads=4
exit 0

All green: loading DXC from host paths shadowed by console mounts builds and runs, the workspace has no new failure against main on this box (737 passed there), and nothing else changes verdict. Restored the tree afterwards; no game data, hardware adapter, no Wine.

AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.

**@⁠dcastell1** on GitHub · 2026-11-24 06:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/833#issuecomment-7124422793) Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on `main@beaa245`: ``` patch -p1 < this PR # clean, no fuzz cargo test --workspace -- --test-threads=4 exit 0 ``` All green: loading DXC from host paths shadowed by console mounts builds and runs, the workspace has no new failure against `main` on this box (737 passed there), and nothing else changes verdict. Restored the tree afterwards; no game data, hardware adapter, no Wine. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 08:09 UTC · original

Linux / AMD RDNA3 datapoint.

Merged state: head 9e24a1f onto main 1ec4c98, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 705 passed, 11 failed, 41 ignored. Failures = the known Wine-lane set from my #42 rows plus #718 trio members and a hit of gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes (new flake, see #718 addendum). DXC host-path shadowing tests green.

Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile, --test-threads=4. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-24 08:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/833#issuecomment-7125796293) Linux / AMD RDNA3 datapoint. **Merged state:** head `9e24a1f` onto main `1ec4c98`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **705 passed, 11 failed, 41 ignored**. Failures = the known Wine-lane set from my #42 rows plus #718 trio members and a hit of `gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes` (new flake, see #718 addendum). DXC host-path shadowing tests green. **Not tested:** retail titles (none here), Windows, RDNA4. Counts only, no game data. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile, `--test-threads=4`. My Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Author
Owner

@⁠gavinnolan on GitHub · 2026-11-24 17:54 UTC · original

Hit this on my machine and this PR fixes it.

Setup: Windows 11 Home, NVIDIA GeForce RTX 2060 (driver 595.79), i7-10750H, 16 GB. XCL, DXC and the game are all on D: (XCL in D:\dev\xcl, DXC 1.9.2609 in D:\dev\tools\dxc\bin\x64, game in D:\GTA6.Xbox.v1.0.2.1), so the default D: console mount shadows them.

On main (9e3831e): with XCL_DXC_DIR=D:\dev\tools\dxc\bin\x64, and again with dxcompiler.dll + dxil.dll copied next to xcl.exe in D:\dev\xcl\target\release, XCL skipped both and fell back to the Windows SDK:

DXC: dxcompiler 1.6.2112.16 (e8295973), dxil 1.6 (file 101.6.2112.13), from C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64
DXC 1.6.2112.16 (e8295973) is older than 1.8: ...

With this PR merged onto main 9e3831e (clean merge), same XCL_DXC_DIR:

DXC: dxcompiler 1.9.2609.5 (01b62ad4), dxil 1.9.2609.5, from D:\dev\tools\dxc\bin\x64

No "older than 1.8" warning. 180 s run of the retail title (scripts/smoke.ps1, release build of the local merge): exit 0x0, 4376 frames, 0 device removals, 0 crashes, peak commit 15034 MB.

**@⁠gavinnolan** on GitHub · 2026-11-24 17:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/833#issuecomment-7139884300) Hit this on my machine and this PR fixes it. **Setup:** Windows 11 Home, NVIDIA GeForce RTX 2060 (driver 595.79), i7-10750H, 16 GB. XCL, DXC and the game are all on `D:` (XCL in `D:\dev\xcl`, DXC 1.9.2609 in `D:\dev\tools\dxc\bin\x64`, game in `D:\GTA6.Xbox.v1.0.2.1`), so the default `D:` console mount shadows them. **On `main` (`9e3831e`):** with `XCL_DXC_DIR=D:\dev\tools\dxc\bin\x64`, and again with `dxcompiler.dll` + `dxil.dll` copied next to `xcl.exe` in `D:\dev\xcl\target\release`, XCL skipped both and fell back to the Windows SDK: ``` DXC: dxcompiler 1.6.2112.16 (e8295973), dxil 1.6 (file 101.6.2112.13), from C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64 DXC 1.6.2112.16 (e8295973) is older than 1.8: ... ``` **With this PR merged onto `main` `9e3831e`** (clean merge), same `XCL_DXC_DIR`: ``` DXC: dxcompiler 1.9.2609.5 (01b62ad4), dxil 1.9.2609.5, from D:\dev\tools\dxc\bin\x64 ``` No "older than 1.8" warning. 180 s run of the retail title (`scripts/smoke.ps1`, release build of the local merge): exit 0x0, 4376 frames, 0 device removals, 0 crashes, peak commit 15034 MB.
Author
Owner

@⁠thaqiart139-alt on GitHub · 2026-11-24 22:48 UTC · original

Test report for this PR's head 9e24a1f, merged into main 689f2db (no conflicts), on AMD RDNA2 with native 64-lane waves and on a 32-lane NVIDIA card.

Tested

  • GPUs: AMD Radeon(TM) Graphics, the RDNA2 iGPU of a Ryzen 7 7800X3D (native wave64, driver 32.0.21045.29003), and NVIDIA GeForce RTX 5070 (driver 32.0.16.2101), chosen with XCL_ADAPTER.
  • System: 32 GB, Windows 11 Home build 26300, Rust 1.100.0, debug, DXC 1.9.2602.17.
  • cargo test --workspace --no-fail-fast -- --test-threads=4:
main 689f2db with this PR
RTX 5070 971 passed, 4 failed, 45 ignored 972 passed, 4 failed, 45 ignored
Radeon iGPU 974 passed, 1 failed, 45 ignored 975 passed, 1 failed, 45 ignored
  • This PR adds no failure. The failures are the same on main, from #1679's new fuzz tests, and both are already reported on #1679:
    • RTX 5070: fuzz_validate_and_gpu_0 to _3 (CreateComputePipelineState: 0x8007000E)
    • iGPU: fuzz_validate_and_gpu_1 (seed 540: res[833] = 0x7, CPU 0x6)
  • This PR's new tests pass on both GPUs: title_loads_host_dxc_under_a_console_mount.
  • This is an AMD run, and a second DXC version: 1.9.2602.17, where the description used 1.8.2502.11.
SKIPPED tests (the same on main and with this PR)
  • RTX 5070:
    • no wave64:
      • 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, and the wave64 cases of its f16 / f32 / f64 / integer_programs_on_the_gpu
      • gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware
    • the wave32 per-lane cases of lower_dxil's f16 arithmetic, f16 packed and f32 conversions: refused ("its #1426 semantics differ from the console's")
    • heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows)
    • pso_measurement_compiles_an_exact_synthetic_record (Windows Developer Mode is off)
  • Radeon iGPU:
    • no mesh shaders: gpu::dxil::geometry_tests::gpu_geometry_direct_records, emitted_ms_primitive_attribute_reaches_the_pixel_shader, emitted_ms_ps_draw_a_triangle, gpu_geometry_mode_es_gs_strip, gpu_geometry_mode_es_gs_strip_with_branches, gpu_mesh_mode_two_passes
    • the wave32 and wave64 per-lane cases of lower_dxil's f16 arithmetic, f16 packed and f32 conversions: refused, as above
    • heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows)
    • pso_measurement_compiles_an_exact_synthetic_record (Developer Mode is off)

Not tested

  • a title run, DXC on another drive; other GPUs; Linux / Wine.

AI use

  • Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report.
**@⁠thaqiart139-alt** on GitHub · 2026-11-24 22:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/833#issuecomment-7146676880) Test report for this PR's head `9e24a1f`, merged into `main` `689f2db` (no conflicts), on AMD RDNA2 with native 64-lane waves and on a 32-lane NVIDIA card. **Tested** - GPUs: AMD Radeon(TM) Graphics, the RDNA2 iGPU of a Ryzen 7 7800X3D (native wave64, driver 32.0.21045.29003), and NVIDIA GeForce RTX 5070 (driver 32.0.16.2101), chosen with `XCL_ADAPTER`. - System: 32 GB, Windows 11 Home build 26300, Rust 1.100.0, debug, DXC 1.9.2602.17. - `cargo test --workspace --no-fail-fast -- --test-threads=4`: | | `main` `689f2db` | with this PR | |---|---|---| | RTX 5070 | 971 passed, 4 failed, 45 ignored | 972 passed, 4 failed, 45 ignored | | Radeon iGPU | 974 passed, 1 failed, 45 ignored | 975 passed, 1 failed, 45 ignored | - This PR adds no failure. The failures are the same on `main`, from #1679's new fuzz tests, and both are already reported on #1679: - RTX 5070: `fuzz_validate_and_gpu_0` to `_3` (`CreateComputePipelineState`: `0x8007000E`) - iGPU: `fuzz_validate_and_gpu_1` (`seed 540: res[833] = 0x7, CPU 0x6`) - This PR's new tests pass on both GPUs: `title_loads_host_dxc_under_a_console_mount`. - This is an AMD run, and a second DXC version: 1.9.2602.17, where the description used 1.8.2502.11. <details><summary>SKIPPED tests (the same on <code>main</code> and with this PR)</summary> - **RTX 5070:** - no wave64: - `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`, and the wave64 cases of its `f16` / `f32` / `f64` / `integer_programs_on_the_gpu` - `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` - the wave32 per-lane cases of `lower_dxil`'s f16 arithmetic, f16 packed and f32 conversions: refused ("its #1426 semantics differ from the console's") - `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows) - `pso_measurement_compiles_an_exact_synthetic_record` (Windows Developer Mode is off) - **Radeon iGPU:** - no mesh shaders: `gpu::dxil::geometry_tests::gpu_geometry_direct_records`, `emitted_ms_primitive_attribute_reaches_the_pixel_shader`, `emitted_ms_ps_draw_a_triangle`, `gpu_geometry_mode_es_gs_strip`, `gpu_geometry_mode_es_gs_strip_with_branches`, `gpu_mesh_mode_two_passes` - the wave32 and wave64 per-lane cases of `lower_dxil`'s f16 arithmetic, f16 packed and f32 conversions: refused, as above - `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows) - `pso_measurement_compiles_an_exact_synthetic_record` (Developer Mode is off) </details> **Not tested** - a title run, DXC on another drive; other GPUs; Linux / Wine. **AI use** - Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 10:38 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 10:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/833#issuecomment-7159974320) 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 pull request has changes conflicting with the target branch.
  • README.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/833/head:github-bot/gh-833'
git switch 'github-bot/gh-833'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-833'
git switch 'github-bot/gh-833'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-833'
git switch 'github-bot/gh-833'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-833'
git switch 'main'
git merge --squash 'github-bot/gh-833'
git switch 'main'
git merge --ff-only 'github-bot/gh-833'
git switch 'main'
git merge 'github-bot/gh-833'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.