VFS: exempt xcl.exe and host tool dirs from console drive mounts #2101

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

@⁠O5-7 on GitHub · 2026-11-25 04:11 UTC · original
O5-7:vfs/exempt-host-tool-dirs → main · +113 −9 · 2 files · 1 commits · open

When XCL_DXC_DIR, XCL_D3D12_DIR, XCL_OPUS_DIR, or xcl.exe's own directory sits on a drive letter mapped to a console mount (such as D: -> {game}), vfs_hooks rewrites file-attribute probes inside the host process to the game folder. As a result, launcher preflight reports DXC as available, while every host shader compile fails with dxcompiler.dll not found.

This registers xcl.exe's directory and the configured tool DLL directories as Vfs::own_folder in host_main, and ignores bare drive roots in Vfs::own_folder so a misconfigured path cannot disable a whole console drive mount.

What is in it

  • Vfs::own_folder: ignore bare drive roots such as D:\ (crates/xcl/src/vfs.rs)
  • host::build_vfs & unit tests: exempt xcl.exe's parent folder and XCL_DXC_DIR, XCL_D3D12_DIR, XCL_OPUS_DIR from console drive mounts (crates/xcl/src/host.rs)

Tested

  • Hardware / OS / Rust: NVIDIA GeForce RTX 5080 (driver 32.0.15.9579), AMD Ryzen 7 9700X, Windows 11 10.0.26100, Rust 1.100.0 MSVC, debug (cargo test) + release (smoke.ps1)
  • cargo test --workspace -- --test-threads=4 (with XCL_DXC_DIR=D:\Windows Kits\10\bin\10.0.26100.0\x64): 1156 passed, 0 failed, 46 ignored (24 SKIPPED GPU sub-checks on RTX 5080 wave32: 20 no wave64, 3 DIFFERS_ON_1426 f16/V_CVT_F16_F32 per-lane refusals, 1 no heap windows)
  • Retail title (9cc6a39e, 60 s, XCL_DXC_DIR=D:\Windows Kits\10\bin\10.0.26100.0\x64): on main, launcher preflight found DXC on D:\ while the host process failed 228/228 DXC compiles (translated_pipelines: 0, 0 translated draws); with this fix (46460b88), the host process loads DXC 1.8.2502.11 from D:\Windows Kits\10\bin\10.0.26100.0\x64 with translated_pipelines: 228, 0 compilation failures, and 32,768 translated draws (0 skipped)

Regression run

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1680 (PresentX 1680)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 13673 MB
xcl-smoke v1
commit: 7cb20ff53cd274d41f0ff9814ae1a1c8b14bcc19
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1681 (PresentX 1681)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13671 MB

Not tested

  • AMD or Intel GPUs, native wave64 GPUs, Linux / Wine
  • Live DLL loading via XCL_D3D12_DIR or XCL_OPUS_DIR on a console-mounted drive (covered by unit tests only)
  • Retail world loading past the first-run menus

AI use

  • Antigravity (Gemini 4 Neon): diagnosed the VFS/DXC host-process failure, wrote the fix and synthetic unit tests, ran the test suite and smoke runs, and drafted this PR description.
**@⁠O5-7** on GitHub · 2026-11-25 04:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/2101) `O5-7:vfs/exempt-host-tool-dirs` → `main` · +113 −9 · 2 files · 1 commits · open When `XCL_DXC_DIR`, `XCL_D3D12_DIR`, `XCL_OPUS_DIR`, or `xcl.exe`'s own directory sits on a drive letter mapped to a console mount (such as `D:` -> `{game}`), `vfs_hooks` rewrites file-attribute probes inside the host process to the game folder. As a result, launcher preflight reports DXC as available, while every host shader compile fails with `dxcompiler.dll not found`. This registers `xcl.exe`'s directory and the configured tool DLL directories as `Vfs::own_folder` in `host_main`, and ignores bare drive roots in `Vfs::own_folder` so a misconfigured path cannot disable a whole console drive mount. **What is in it** - `Vfs::own_folder`: ignore bare drive roots such as `D:\` (`crates/xcl/src/vfs.rs`) - `host::build_vfs` & unit tests: exempt `xcl.exe`'s parent folder and `XCL_DXC_DIR`, `XCL_D3D12_DIR`, `XCL_OPUS_DIR` from console drive mounts (`crates/xcl/src/host.rs`) **Tested** - Hardware / OS / Rust: NVIDIA GeForce RTX 5080 (driver 32.0.15.9579), AMD Ryzen 7 9700X, Windows 11 10.0.26100, Rust 1.100.0 MSVC, debug (`cargo test`) + release (`smoke.ps1`) - `cargo test --workspace -- --test-threads=4` (with `XCL_DXC_DIR=D:\Windows Kits\10\bin\10.0.26100.0\x64`): 1156 passed, 0 failed, 46 ignored (24 `SKIPPED` GPU sub-checks on RTX 5080 wave32: 20 `no wave64`, 3 `DIFFERS_ON_1426` f16/V_CVT_F16_F32 per-lane refusals, 1 `no heap windows`) - Retail title (`9cc6a39e`, 60 s, `XCL_DXC_DIR=D:\Windows Kits\10\bin\10.0.26100.0\x64`): on `main`, launcher preflight found DXC on `D:\` while the host process failed 228/228 DXC compiles (`translated_pipelines: 0`, 0 translated draws); with this fix (`46460b88`), the host process loads DXC 1.8.2502.11 from `D:\Windows Kits\10\bin\10.0.26100.0\x64` with `translated_pipelines: 228`, 0 compilation failures, and 32,768 translated draws (0 skipped) **Regression run** ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1680 (PresentX 1680) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 13673 MB ``` ``` xcl-smoke v1 commit: 7cb20ff53cd274d41f0ff9814ae1a1c8b14bcc19 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1681 (PresentX 1681) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13671 MB ``` **Not tested** - AMD or Intel GPUs, native wave64 GPUs, Linux / Wine - Live DLL loading via `XCL_D3D12_DIR` or `XCL_OPUS_DIR` on a console-mounted drive (covered by unit tests only) - Retail world loading past the first-run menus **AI use** - Antigravity (Gemini 4 Neon): diagnosed the VFS/DXC host-process failure, wrote the fix and synthetic unit tests, ran the test suite and smoke runs, and drafted this PR description.
host_main previously registered only dxc::cache_dir() with Vfs::own_folder.
When XCL_DXC_DIR, XCL_D3D12_DIR, XCL_OPUS_DIR, or xcl.exe's own folder
lived on a drive mapped to a console mount (such as D: -> {game}),
vfs_hooks rewrote attribute probes inside the host process into the game
folder. Launcher preflight reported DXC as available, while every host
shader compile failed with dxcompiler.dll not found.

