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>
This was referenced Nov 24, 2026
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.
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