D3D12.X: coherent UMA windows in a driver heap on NVIDIA (port of #2844 to nvidia-dev) #3003
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!3003
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3003"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Kalmarv on GitHub · 2026-11-27 11:49 UTC · original
Kalmarv:nvd-p1-coherent-driver-heap→nvidia-dev· +286 −6 · 4 files · 1 commits · draftPort of #2844 (merged on
main) tonvidia-dev; the commit is #2844's change cherry-picked ontonvidia-deva5e2d851without conflicts. Part of #2688.On NVIDIA the title's GPU code reads and writes the coherent UMA window through a heap opened with
OpenExistingHeapFromAddress, and the GPU's loads and atomics on those imported pages are an order of magnitude slower than on a driver heap in the same host memory. The window becomes a driverCUSTOMwrite-back L0 heap mapped at its own address, so the title keeps its pointers. The measurements and the review are on #2844 (main: 0.62 -> 3.03 fps in the world on an RTX 5070 Ti, a replayed world frame 1,427 ms -> 165 ms of GPU time). Everything our team measured onnvidia-devsince (the first world picture on this branch, and every run after it) was on top of this change.What is in it
hle/d3d12x/uma_driver.rs(new), withmod.rs,real.rs,host.rs,gpu/uma.rs: as in #2844. On by default for an NVIDIA adapter outside Wine;XCL_UMA_DRIVER=0turns it off. Unit testsdriver_windows_by_default_on_nvidia_outside_wine,failed_write_watch_does_not_release_the_original_window,failed_restore_stops_before_importing_an_unbacked_window.Tested
XCL_DXC_DIR.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4on8d36887d: 1825 passed, 9 failed, 48 ignored. The same command onnvidia-deva5e2d851: 1822 passed, 10 failed, 48 ignored.a5e2d851as well:async_compute_pso_registers_real_pso_and_not_standin,console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly,hle::d3d12x::texture_upload::tests::gpu_parts_of_a_texture_go_up_and_the_rest_stays,hle::d3d12x::texture_upload::tests::pieces_hold_the_texels_of_their_levels,split_compute_prefers_the_offline_whole_pipeline,two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs.hle::d3d12x::sparse::tests::a_tile_decommitted_and_committed_again_keeps_its_video_memory.a_tile_decommitted_and_committed_again_keeps_its_video_memoryalone, 10 times on8d36887d(cargo test -p xcl --lib a_tile_decommitted_and_committed_again_keeps_its_video_memory): 10 passed, 0 failed.SKIPPED: 8 no wave64; 1 const_mask, wave64: no wave64; 1 f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)); 1 f16 arithmetic, wave64: no wave64; 1 f32 arithmetic, wave64: no wave64; 1 f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)); 1 f16 packed, wave64: no wave64; 1 f32 compares, wave64: no wave64; 1 mask_ff0_flbit, wave64: no wave64; 1 f64, wave64: no wave64; 1 f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)); 1 f32 conversions, wave64: no wave64; 1 integer arithmetic, wave64: no wave64; 1 f32 rounding, wave64: no wave64; 1 integer carries, wave64: no wave64; 1 f32 transcendentals, wave64: no wave64; 1 f32 three-source, wave64: no wave64; 1 no heap windows (opt-in: XCL_HEAP_WINDOWS=1); 1 no heap windows.Build and test (Windows, no GPU)is red onnvidia-devitself and on every PR into it, this one included: the lib test process ends with0x887a0020in a sparse test on the runner's software adapter, with no test reported failed. #2837 fixes that test; nothing here touches it.Regression run
150 s runs, same title, same env (
XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=all XCL_DIRECT_SPLIT_INSTRUCTIONS=0 XCL_PSO_JOURNAL=0 XCL_DRED=1 XCL_GPU_WAIT_TIMEOUT_MS=120000, DXC 1.9), no switch of this PR set. Themainrun from a hard-link copy of our team branch's DXIL cache; the base and head runs from hard-link copies of one cache warmed onnvidia-deva5e2d851(on this branch the title starts after about 75-90 s of startup shader preparation, so 60 s would end inside it).A commit of
main(b49be183, the last one before the shader preparation screen of #2555):The base,
nvidia-deva5e2d851:This PR's head:
Not tested
nvidia-devwith and without this commit alone: ournvidia-devruns all had it.AI use
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.