Skip to content

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

Open
O5-7 wants to merge 1 commit into
xcl-dev:mainfrom
O5-7:vfs/exempt-host-tool-dirs
Open

O5-7 wants to merge 1 commit into
xcl-dev:mainfrom
O5-7:vfs/exempt-host-tool-dirs

Conversation

@O5-7

@O5-7 O5-7 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Exempts xcl.exe's own folder and configured host tool DLL folders (XCL_DXC_DIR, XCL_D3D12_DIR, XCL_OPUS_DIR) from console drive mounts in the host VFS, while ignoring blank entries and bare drive roots (own_folder safety guard). Rebased onto current main (e429936c).

What is in it

  • crates/xcl/src/vfs.rs: guard Vfs::own_folder against bare drive roots (so passing D:\ does not disable console mounts for the whole drive).
  • crates/xcl/src/host.rs: collect current_exe().parent() and trimmed XCL_DXC_DIR, XCL_D3D12_DIR, XCL_OPUS_DIR paths into build_vfs, with tests console_drive_mount_exempts_host_tool_and_exe_folders and drive_root_or_blank_own_dir_does_not_disable_console_mount.

Tested

  • Hardware / toolchain: NVIDIA GeForce RTX 5080 (driver 32.0.15.9579), AMD Ryzen 7 9700X, Windows 11 Pro 10.0.26100, rustc 1.100.0 (0ef1bc386 2026-11-09).
  • cargo test -p xcl --lib host:: -- --nocapture --test-threads=1: 4 passed, 0 failed, 0 ignored (2027 filtered out), 0 skipped.
  • cargo test -p xcl --lib vfs:: -- --nocapture --test-threads=1: 12 passed, 0 failed, 0 ignored (2019 filtered out), 0 skipped.
  • cargo build --release -p xcl: clean build with 0 new warnings (26 pre-existing warnings on main).
  • Paired 60 s retail smoke (title: 9cc6a39e, run with XCL_PREPARE=0 per 8617577b because cold shader preparation for 26,503 records exceeded the 120 s startup timeout): e9bd937d matched main e429936c cleanly (894 vs 895 frames shown, 14441 vs 13711 MB peak commit, 0 crashes, 0 device removals).

Regression run

xcl-smoke v1
commit: e429936c10a5b8aa09470ff99dfc8c8d3d8c56fd
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 895 (PresentX 895)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13711 MB
xcl-smoke v1
commit: e9bd937d300ed33fbef46d32594877a30e9eb81c
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 894 (PresentX 894)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14441 MB

Not tested

  • Full cargo test --workspace at e9bd937d (only host:: and vfs:: ran after rebasing onto e429936c).
  • Live launch where xcl.exe or XCL_DXC_DIR resides on the same drive letter as a mounted console drive (this test layout uses separate folders, verified via console_drive_mount_exempts_host_tool_and_exe_folders).
  • AMD, Intel, or Linux/Wine GPUs at e9bd937d.

AI use

  • Rebased onto main, merged host::tests with main, ran tests/builds/smokes, and drafted this description with Antigravity (Gemini 4 Neon).

@futurepro62

futurepro62 commented Nov 25, 2026 •

Copy link
Copy Markdown

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 gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #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 gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #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 gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #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 gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #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 gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #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 (Tests: heap_window_out_of_memory_falls_back_to_the_switch_form fails under XCL_REQUIRE_GPU=mesh (opt-in skip counted as missing coverage) #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.

@JoaoPauluu

Copy link
Copy Markdown

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

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.

@DavidM1911

Copy link
Copy Markdown
Contributor

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

Thanks!

@Decodere

Copy link
Copy Markdown
Contributor

Independent desktop NVIDIA verification of PR #2101 at head 7cb20ff53cd274d41f0ff9814ae1a1c8b14bcc19 (1 commit; exact parent & merge-base: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (7cb20ff5)

Command Result
cargo test --release -p xcl --lib console_drive_mount_exempts_host_tool_and_exe_folders -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1337 filtered out × 3 (0.00s, 0.00s, 0.01s, 0 skipped)
cargo test --release -p xcl --lib drive_root_or_blank_own_dir_does_not_disable_console_mount -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1337 filtered out × 3 (0.00s × 3, 0 skipped)
cargo test --release -p xcl --lib vfs:: -- --test-threads=1 (3 consecutive runs) 12 passed; 0 failed; 0 ignored; 1326 filtered out × 3 (0.04s, 0.04s, 0.05s, 0 skipped)
cargo test --release -p xcl --lib host:: -- --test-threads=1 (3 consecutive runs) 2 passed; 0 failed; 0 ignored; 1336 filtered out × 3 (0.00s, 0.00s, 0.01s, 0 skipped)
cargo build --release -p xcl Clean build (1m 48s, exit 0, 0 new warnings)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, cached baseline on the same machine):

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1518 (PresentX 1518)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14018 MB

