Repository navigation
Conversation
The Agility SDK probe (gpu::agility, is_file and fs::read of <dir>\D3D12Core.dll) runs after the VFS hooks are installed. When XCL_D3D12_DIR, <exe dir>\D3D12 or <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. host.rs now registers each candidate's D3D12Core.dll as one of XCL's own paths before the hooks go in, the mechanism xcl-dev#49 and xcl-dev#331 use for the game folder, the data folder and the shader cache. It registers 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. CreateDeviceFactory loads the DLL through the loader, which is not hooked. The test registers what agility::sdk_files returns 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. Registering the directories instead fails it at the drive-root check; registering nothing fails it too. Fixes xcl-dev#595 Assisted-by: Claude Code (Claude Opus 4.6 found the cause and wrote the first version; Claude Opus 5.5 narrowed it to the DLL files and rewrote the test)
|
Windows runs for this PR, since you have none: head Tested
Regression run ( main 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 Written with Claude Code (Claude Opus 5.5) from runs on this machine. |
|
Independent verification on current Machine: Windows 11, Ryzen 9 7900X; Rust stable MSVC, debug.
AI use: test runs by Devin (Cognition, SWE-2); no code changes. |
|
Tested
58160b6 with an Agility SDK on a console-mounted drive :
All looking good to me, good job. 👍 |
|
A run under Wine on Linux, with a retail title: the tests pass and the title runs as on Tested
Regression run main: this PR: Under Wine, Not tested
AI use
|
|
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. |
|
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 ( |
The 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 VFS: a console drive mount leaves the PC's own folders on that drive #49 and VFS: XCL's shader cache on a drive a console mount names stays where it is #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 (VFS: the Agility SDK's D3D12Core.dll stays on a console-mounted drive #1136 (comment));vfs::testsandgpu::agilitypass on Windows (@Anon64, RTX 3060, release, 21 passed, VFS: the Agility SDK's D3D12Core.dll stays on a console-mounted drive #1136 (comment); @DavidM1911,vfs23 passed, VFS: the Agility SDK's D3D12Core.dll stays on a console-mounted drive #1136 (comment)).Regression run
@Anon64's pair, pasted unchanged from #1136 (comment): 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