VFS: the Agility SDK's D3D12Core.dll stays on a console-mounted drive #1136
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1136
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1136/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@vakaobr on GitHub · 2026-11-24 12:20 UTC · original
vakaobr:vfs/agility-sdk-console-drive→main· +69 −2 · 3 files · 1 commits · closed without mergingThe Agility SDK probe (
gpu::agility,is_fileandfs::readof<dir>\D3D12Core.dll) runs after the VFS hooks are installed. WhenXCL_D3D12_DIR,<exe dir>\D3D12or<exe dir>is on a drive letter a console mount names (G:,D:,S:in the report), the hooked file APIs translate the host path to the game folder, the DLL is not found there, and the SDK is reported as unavailable. Fixes #595.What is in it
crates/xcl/src/gpu/agility.rs:sdk_files()andhost_sdk_files(), theD3D12Core.dllthe probe reads in each candidate directory (same candidates and order asinit()).crates/xcl/src/host.rs: registers each of those files as one of XCL's own paths before the hooks go in, the mechanism #49 and #331 use for the game folder, the data folder and the shader cache. The files, not their directories: the exe directory can be a drive root (D:\xcl.exe), and a root among the own folders would take the whole drive from the console mount.CreateDeviceFactoryloads the DLL through the loader, which the VFS does not hook.crates/xcl/src/vfs.rs: a test that registers whatsdk_filesreturns for the env override, the exe dir and a drive-root exe dir, and checks that each DLL path passes while the rest of the drive (beside the SDK and at its root) stays the console's.Tested
x86_64-pc-windows-gnu, debug. Head58160b6.vfs::tests: 13 passed, 0 failed.gpu::agility: 8 passed, 0 failed.left: Pass, right: Game { rel: "hunter\\data.bin" }); registering nothing fails it too.S:drive in all three places,XCL_D3D12_DIR,<exe dir>\D3D12and<exe dir>, withcargo test --workspaceat 699 passed, 0 failed (https://github.com/ivall/xcl/pull/1136#issuecomment-7132443864);vfs::testsandgpu::agilitypass on Windows (@Anon64, RTX 3060, release, 21 passed, https://github.com/ivall/xcl/pull/1136#issuecomment-7131597132; @DavidM1911,vfs23 passed, https://github.com/ivall/xcl/pull/1136#issuecomment-7132175903).Regression run
@Anon64's pair, pasted unchanged from https://github.com/ivall/xcl/pull/1136#issuecomment-7131597132: Windows 11, RTX 3060, release, a retail title for 60 s with
XCL_NETWORK=0and A pressed every 4 s from 20 s. 97 % ofmain's frames, 100 % of its peak commit, no device removals or crashes. Neither run had the Agility SDK on a console-mounted drive, so it shows the change leaves a normal run alone.main:
this PR:
Not tested
with_host_io; the two touch different files and should not conflict.AI use
github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@Anon64 on GitHub · 2026-11-24 12:33 UTC · original
Windows runs for this PR, since you have none: head
58160b6, based onmain47efa2e. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, Rust stable MSVC, release.Tested
cargo test -p xcl --release --lib -- vfs::tests gpu::agilityon58160b6: 21 passed, 0 failed, 0 ignored.Regression run (
scripts/smoke.ps1on a retail title, 60 s,XCL_NETWORK=0, A pressed every 4 s from 20 s)main
47efa2e:this PR:
No device removals or crashes; 97 % of main's frames, 100 % of its peak commit.
Not tested: the whole suite; an Agility SDK in
XCL_D3D12_DIRor the exe directory on a console-mounted drive.Written with Claude Code (Claude Opus 5.5) from runs on this machine.
@DavidM1911 on GitHub · 2026-11-24 12:58 UTC · original
Independent verification on current
main384f7f7(branch already contains it — clean).Machine: Windows 11, Ryzen 9 7900X; Rust stable MSVC, debug.
cargo test -p xcl --lib vfs: 23 passed, 0 failed — the D3D12Core-on-console-drive change is covered by the VFS suite (note:truncate_existing_validation_errorsnow passes on this base since #1016 landed).AI use: test runs by Devin (Cognition, SWE-2); no code changes.
@Ekibunnel on GitHub · 2026-11-24 13:10 UTC · original
Tested
NVIDIA GeForce RTX 5080, driver 32.0.16.2101, 9800X3D, 64GB, Windows 10 22H2 (19045.7807), D3D12 Agility SDK (D3D12Core.dll 1.620.2.0), rustc 1.100.0 (0ef1bc386 2026-11-09), release
cargo test --workspace -- --test-threads=4test result :ok. 699 passed; 0 failed; 21 ignored; 0 measured; 0 filtered out;58160b66e5with an Agility SDK on a console-mounted drive :SET XCL_D3D12_DIR=S:\GTA6\XCL_INDEV\xcl_agility-sdk-console-drive\D3D12:Working ✔
D3D12: Agility SDK v620 (S:\GTA6\XCL_INDEV\xcl_agility-sdk-console-drive\D3D12)<xcl.exe dir>\D3D12:Working ✔
D3D12: Agility SDK v620 (S:\GTA6\XCL_INDEV\xcl_agility-sdk-console-drive\target\release\D3D12)<xcl.exe dir>:Working ✔
D3D12: Agility SDK v620 (S:\GTA6\XCL_INDEV\xcl_agility-sdk-console-drive\target\release)All looking good to me, good job. 👍
Please merge.
@JoaoPauluu on GitHub · 2026-11-24 13:33 UTC · original
A run under Wine on Linux, with a retail title: the tests pass and the title runs as on
main.Tested
x86_64-pc-windows-gnu.58160b6as it is (based on47efa2e) andmain47efa2e, no uncommitted changes. The lib test binary runs under Wine, one test per process (--exact, 90 s cap).vfs::testsandgpu::agilityon58160b6: 21 passed, 0 failed, 0 SKIPPED, the threea_console_drive_mount_leaves_…tests included.scripts/linux/smoke.sh(#257) for 60 s, no input,mainfirst. NoXCL_D3D12_DIRand no Agility SDK besidexcl.exe, soD3D12Core.dllis vkd3d-proton's and neither run logs an Agility SDK line: this is a regression check, not a check of the fix.called_stubs,imports_by_sourceandmodulesinreport.jsonhave the same entries in both runs (only per-frame call counts differ).Regression run
main:
this PR:
Under Wine,
peak commitreads 0 MB, so these blocks do not check memory.Not tested
AI use
@throny on GitHub · 2026-11-24 22:59 UTC · original
Two contributors checked independently and found that #1769 solves the same problem in a different way: #1607, group D62. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint from the community triage in #1607, not a maintainer decision.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
@vakaobr on GitHub · 2026-11-25 09:38 UTC · original
Closing in favour of #1769, as the #1607 hint suggested: it fixes the same lookup (the Agility SDK on a drive a console mount names) and also covers the DXC folder and xcl.exe's folder, with the same drive-root guard. My test report is on #1769, including the one case this PR covered that it doesn't (
%LOCALAPPDATA%\XCL\D3D12on a mounted drive). Thanks to everyone who tested this one.Pull request closed