Exempt xcl.exe's directory and the configured tool DLL directories in
host::build_vfs, and ignore bare drive roots in Vfs::own_folder so a
misconfigured path cannot disable an entire console drive mount.

Assisted-by: Antigravity (Gemini 4 Neon)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:18:46 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-25 05:16 UTC · original · edited 2026-11-25 05:20 UTC

Full-suite run, since this PR has no test report yet. Tested exact head 46460b8 (on its base cbc296a).

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: 1144 passed, 0 failed, 44 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: console_drive_mount_exempts_host_tool_and_exe_folders, drive_root_or_blank_own_dir_does_not_disable_console_mount.
  • 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: 1155 passed, 0 failed, 46 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 6020a33 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.
**@⁠futurepro62** on GitHub · 2026-11-25 05:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/2101#issuecomment-7153608663) · edited 2026-11-25 05:20 UTC Full-suite run, since this PR has no test report yet. Tested exact head `46460b8` (on its base `cbc296a`). **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`: **1144 passed, 0 failed, 44 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: `console_drive_mount_exempts_host_tool_and_exe_folders`, `drive_root_or_blank_own_dir_does_not_disable_console_mount`. - 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`: **1155 passed, 0 failed, 46 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 `6020a33` 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://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

@⁠JoaoPauluu on GitHub · 2026-11-25 05:22 UTC · original

A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with main (1361 here; 1371 and 1356 on the two main runs). Under Wine the game runs from a Z: path and xcl.exe from another folder; the run started and ran normally with the exemption in place. The log has no line about the exemption, so I cannot tell which paths it applied to.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 46460b8 as it is (based on cbc296a) and main f5c5bdf, no uncommitted changes. Retail title 1.0.2.1, scripts/linux/smoke.sh (#257) for 60 s, no input. Runs in order: main, this PR (with other PRs in between), main.

Regression run

main (first run):

xcl-smoke v1
commit: f5c5bdf0e91035f8f1404f46f4f2f7aedc259e7f
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1371 (PresentX 1371)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

this PR:

xcl-smoke v1
commit: 46460b88841b004126ff89858f4b855cab491c21
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1361 (PresentX 1361)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

The second main run: 1356 frames, exit: 0x0, no device removal, no crash. Under Wine, peak commit reads 0 MB, so these blocks do not check memory.

Not tested

  • the test suite on this head, a host tool started from inside a mounted folder, native Windows.

AI use

  • Claude Code (Claude Opus 5.5) built both commits, ran the runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
**@⁠JoaoPauluu** on GitHub · 2026-11-25 05:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/2101#issuecomment-7153705664) A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with `main` (1361 here; 1371 and 1356 on the two `main` runs). Under Wine the game runs from a `Z:` path and `xcl.exe` from another folder; the run started and ran normally with the exemption in place. The log has no line about the exemption, so I cannot tell which paths it applied to. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `46460b8` as it is (based on `cbc296a`) and `main` `f5c5bdf`, no uncommitted changes. Retail title 1.0.2.1, `scripts/linux/smoke.sh` (#257) for 60 s, no input. Runs in order: main, this PR (with other PRs in between), main. **Regression run** main (first run): ``` xcl-smoke v1 commit: f5c5bdf0e91035f8f1404f46f4f2f7aedc259e7f gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1371 (PresentX 1371) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` this PR: ``` xcl-smoke v1 commit: 46460b88841b004126ff89858f4b855cab491c21 gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1361 (PresentX 1361) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` The second `main` run: 1356 frames, `exit: 0x0`, no device removal, no crash. Under Wine, `peak commit` reads 0 MB, so these blocks do not check memory. **Not tested** - the test suite on this head, a host tool started from inside a mounted folder, native Windows. **AI use** - Claude Code (Claude Opus 5.5) built both commits, ran the runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 05:43 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 05:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/2101#issuecomment-7154083687) 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 can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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