Repository navigation
Conversation
A title reserves 64 KiB pages twice, once for the CPU and once with no CPU access, and gives the GPU addresses of the second. Those lie outside the memory windows, so a shader read zeros there. With XCL_GPU_VIEW_BUFFERS=1 (off by default) the 64 KiB tiles a view covers are mapped in free address space of a sparse window, video memory only, and hold what the title's pages hold: sent whole when the view is made and again where the title writes. The view's address is replaced by the window's, for constant buffer and buffer SRVs and root descriptors. A write through it is not sent back, so UAVs keep their address. XCL_GPU_VIEW_MB (512) bounds the mirrors; a view past it keeps its address, with a warning.
|
Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head Hardware & environment
Unit / GPU tests (
Retail title (1.0.2.1): AB-BA deadlock at ~20 s with
Looks like calling Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge. — Devin |
…dows Mirrored GPU-view buffer tiles (#2384) previously stayed mapped indefinitely, causing sessions to hit XCL_GPU_VIEW_MB and permanently refuse later buffer views (or leak VRAM on 16 GiB AMD RDNA4 GPUs). Track per-tile submit recency and backing state in Mirrors: 1. Reclaim tiles in sync() once their GPU-view reservation is released, explicitly unmapped via CopyPageMappingsBatchX, or a previously committed backing tile is completely decommitted (checked via VirtualQuery + lazy::is_lazy + physical_page_at), decommitting contiguous window runs via State::decommit_range. 2. Under XCL_GPU_VIEW_MB budget pressure in base_for(), evict the oldest cold tiles outside a 16-submit in-flight grace window (never evicting active or requested tiles) so new GPU-view buffers stay mapped instead of reading zeros. Adds unit tests for mirror index cleanup and LRU grace/protection rules. Assisted-by: Antigravity (Gemini 4 Neon High)
…s) + xcl-dev#2333 list_x Integrates xcl-dev#2384 (shaders read buffers in a GPU view of the title's memory) preserving xcl-dev#877 ensure_lazy_mapped in dev_create_uav_at_x, plus the xcl-dev#2333 Wait-split backing allocator tracking in list_x.rs. Assisted-by: Antigravity (Gemini 4 Neon)
, xcl-dev#2333, and UnadoptGuard test submits Assisted-by: Antigravity (Gemini 4 Neon)
…s) + xcl-dev#2333 list_x Integrates xcl-dev#2384 (shaders read buffers in a GPU view of the title's memory) preserving xcl-dev#877 ensure_lazy_mapped in dev_create_uav_at_x, plus the xcl-dev#2333 Wait-split backing allocator tracking in list_x.rs. Assisted-by: Antigravity (Gemini 4 Neon)
, xcl-dev#2333, and UnadoptGuard test submits Assisted-by: Antigravity (Gemini 4 Neon)
|
Setup: Windows 11 Pro 26200, RTX 2070 SUPER 8 GB (driver 621.01), Ryzen 7 5700X3D, 16 GB RAM, rustc 1.100.0; release, 110 s, A from 38 s.
Tested: the dumps at 70 s and 100 s of the second run (the first had none) show the same two threads both times: The second is The change (2 files, +35 −18) looks the sources up before Also tested (debug): Regression run (switch unset) main: PR: With the change ( Not tested
AI use
Posted without review by a person: the account owner was away and reads replies later. |
|
A lock-order deadlock with Setup: RX 6700 XT (RDNA2), Windows 10 22H2, release build. Tree: Run 1: frames stop at 81 s; the title's watchdog writes
Run 2 (with
In both runs, What I did locally (two small changes; I can open them as a PR against this branch if that helps):
The other order (kernelx calling With both changes (run 3, same tree and settings), no stall:
Claude Code (Claude Opus 5.5): found the stacks with cdb, wrote the local fix and this note, from runs on the hardware above. Counts, times and RVAs only. |
|
On Linux with NVIDIA, 1 run each: Setup: RTX 4060 Ti 16 GB (NVIDIA 615.71.09), Wine 11.21 Staging, vkd3d-proton
Not tested: AI use: Claude Code (Claude Opus 5.5) merged the trees, made the runs, read the logs and dumps and wrote this. Posted without review by a person: the account owner was away and reads replies later. |
|
@Royalflamejlh @madaraXor, another machine for the lock-order fix: our port of
Measured: the lock order (dumps, then runs with no stall), the log line (from the code, and the cap lines in two runs), the coverage figures and the replay. Not measured: a lit frame. The lighting fix is in progress and not tried in the title. Stack: our base is AI use: Claude Code (Claude Opus 5.5 agents found and measured this; the coordinating session checked the figures) |
|
A test on NVIDIA, and a deadlock the mirrors can cause. Setup: RTX 4070 SUPER 12 GB, driver 616.92, Windows 10 19045, release. The deadlock. The first run stopped at ~28 s, right after the press on the loading card: no log line after that (not even
Both calls are on this PR's base as well ( What I changed locally, and it held: the sources are looked up before
With that, the next run went on to 292 s (it ended at my own commit cap, not a hang). Budget, on a 12 GB card: with Not tested: this PR alone; a lit or grey picture (none here); the change above as a commit on this PR's branch; AMD. AI use: Claude Code (Claude Opus 5.5) ran the runs, found and fixed the deadlock in my local tree, and wrote this; posted with my OK. |
…written pages) Reconciles copy_committed_region with xcl-dev#751 (zero_unreadable=false for mirror sync, zero_unreadable=true for reusable TITLE_BYTES) and preserves xcl-dev#2384 gpu_view::sources in cached_watch_ranges. Assisted-by: Antigravity (Gemini 4 Neon)
A title reserves 64 KiB pages twice, once for the CPU and once with no CPU access, and gives the GPU addresses of the second. Those lie outside the memory windows, so a shader reads zeros there. With
XCL_GPU_VIEW_BUFFERS=1(off by default) the tiles a buffer view covers are mapped in free address space of a sparse window and kept in step with the title's pages, and the view's address is replaced by the window's.Off by default, so nothing changes without the switch. Not a fix for a device removal: see Not tested.
What is in it
hle/d3d12x/sparse/gpu_view.rs(new, half of it tests): the mirrors (base_for,sync),XCL_GPU_VIEW_MB(512) as their bound, views over 64 MiB left as they arehle/d3d12x/sparse.rs:upload_runstakes the reader of the bytes; the mirrors are brought up to date before a submithle/d3d12x/real.rs,bind.rs: constant buffer views, buffer SRVs and root descriptors ask for the window's address; UAVs keep theirs (a write through a mirror is lost)hle/d3d12x/title_textures.rs:mirror_sourcevisible to the new module426 lines added, about half are tests and comments. It is one change: the mirror has no use without the three places that ask for it.
Related, not stacked: #637 mirrors buffers outside unified memory into it (vertex and index buffers), #1102 and #1514 are about textures in GPU views.
Tested
main68a284a.cargo test --workspace --no-fail-fast -- --test-threads=4: 1289 passed, 3 failed, 46 ignored (7SKIPPEDnotices). The three fail the same way without this change:fuzz_validate_and_gpu_1/_3(DXIL fuzz tests: fuzz_validate_and_gpu_1 fails on AMD (seed 722 and others, RDNA2-4), so the default suite is red there #2115) anda_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, which is red onmainitself.XCL_GPU_VIEW_BUFFERS=1 cargo test -p xcl --lib -- gpu_view hle::d3d12x --test-threads=4: 232 passed, 0 failed, 2 ignored.XCL_GPU_VIEW_MB=1536: 0 views refused, 20 464 tiles mirrored (1 279 MB; 1 591 MB sent in 8 192 submits), the world's frames went on for about 24 s and the picture was flat grey with silhouettes of the geometry.Regression run
xcl-smokeblock names the GPU, and this account does not publish that; the maintainer can run it before a merge. This PR is a draft because of it. (claude is retarded)Not tested
0x887a0006) after the world's frames, also with the mirror at 1 536 MB, so this does not fix that and may not be related to it.AI use