Repository navigation
Conversation
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Test report from a second Apple silicon Mac (M4 Pro; the description's runs are on an M5 Pro). Head Tested
Not tested
AI use: Claude Code, Claude Opus 5.5 built both commits, ran the tests and wrote this report. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Hardware test report — commit
|
|
Regression runs for Windows does not take the copy path (
main: this PR: Not tested: the suite at this head (see the other reports here); AMD. AI use: Claude Code, Claude Opus 5.5 ran the runs and wrote this comment. |
|
A regression run under Wine on Linux, on a retail title. Tested
Regression run main (first run): this PR: The last Not tested
AI use
|
|
Retail title with the copy path forced on, on a 16 GB NVIDIA card, to add to @eizispark's Setup: this stack merged onto The path engages — from the log: It does not move the stall here:
then the usual end at 102.7 s: Against the default path on the same card (presents stop ~90 s, fault ~98 s), that is within noise — no improvement, and no device removal either. Read (inference, not a claim about your intent): the copy path addresses the bus traffic, and it engaged, but what ends these runs is the PSO queue, not memory reads. @eizispark got a device removal on AMD rather than a stall, so the two cards are not failing the same way under this flag. Not tested: default path on this head (IvyNotFound's Windows pair covers it), AMD, longer runs; the flag's effect on GPU dispatch time specifically, which would need the timing instrumentation rather than the run outcome. AI use: OpenCode, DeepSeek V4.1 Flash 1017. |
|
The How to read them. Nothing moves: the head matches
Not tested: Windows. Counts, exit codes and timings only; no paths, package contents or log bodies. Host: macOS 27.2.1 (Apple silicon, M5 Pro, 48 GB), CrossOver 26 with D3DMetal, Rust 1.100.0, Update — current
|
|
Checked this stack (with #1328 for the probes) against my c70bf8a. Of the 438 changed lines in the original, 423 are here as they were. The rest are comments and the log line for a window that isn't shared with the GPU, reworded. What's new on top is yours: the Splitting the I can't give it a Windows pair. A Mac pair with a title from me has to wait until my port is rebased onto a |
|
The e2e test title on a Mac with this PR: it gets past the index-buffer crash, then stops at the triangle check (GPU timeout, 3 runs of 4) or at the first PresentX (1 of 4). Tested
Without this PR ( With no GPU unified memory, With this PR, four runs:
So on this host the PR removes the first stop, and the next ones are the GPU timeout on that list (most runs) and the swap chain creation. I have not narrowed down which command of that list the GPU stalls on. Not tested
AI use: Claude Code (Claude Opus 5.5) helped build, run and read the logs; the runs are on my Mac. |
|
Correction to my report above: the GPU timeout at the triangle check does not come back, and I now think it came from my bench, not this PR. With this PR the test title has passed the triangle check in 20 runs since, and with What was likely wrong: after a crash, the title's process does not go away under CrossOver. Tested
Not tested
AI use: Claude Code (Claude Opus 5.5) helped build, run and read the logs; the runs are on my Mac. |
Helpers for the copy path that changes no behaviour yet: - sparse.rs: extract new_state from the inline closure in init, so shadow_window (next commit) can call it when no sparse windows exist - uma.rs: Uma::shadowed flag and is_gpu_copy(p): a sparse window or a committed one the GPU has a copy of. Never set to true in this commit. - list_x.rs: note_copy_into tracks PC copies into console buffers whose memory the GPU has a copy of; note_write uses is_gpu_copy - real.rs: uma_shadowed helper, res_map and dev_create_placed_resource_x use is_gpu_copy (= is_sparse while shadowed is false) Based on Ahmet-Dedeler's c70bf8a on mac-on-main-wip. Co-authored-by: Ahmet Dedeler <105894172+Ahmet-Dedeler@users.noreply.github.com> Assisted-by: Claude Code (Claude Opus 4.6 ported it; Claude Opus 5.5 reviewed it)
D3DMetal 3.0 applies SetPredication for draws, dispatches and ExecuteIndirect but not for copies: a predicated CopyBufferRegion runs unconditionally. The UMA shadow path (next commit) makes UMA available on this host, so the predication test would run and fail. A one-copy probe detects whether a predicated copy is skipped (Windows, any real D3D12) or run (D3DMetal). When run, the test skips with "host ignores SetPredication for copies" instead of failing. Based on us3r40456's bisect and measurement in xcl-dev#258. Co-authored-by: Ahmet Dedeler <105894172+Ahmet-Dedeler@users.noreply.github.com> Assisted-by: Claude Code (Claude Opus 4.6 ported it; Claude Opus 5.5 reviewed it)
D3DMetal answers E_NOTIMPL for OpenExistingHeapFromAddress. A committed UMA window is then a buffers-only heap of video memory (Uma::shadowed), kept in step like a sparse window's tiles (sparse::shadow_window): CPU writes go up before each ExecuteCommandLists (the window's write watch), GPU writes come back on Map and after the lists' memory writes, and PC copies into console buffers there are read back after the submit (list_x::note_copy_into). XCL_UMA_SHADOW=1 forces the path on a GPU that has such heaps, =0 never. On main 930e8b4: the start-up check that the GPU sees CPU writes (check_uma_import) is not run for a shadowed window (it is a copy by design); sparse::new_state carries the new parked list. The runner's run_in_region falls back to upload/readback copies per window on E_NOTIMPL. The sparse test's shadowed readback and constant-rewrite stress validate the data path. Part of xcl-dev#258. Based on Ahmet-Dedeler's c70bf8a on mac-on-main-wip. Co-authored-by: Ahmet Dedeler <105894172+Ahmet-Dedeler@users.noreply.github.com> Assisted-by: Claude Code (Claude Opus 4.6 ported it; Claude Opus 5.5 reviewed and fixed the import-check assertion)
4a11de6 to
ac4b997
Compare
|
Forced on Windows ( This is not about the Mac path. It is a data point for anyone thinking of the copy as an option on Windows too. Setup (edited: the exact stack)
GPU time in the world
The reason is in #1640 (comment): a What goes wrong with it on Windows
Not tested: the Mac path, the default Windows path (unchanged by the PR, not rerun), current AI use: Claude Code (Claude Fable 5.2) ran the measurements and drafted this report. |
|
Follow-up to my comment above: the per-frame Setup
Mechanism (with a journal of every Wait / Signal / Execute per queue)
One caveat about where the bug is: the shared Change tested: one asynchronous readback per title queue, each with its own source fence that only that queue signals, and its own copy queue (so a stalled queue's copy does not hold back the others). Result (world = after the dispatch burst of the world load)
The GPU is 70 – 98 % idle per queue in those windows. What limits the frame rate now looks CPU-side (the window's write watch took about 60 s of CPU in a 157 s run), not verified. What still ends the runs
Not tested: the Mac path; the unmodified synchronous readback; #433; current AI use: Claude Code (Claude Fable 5.2 coordinating, Claude Opus 5.5 for the journal, the probe and the change) ran this and drafted the report. |
|
NVIDIA test report for
AI-assisted (Claude Code). Synthetic tests only; no title run. |
|
@CharlyRien thanks for forcing the copy path on Windows and for the journal, that's the measurement I couldn't make here. From 7–17 s per dispatch to 4–40 ms is a clearer case for it than anything on the Mac. On the shared #433 removes the shared fence (each title queue gets its own, and the copy goes on the title's queue). I ran its two tests on the Mac on AI use: Claude Code, Claude Opus 5.5 read the code, ran the tests and wrote this reply. |
|
With the copy path on (
Steps, through the ABI root signature as
The control (not a proposed fix) pushes the block Not tested: a title (whether one reuses a block this way), a Mac, AMD. By default on Windows nothing changes. AI use: Claude Code (Claude Opus 5.5) wrote and ran the test and drafted this; text reviewed with Claude Fable 5.2. |
Stacked on #1326 and #1327; only the top commit (
ac4b997) belongs here. Part of #258.D3DMetal answers E_NOTIMPL for
OpenExistingHeapFromAddress, so on a Mac XCL has no GPU unified memory. With this PR the committed UMA window becomes a buffers-only heap of video memory (Uma::shadowed), kept in step like a sparse window's tiles (sparse::shadow_window): CPU writes go up before eachExecuteCommandLists(the window's write watch), GPU writes come back onMapand after the lists' memory writes, and PC copies into console buffers there are read back after the submit (list_x::note_copy_into, from #1326). The path is taken only whenOpenExistingHeapFromAddressreturns E_NOTIMPL;XCL_UMA_SHADOW=1forces it on a GPU that has such heaps,=0turns it off. Windows hosts open the heaps and are unchanged.Based on Ahmet-Dedeler's
c70bf8aonmac-on-main-wip, which he handed over in #258 (comment). #1327 makespredication_e2eskip on hosts that run predicated copies; merge it first, or that test fails on the Mac once this lands. #1328 has the probes from the same commit.What is in it
crates/xcl/src/hle/d3d12x/real.rs:open_umafalls back to the video-memory copy on E_NOTIMPL (shadow_choice,XCL_UMA_SHADOW);check_uma_importreports "not run: the coherent window has a copy in video memory" for a shadowed window;sanitize_coherent_bufferandplace_at_title_addressdropCROSS_ADAPTERfor it.crates/xcl/src/hle/d3d12x/sparse.rs:shadow_windowand its pool: the window's tiles mapped from the start.crates/xcl/src/hle/d3d12x/bind.rs: no GPU buffer for a shadowed window 0.crates/xcl/src/gpu/recomp/runner.rs: the test runner'srun_in_regionuploads the arena before a dispatch and reads it back after whenOpenExistingHeapFromAddressreturns E_NOTIMPL.crates/xcl/src/gpu/recomp/tests.rs:gpu_uma_import_check_at_initaccepts the "not run" result only when the window is shadowed;gpu_sparse_vram_descriptors_buffers_and_xmemreads the shader's output back on a shadowed window.Tested
x86_64-pc-windows-gnu(mingw-w64 GCC 16.2.0), debug, DXC 1.9.2609. Each test in its own process (<test exe> --exact <test> --test-threads=1 --nocapture).main930e8b4(and in my full per-test run of9aec53d), these fail on this host; at this PR's head they pass (4a11de6, and again atac4b997after the rebase below; D3D12.X: prepare for the unified memory copy path #1326 and Tests: skip predication_e2e when the host runs predicated copies #1327 under it):gpu_uma_import_check_at_init,gpu_unified_memory_arena,gpu_memory_windows_above_4_gib,gpu_mesh_mode_reads_memory_windows,gpu_bvh64_intersect_ray_across_memory_windows_and_grazing,gpu_memory_windows_reject_out_of_uma_aliasing,gpu_sparse_vram_descriptors_buffers_and_xmem.sparse_reinit, which skips with "no GPU UMA" onmain, passes.predication_e2eskips with "host ignores SetPredication for copies" (Tests: skip predication_e2e when the host runs predicated copies #1327).XCL_UMA_SHADOW=0(the copy path off),gpu_uma_import_check_at_initandgpu_sparse_vram_descriptors_buffers_and_xmemfail again, so they exercise the runtime path; the fiverun_in_arenatests still pass, because they run through the runner's own copy fallback above, not throughreal.rs.gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes(hangs on this host for another reason, see macOS (Apple Silicon, CrossOver + D3DMetal): the newer retail game reaches its first-run menus at 30 fps #258) andplaced_title_textures_share_vram_and_preserve_pixels(fails as onmain).main4178e88: one conflict inopen_uma, wheremainnow sets up the memory window views in the shared descriptor heap; the copies are set up first and the views after them, so a shadowed window's view is its copy in video memory. Rerun atac4b997, same results as above, includingXCL_UMA_SHADOW=0,sparse_reinitandpredication_e2e.4a11de6: NVIDIA RTX 5070 Ti and the AMD Radeon iGPU of a Ryzen 9800X3D (RDNA2), Windows 11, debug,cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 41 ignored on both (@futurepro62, D3D12.X: the committed window gets a copy in video memory #1329 (comment)); a second Mac (M4 Pro, CrossOver 26.3, D3DMetal): the seven UMA tests 0/7 on930e8b4and 7/7 here, 5 passed and 2 failed withXCL_UMA_SHADOW=0(the same two),sparse_reinitpassing andpredication_e2eskipping as above, and the e2e test title starting with the shadowed window, 31 PASS / 2 FAIL on both commits (@Lucasyudi, D3D12.X: the committed window gets a copy in video memory #1329 (comment)).Regression run
This changes the Mac's runtime path, so it needs an
xcl-smokepair from a Mac with a title (mainand this head); I have no title. Windows hosts don't take the path, but a Windows pair would confirm it.Not tested
gpu_uma_import_check_at_init: whichever merges second needs a one-line rebase. Once this lands, Tests: GPU UMA tests skip where D3D12 has no heaps over process memory #1060's skips for the fiverun_in_arenatests no longer fire on the Mac, sincerun_in_arenastops returning E_NOTIMPL.AI use
c70bf8aontomainand split it. Claude Code with Claude Opus 5.5 reviewed it, made the import-check test accept the "not run" result only on a shadowed window, ran the tests above (including theXCL_UMA_SHADOW=0runs) on this machine and wrote this description.