Repository navigation
VFS: a console drive mount leaves the PC's own folders on that drive - #49
Merged
Merged
Conversation
The default "D:" mount (the package drive, XDefiant's d:\hunter\...)
translated every path on the PC's D: drive. With the game or XCL's data
on D:, the host could not read the game's exe: D:\games\x\game.exe
became <game>\games\x\game.exe ("loading the game failed: ... os error
3"). The e2e test fails this way when the repository is on D:.
- A plain drive path that is already inside the game folder or the
title's data folder is left alone. Console paths on that drive
("D:\hunter\...") still go to the game folder.
- An embedded console mount ("<cwd>\GAME:\x", "GAME:\x" made relative
by a runtime) is looked for before the drive mounts. With the current
directory on D:, the "D:" mount took it first and the title's
GAME:\ reads failed with ERROR_INVALID_NAME.
Collaborator
|
Thanks, merged! This is the third fix for this bug (#33 and #35 had their own takes inside bigger PRs), and the smallest and clearest one. Checking for an embedded I tested it on top of current
Neither had a file error in the log. The ambiguity you mention is fine by me: a console path that happens to equal the game folder's real location on the same drive. |
This was referenced Nov 24, 2026
CalvyPZ
pushed a commit
to CalvyPZ/xcl
that referenced
this pull request
Nov 24, 2026
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)
CalvyPZ
pushed a commit
to CalvyPZ/xcl
that referenced
this pull request
Nov 24, 2026
…PC descriptors The command list's console xcl-dev#53 / xcl-dev#54 (ClearUnorderedAccessViewUint / Float) were remapped straight to PC xcl-dev#49 / xcl-dev#50 (`console_remap`) with no override, so a title's call reached the PC method with its handles as they were. Console code takes its descriptor handles from heap xcl-dev#9 / xcl-dev#10, which give it the address of its console heap slots in unified memory (`console_heap::start`), not PC descriptor handles: the PC clear got a GPU handle outside the bound shader-visible heap and a CPU handle pointing at T# words. Only the opt-in console-list replay (XCL_CONSOLE_LISTS=1) translated them. xcl-dev#53 / xcl-dev#54 now go to `list_x::clear_uav_uint_x` / `clear_uav_float_x` (same arguments as the PC methods): two console slots become their PC UAVs (GPU: `pc_gpu_uav`, in the heap lists bind; CPU: `pc_uav`, in the title's CPU-only heap), as the replay does; two PC handles go through as they are; a mix, or a slot without a shader-visible UAV, is skipped and logged once. Test on WARP: an R32_UINT buffer UAV in a CPU-only and a shader-visible console heap, xcl-dev#53 with the console handles and 0xDEADBEEF. With the handles passed through (the old path) the test process dies with STATUS_ACCESS_VIOLATION in the PC clear; with the translation the buffer reads back 0xDEADBEEF. Co-Authored-By: Claude Opus 5.5 <[email protected]>
emirduran707
added a commit
to emirduran707/xcl
that referenced
this pull request
Nov 25, 2026
…PC descriptors The command list's console xcl-dev#53 / xcl-dev#54 (ClearUnorderedAccessViewUint / Float) were remapped straight to PC xcl-dev#49 / xcl-dev#50 (`console_remap`) with no override, so a title's call reached the PC method with its handles as they were. Console code takes its descriptor handles from heap xcl-dev#9 / xcl-dev#10, which give it the address of its console heap slots in unified memory (`console_heap::start`), not PC descriptor handles: the PC clear got a GPU handle outside the bound shader-visible heap and a CPU handle pointing at T# words. Only the opt-in console-list replay (XCL_CONSOLE_LISTS=1) translated them. (same arguments as the PC methods): two console slots become their PC UAVs (GPU: `pc_gpu_uav`, in the heap lists bind; CPU: `pc_uav`, in the title's CPU-only heap), as the replay does; two PC handles go through as they are; a mix, or a slot without a shader-visible UAV, is skipped and logged once. Test on WARP: an R32_UINT buffer UAV in a CPU-only and a shader-visible console heap, xcl-dev#53 with the console handles and 0xDEADBEEF. With the handles passed through (the old path) the test process dies with STATUS_ACCESS_VIOLATION in the PC clear; with the translation the buffer reads back 0xDEADBEEF. Co-Authored-By: Claude Opus 5.5 <[email protected]>
theaustinayers
added a commit
to theaustinayers/xcl
that referenced
this pull request
Nov 25, 2026
A ClearUnorderedAccessView* recorded on a console-recorded list (XCL_CONSOLE_LISTS) is replayed into the PC list when the list closes. The replay passed the title's resource, the depth buffer, together with the slot's PC UAV, which with XCL_DEPTH_UAV_TWIN=1 is a view of the buffer's twin: the invalid view/resource pair the direct list's clear no longer makes. The first run with the twins on would have met it on such a list, and the twin would have kept stale values. The direct list's rule moves into list_x::uav_clear_resource and the replay uses it as well: the twin when the slot's view names it, nothing (counted as skipped) when what the view names is not known. The plan left this to a later commit; it is taken now because that run uses the switch. The GPU test of the clear also checks what the PC method receives: it calls the console method on a stand-in of the list whose PC xcl-dev#49 notes its resource and goes on to the list's own. Before, it counted XCL's decision only, and the readback would pass with the depth buffer as the resource too, because the clear goes through the slot's descriptor. A clear through the buffer's depth-plane UAV, a null view, is not done and reaches nothing. Tested: real::depth_uav_twin_tests::gpu_clear_uav_of_a_stencil_uav_clears_the_twin (WARP, child process; run on its own it made twin #1 and printed no SKIPPED line). The replay itself is not driven by a test: a console list closes only with unified memory open on a GPU. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the repository, a game or XCL's data on the PC's D: drive, the default
D:mount (the package drive, for paths liked:\hunter\...) translated the PC's own paths too. Onmain, the e2e test fails for that reason when the repository is on D:. The host can't read the game's exe:D:\xcl-test\...\game\xcl_testtitle.exebecame<game>\xcl-test\...\game\xcl_testtitle.exe.Two changes in
vfs.rs:D:\hunter\...) still go to the game folder.<cwd>\GAME:\x, when a runtime treatsGAME:\xas relative) is now looked for before the drive mounts. With only the first change, the test title ran on D: but one check still failed: with the current directory on D:, theD:mount tookD:\...\GAME:\data\...first ([FAIL] files: console paths G:\ and GAME: read from the game folder: ... (os error 123)).One ambiguity is left: a console path that happens to land inside the game folder's real location (a game installed at
D:\hunterreadingD:\hunter\x) is now taken as the PC path. I don't think that's worth more logic.Validation
a_console_drive_mount_leaves_the_pcs_own_folders_on_that_drivemounts the drive that holds the test folders. Onmainit fails on both cases above.cargo test --workspace --release --no-fail-fast:main(055b0ad):test_title_runs_and_game_folder_is_untouchedfails with the error above. Everything else passes.cargo test -p xcl --libon Windows GNU under Wine passes too.