Repository navigation
Conversation
… one-granule remake Two boundary cases of the grooming xcl-dev#2977 changed (reported on that PR after it merged): - In the free stretch that holds the window's hole, the left reservation started at the stretch's base plus the margin. When the stretch began less than the margin before the hole, the granules between its base and the hole stayed free, and with the hole they made room for a window-sized mapping one granule before the window's address. Reproduced: with one free granule below a 512 MB hole, a window-sized reservation after grooming landed at hole - 64 KiB. The stretch that holds the hole is now reserved right up to it and from its end (the margin stays at the stretch's start only where the part before the hole is longer). - A window of one 64 KiB granule has no margin (half of it rounds to zero granules), so grooming reserved every other free stretch and left the driver no room. Such a window is not remade now (it stays the title's memory); the two restore tests use two granules for that reason. Tests: grooming_leaves_no_free_granule_next_to_the_hole (fails with the old pieces: the reservation lands one granule low), a_one_granule_window_is_left_as_it_is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@thehollowedone Pushed this for you. Plz review. |
|
Independent RTX 3080 Ti check of #2991 head 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, I also ran
#2991 The head showed 99.0% of One non-blocking test improvement: Test-only diff for the address invariantdiff --git a/crates/xcl/src/hle/d3d12x/uma_driver.rs b/crates/xcl/src/hle/d3d12x/uma_driver.rs
@@ -388,15 +388,17 @@ mod tests {
assert_eq!(guard, all);
let hole = all + 2 * G;
let got = groom(hole, LEN);
- let p = reserve(0, LEN, 0);
+ let wrong = reserve(hole - G, LEN, 0);
+ assert_eq!(wrong, 0, "a window-sized mapping still fits before the hole");
+ let right = reserve(hole, LEN, 0);
+ assert_eq!(right, hole, "the intended hole is blocked");
ungroom(got);
- for a in [p, guard] {
+ for a in [right, guard] {
if a != 0 {
VirtualFree(a as *mut c_void, 0, MEM_RELEASE);
}
}
- println!("window reservation at {p:#x}, hole {hole:#x}");
- std::process::exit(if p == hole { 0 } else { 1 });
+ std::process::exit(77);
}
}
@@ -405,7 +407,7 @@ mod tests {
.output()
.unwrap();
let transcript = format!("{}{}", String::from_utf8_lossy(&output.stdout), String::from_utf8_lossy(&output.stderr));
- assert_eq!(output.status.code(), Some(0), "{transcript}");
+ assert_eq!(output.status.code(), Some(77), "{transcript}");
}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. |
|
Tested PR #2991 ( Unit tests (
|
Requested 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