D3D12.X: leave no free granule next to the driver heap's hole, and no one-granule remake #2991
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!2991
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2991"
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?
@Prime1997 on GitHub · 2026-11-27 09:20 UTC · original
Prime1997:contrib/uma-groom-boundaries→main· +87 −6 · 1 files · 1 commits · draftRequested by Prime · project thread
Two boundary cases of #2977's grooming, reported on that PR after it merged (thanks to the reviewer who followed up):
What is in it
crates/xcl/src/hle/d3d12x/uma_driver.rs:groomreserves the hole's own stretch up to the hole;groom_margin;remakerefuses a one-granule window before releasing it.grooming_leaves_no_free_granule_next_to_the_hole(in a process of its own, as the other grooming test): one free granule below a 512 MB hole; a window-sized reservation after grooming lands at the hole. With the old pieces it landed one granule low (0x7ff490740000for a hole at0x7ff490750000, checked by running the test against the old code).a_one_granule_window_is_left_as_it_is; the two restore tests (failed_write_watch_does_not_release_the_original_window,failed_restore_stops_before_importing_an_unbacked_window) use two granules, since one is not remade now and their failure paths would not be reached.Tested
cargo test --locked --workspace --no-fail-fast -- --test-threads=4withXCL_DXC_DIRset to DXC 1.9.2609.5: 1457 passed, 3 failed, 47 ignored. The 3 failures are tests that fail onmain623d02e4itself (1455passed,3failed,47ignored there, same command):test_title_draws_with_a_root_signature_under_the_debug_layer,test_title_runs_and_game_folder_is_untouched,test_title_runs_under_the_debug_layer_with_dred.Regression run
A commit of
main(b49be183, the last one before the shader preparation of #2555, which prepares every record before the title and does not fit a 60 s run):This PR's head (with
XCL_PREPARE=0, the switch of #2976):Not tested
AI use
Claude Code (Claude Opus 5.5) wrote the code, ran the suite and the regression runs on the hardware above, and wrote this description; Prime asked for it and owns the account. We coordinate the 8 GB work on the XCL Discord too: https://discord.gg/6B4TykyC4W
🤖 Generated with Claude Code
@Prime1997 on GitHub · 2026-11-27 09:22 UTC · original
@thehollowedone Pushed this for you.
Plz review.
@thehollowedone on GitHub · 2026-11-27 09:32 UTC · original
Independent RTX 3080 Ti check of #2991 head
a497d8fcagainst its current-mainparent623d02e4. I reviewed the UMA change and found no runtime blocker. This is the same two boundary fixes as my #2977 follow-up, so I am not opening a duplicate PR.Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC 1.8.2502.11. On the clean PR head,
cargo build --offline --locked -j 4 --workspacepassed;cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4ran all 38 test binaries: 1,460 passed, 0 failed, 47 ignored, 25 GPU skip notices.XCL_DXIL_CACHEpointed to a writable temporary directory for this suite.cargo test --offline --locked -j 4 -p xcl --lib hle::d3d12x::uma_driver::tests -- --test-threads=1: 6 passed, 0 failed, 0 ignored, no skips.I also ran
scripts/smoke.ps1for 60 seconds on clean release builds of the same title, GPU and settings, withXCL_PREPARE=0on both. These are the script's generated blocks:main623d02e4#2991
a497d8fcThe head showed 99.0% of
main's frames and 100.3% of its peak commit, within the PR limits. The blocks do not establish that either rare boundary case occurred in the title run or which screen it reached. Existing shader caches were retained; this is not a controlled cold shader timing result.One non-blocking test improvement:
grooming_leaves_no_free_granule_next_to_the_holecurrently asksVirtualAlloc(NULL, LEN)where Windows chose to place the allocation. It can pass even if the wrong address is still available. I tested the more direct assertion below on the exact PR head: 1 passed, 0 failed, 0 ignored, no skip. It requires the allocation one granule before the hole to fail and the intended hole to succeed. The distinctive child exit code also prevents--exactmatching zero tests from looking like success.Test-only diff for the address invariant
AI use: Codex (GPT-6.2 Sol) reviewed the diff, ran the builds, tests and smoke pair, and drafted this report. Codex (GPT-6.2 Astra) independently reviewed the low-level boundary logic.
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.