PR #2101 (7cb20ff53cd274d41f0ff9814ae1a1c8b14bcc19):

xcl-smoke v1
commit: 7cb20ff53cd274d41f0ff9814ae1a1c8b14bcc19
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1569 (PresentX 1569)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13992 MB

Runtime log observations (xcl.log)

  • 9221 log lines, 0 [ERROR] / device-removal / panic lines (dxil_cache: 460 hits, 0 misses, 0 compilation failures; 228 background pipelines, 0 failures).
  • Final draw/memory telemetry in log: 19402 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 13992 MB committed by the process; video memory 6114 MB local, 4654 MB non-local.

Limits of coverage

  • Exempting xcl.exe's own folder and configured XCL_DXC_DIR / XCL_D3D12_DIR / XCL_OPUS_DIR tool directories from console drive mounts (while ignoring bare drive roots and blank paths) was directly verified via both new tests (3/3 each), vfs:: (12/12 × 3), and host:: (2/2 × 3).
  • On this machine, xcl.exe and XCL_DXC_DIR live on C: rather than on the same drive letter as a mounted console drive, so the 60 s retail smoke confirms default-layout non-regression rather than an end-to-end live launch from a console-mounted drive letter.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

@ClosetPie107

Copy link
Copy Markdown

Tested on AMD / Linux: 7cb20ff5 (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental experimental-11.0-20261112 with vkd3d-proton master ec207194 plus a local patch dropping the lpVtbl checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, x86_64-pc-windows-gnu debug build, tests run under Wine)

The head as it is (base b49be183), with main f9a0cb80 the same session as the baseline.

Tests (XCL_REQUIRE_GPU=wave64)

  • cargo test -p xcl --lib -- host:: --test-threads=1: 2 passed, 0 failed, 0 ignored (console_drive_mount_exempts_host_tool_and_exe_folders, drive_root_or_blank_own_dir_does_not_disable_console_mount).
  • cargo test -p xcl --lib -- vfs:: --test-threads=1: 12 passed, 0 failed, 0 ignored.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 with --skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole (here the first loses the RADV device, the other two run out of memory under Wine): lib 1301 passed, 9 failed, 27 ignored; main f9a0cb80 lib (--test-threads=1, same skips): 1323 passed, 9 failed, 27 ignored. All failures but one are among main's. The other, flush_parked_does_not_free_or_reuse_tiles_while_unmap_is_in_flight, is flaky under load here: run alone 3 times it passed every time on this head and on main. The other binaries fail the same 3 tests as on main (e2e, pls_quota, predication_e2e).
  • d3d12_resource_and_sync: its fence and queue test ended the process here, as it does on main and most other trees in this setup.

Not tested

  • Native Windows, NVIDIA / Intel
  • A retail title
  • The launcher with XCL_DXC_DIR / xcl.exe on a drive letter mapped to a console mount

AI use

  • Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.

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)
@O5-7
O5-7 force-pushed the vfs/exempt-host-tool-dirs branch from 7cb20ff to e9bd937 Compare November 28, 2026 04:41

@O5-7 O5-7 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased onto latest main (e429936c) in e9bd937d and merged host::tests cleanly. Re-verified host:: (4/4), vfs:: (12/12), release build, and paired 60 s smoke (894 vs 895 frames shown, 0 crashes, 0 device removals); updated PR description accordingly.

@Foniass

Foniass commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Triage (#1607) – head e9bd937

Update (rechecked against main 6bfb5c5): withdrawn from the close list; recommendation: keep open. This PR also exempts XCL_OPUS_DIR, has tests and merges cleanly, while #1769 conflicts with main. Not a duplicate to close in #1769's favour.

#1769 (opened earlier) makes the same change: host.rs passes xcl.exe's folder, XCL_D3D12_DIR and XCL_DXC_DIR to Vfs::own_folder, and own_folder ignores a bare drive root, with a test of both. This PR adds XCL_OPUS_DIR on top, which can go into #1769.
host.rs:trim_dir reimplements the existing gpu::agility::clean_env_path, which #1769 reuses. The Build and test check of this head failed.
#833 solves the same problem differently (it bypasses the VFS hooks while DXC loads).
Recommendation: close (duplicate of #1769).

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run.

@throny throny closed this Dec 1, 2026
@throny throny reopened this Dec 1, 2026
@github-actions github-actions Bot added the area:hle kernelx, XGameRuntime, XAudio2, VFS, PE loader, TLS, EH label Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:hle kernelx, XGameRuntime, XAudio2, VFS, PE loader, TLS, EH

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants