Repository navigation
Conversation
When the title unmaps physical pages in a sparse window, sparse::decommitted unmapped their tiles (UpdateTileMappings to NULL) on the sparse queue at once, ahead of work still in flight on the title's queues that reads or writes those tiles. While a retail game streamed its world under Wine on an RTX 5060, NVIDIA's MMU faulted in a copy engine (NVRM Xid 31, a GPU VA with nothing mapped) and the device was lost. Now each known title queue signals a fence of its own and the sparse queue waits for it before unmapping; nothing waits on the CPU. In the same scenario the fault did not happen again. Test unmapping_waits_for_work_on_title_queues: with a title queue held on a gate fence, the sparse queue's next signal does not complete until the gate opens. It fails without the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Windows / MSVC run, since Not tested asks for one: Tested
Not tested
AI use
|
|
Windows regression run with a retail title, which Not tested asks for (the comment above ran the suite only). Tested
Regression run
This PR Not tested
AI use
|
|
Tested |
|
Thanks @nullmarsh and @vibryxcx for the runs. A note for review: #532 changes the same function ( |
|
Tested What the test does. A title's queue may GPU-wait for a fence that another of its queues signals only in a later submit; async compute does this.
Results (
Why, by reading
Not tested: AMD, Linux/vkd3d-proton (your setup), and any retail title. I haven't tried a fix. The test takes about 5 s even when it passes: its watchdog sleeps the full 5 s before checking. The test, as a patch on
|
|
@Kalmarv's Tested
Not tested
AI use
|
|
Closing as superseded by #532, which has already been merged into |
When the title unmaps physical pages in a sparse window,
sparse::decommittedunmapped their tiles (UpdateTileMappingsto NULL) on the sparse queue at once, ahead of work still in flight on the title's queues that reads or writes those tiles. While a retail game streamed its world (Linux, RTX 5060), NVIDIA's MMU faulted in a copy engine (NVRM Xid 31 … ENGINE CE0 … FAULT_PTE, a GPU VA with nothing mapped) and the device was lost. Now each known title queue signals a fence of its own and the sparse queue waits for it before unmapping; nothing waits on the CPU. Part of #175 / #248.What is in it
hle/d3d12x/sparse.rs:after_work_on(state, queues), called bydecommittedwithpresent::known_queues()beforeunmap_tiles; one fence per title queue (a fence shared by several queues could go backwards).unmapping_waits_for_work_on_title_queues(GPU): with a title queue held on a gate fence, the sparse queue's next signal does not complete until the gate opens. Without the change it fails ("the unmap queue went ahead of the title's work in flight").Tested
from_ifacechecks relaxed and-Db_ndebug=true, as in Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257; DXVK 3.1.1 dxgi), Rust stablex86_64-pc-windows-gnu(cross-built), releasemain2997c9a+ this commit): CPU tests--skip gpu:: --test-threads=4: 364 passed, 0 failed, 3 ignored; GPU testsgpu:: --test-threads=1: 271 passed, 0 failed, 18 ignored (run serially: with 4 threads this card sometimes loses the device, NVRM Xid 109, in tests this change does not touch).mesh_dispatch::tests::gpu_*/paired_*were excluded: they hang this GPU onmaintoo.SKIPPEDon this adapter:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64)Regression run
scripts/smoke.ps1needs Windows (see Not tested).Not tested
scripts/smoke.ps1blocks and no MSVC build; this PR needs someone to run the regression on Windows before it can be merged.AI use
🤖 Generated with Claude Code