diff --git a/README.md b/README.md index 91c019d824..115e0df370 100644 --- a/README.md +++ b/README.md @@ -357,6 +357,10 @@ Fill the reusable DXIL cache ahead of a run with the read-only package wrapper. watchdog for a GPU queue wait (5000 ms). A value that is not a number above 0 keeps the default. Expiry stops the title before later GPU work is submitted; it never treats elapsed time as proof that the waited-for work completed. + - `XCL_SPARSE_WINDOWS=` (1 to 8): the number of sparse windows (title memory the GPU sees, in + video memory) of the `XCL_UMA_WINDOWS` layout. Unset: 4 with 16 windows, 3 with 4 or 8. A title's + `MEM_64K_PAGES` reservations go there while they fit, and plain write-watched memory, which + shaders read as zeros, takes the rest; more windows can take more video memory. - Retired two-pass mesh buffers from tracked command lists can be reused once all GPU submissions that used them complete, even while the title still holds the command allocator. - Direct two-pass mesh draws can reuse one smaller record buffer across several slices when diff --git a/crates/xcl/src/gpu/recomp/tests.rs b/crates/xcl/src/gpu/recomp/tests.rs index 4f91f4c63d..dbb80a1447 100644 --- a/crates/xcl/src/gpu/recomp/tests.rs +++ b/crates/xcl/src/gpu/recomp/tests.rs @@ -5267,6 +5267,12 @@ fn gpu_sparse_vram_descriptors_buffers_and_xmem() { // 4 windows, or 16 with `XCL_UMA_WINDOWS=16` (windows 0..3 as with 4; then view windows and // windows without memory) assert_eq!(u.shader_windows(), crate::gpu::uma::configured_runtime_windows(), "runtime layout has the configured shader windows"); + // 16 windows keep 4 sparse windows, so the coherent window is window 4, which this program's + // 4 root-UAV windows do not reach (`XCL_SPARSE_WINDOWS=3` runs it with 16 windows) + if u.committed_window() != Some(3) { + runner::skip_test("the coherent window is not window 3"); + return; + } assert!(u.is_sparse_window(0) && u.is_sparse_window(1) && u.is_sparse_window(2), "windows 0..2 sparse VRAM"); assert!(u.is_committed_window(3), "window 3 coherent committed RAM"); let windows = crate::hle::d3d12x::real::uma_window_vas(); diff --git a/crates/xcl/src/gpu/uma.rs b/crates/xcl/src/gpu/uma.rs index 18b4024907..5d9df8ff6b 100644 --- a/crates/xcl/src/gpu/uma.rs +++ b/crates/xcl/src/gpu/uma.rs @@ -34,12 +34,32 @@ pub const MAX_WINDOWS: usize = 4; /// Maximum number of windows addressable through the shared descriptor heap (`XCL_HEAP_WINDOWS=1`). pub const MAX_HEAP_WINDOWS: usize = 16; -/// Maximum sparse VRAM windows reserved in runtime layouts (3 × 4 GiB = 12 GiB VA). +/// Maximum sparse VRAM windows reserved in the 4- and 8-window runtime layouts (3 × 4 GiB = 12 GiB VA). /// Keeping sparse VA capped at 12 GiB prevents huge startup `MEM_64K_PAGES` title heaps from /// being pulled into sparse VRAM (which causes multi-minute tile-mapping stalls and multi-GB /// sparse pool bloat), while still giving expanded 8/16-window layouts extra coherent windows. const MAX_RUNTIME_SPARSE_WINDOWS: usize = 3; +/// Sparse VRAM windows of the 16-window layout (4 × 4 GiB = 16 GiB VA): one more, taken from the +/// windows it leaves empty (4 sparse + 1 coherent + 6 view windows of 16), so it costs no address +/// space. A retail title's BVH builder works in a 3.5 GB `MEM_RESERVE | MEM_64K_PAGES` reservation +/// made once windows 1..2 are taken: with 3 it found no room and became plain write-watched +/// memory, which shaders read as zeros (every acceleration structure stayed empty). +const SIXTEEN_WINDOW_SPARSE_WINDOWS: usize = 4; + +/// The sparse VRAM windows of a runtime layout of `windows` windows: `XCL_SPARSE_WINDOWS=` +/// (1..=8), else 4 with 16 windows and 3 below. +fn runtime_sparse_windows(windows: usize) -> usize { + sparse_windows_setting(std::env::var("XCL_SPARSE_WINDOWS").ok().as_deref(), windows) +} + +/// `runtime_sparse_windows` for the value `v` of `XCL_SPARSE_WINDOWS` (unset or not a number: the +/// layout's default). +fn sparse_windows_setting(v: Option<&str>, windows: usize) -> usize { + let default = if windows == MAX_HEAP_WINDOWS { SIXTEEN_WINDOW_SPARSE_WINDOWS } else { MAX_RUNTIME_SPARSE_WINDOWS }; + v.and_then(|v| v.trim().parse::().ok()).map_or(default, |n| n.clamp(1, 8)) +} + /// View windows of the 16-window layout (`WindowKind::View`, 24 GiB): GPU views of the title's /// CPU memory go there (`Uma::view_reserve`). A retail title reserves 24 GiB of 64 KiB pages as /// a CPU view and the same again as a GPU-only view of it, and gives the GPU only addresses of @@ -52,11 +72,16 @@ fn view_windows(windows: usize) -> usize { } /// Maximum number of committed coherent windows in an expanded runtime layout. -/// Always leaves 3 sparse VRAM windows (12 GiB) and the view windows: 1 coherent for 4-window, -/// 5 for 8-window, 7 for 16-window. +/// Always leaves the sparse VRAM windows (`runtime_sparse_windows`) and the view windows: +/// 1 coherent for 4-window, 5 for 8-window, 6 for 16-window. fn max_coherent_windows(windows: usize) -> usize { + max_coherent_windows_for(windows, runtime_sparse_windows(windows)) +} + +/// `max_coherent_windows` with `sparse` sparse windows. +fn max_coherent_windows_for(windows: usize, sparse: usize) -> usize { if windows > MAX_WINDOWS { - windows.saturating_sub(MAX_RUNTIME_SPARSE_WINDOWS + view_windows(windows)).max(1) + windows.saturating_sub(sparse + view_windows(windows)).max(1) } else { 1 } @@ -319,14 +344,14 @@ impl Uma { } /// `for_runtime_with` using `windows` total shader-visible windows: up to 3 sparse VRAM - /// windows followed by `coh_wins` committed coherent windows sized to hold `coherent` bytes + /// windows (4 with 16) followed by `coh_wins` committed coherent windows sized to hold `coherent` bytes /// (up to `max_coherent_windows(windows)`), then, with 16, `VIEW_WINDOWS` view windows. pub fn for_runtime_windows(size: usize, coherent: usize, windows: usize) -> Option { let windows = if matches!(windows, MAX_WINDOWS | 8 | MAX_HEAP_WINDOWS) { windows } else { MAX_WINDOWS }; Self::reserve_runtime(size, coherent, windows) } - /// The layout: sparse windows (at most `MAX_RUNTIME_SPARSE_WINDOWS`), then the coherent + /// The layout: sparse windows (at most `runtime_sparse_windows`), then the coherent /// windows, then (16 windows only) the view windows. With view windows the whole aperture /// is reserved – the coherent windows' uncommitted tails and the windows after the views /// too, PAGE_NOACCESS – so Windows never places anything at an address shaders read as a @@ -334,7 +359,7 @@ impl Uma { fn reserve_runtime(size: usize, coherent: usize, windows: usize) -> Option { let coh_sizes = coherent_window_sizes(size, coherent, windows); let coh_wins = coh_sizes.len(); - let sparse_wins = (windows - coh_wins).min(MAX_RUNTIME_SPARSE_WINDOWS); + let sparse_wins = (windows - coh_wins).min(runtime_sparse_windows(windows)); let sparse_len = sparse_wins * WINDOW; let view_wins = view_windows(windows); let views_at = sparse_wins + coh_wins; @@ -1487,26 +1512,28 @@ mod tests { assert!(u.base() + aperture <= (1usize << 40), "expanded aperture must fit below 40-bit VA limit"); assert_eq!(u.shader_windows(), windows); assert_eq!(u.windows(), 1); - // Sparse VA stays capped at 3 windows (12 GiB) so huge startup heaps stay off sparse VRAM. - for k in 0..MAX_RUNTIME_SPARSE_WINDOWS { + // Sparse VA stays capped at 3 windows (12 GiB), 4 (16 GiB) with 16 windows, so huge + // startup heaps stay off sparse VRAM. + let sparse = if windows == MAX_HEAP_WINDOWS { SIXTEEN_WINDOW_SPARSE_WINDOWS } else { MAX_RUNTIME_SPARSE_WINDOWS }; + for k in 0..sparse { assert!(u.is_sparse_window(k), "window {k} should be sparse"); } - assert_eq!(u.committed_window(), Some(MAX_RUNTIME_SPARSE_WINDOWS)); + assert_eq!(u.committed_window(), Some(sparse)); // 8 windows: the trailing windows stay unreserved; 16: views right after the coherent // window, the rest kept empty (and reserved: `sixteen_windows_reserve_the_whole_aperture`) - let views = MAX_RUNTIME_SPARSE_WINDOWS + 1..MAX_RUNTIME_SPARSE_WINDOWS + 1 + view_windows(windows); - for k in (MAX_RUNTIME_SPARSE_WINDOWS + 1)..windows { + let views = sparse + 1..sparse + 1 + view_windows(windows); + for k in (sparse + 1)..windows { assert!(!u.is_sparse_window(k) && !u.is_committed_window(k), "window {k} holds no CPU memory"); assert_eq!(u.is_view_window(k), views.contains(&k), "window {k}: a view window in 16 only"); } let c = u.alloc(0x2_0000, 0).unwrap() as usize; - assert_eq!(u.window_of(c), Some(MAX_RUNTIME_SPARSE_WINDOWS)); + assert_eq!(u.window_of(c), Some(sparse)); assert!(u.free(c)); - // Window 1..2 hold large reservations while preserving window 0 descriptor headroom; >12 GiB overflows cleanly. + // Window 1..2 hold large reservations while preserving window 0 descriptor headroom; past the cap overflows cleanly. let big = 2 * WINDOW; let r = u.sparse_reserve(big).expect("8 GiB reservation in sparse windows 1..2"); assert_eq!(u.window_of(r), Some(1)); - assert!(u.sparse_reserve(4 * WINDOW).is_none(), "reservations beyond 12 GiB sparse cap must overflow to host RAM"); + assert!(u.sparse_reserve(4 * WINDOW).is_none(), "reservations beyond the sparse cap must overflow to host RAM"); let (d, ld) = u.sparse_alloc_in(0, GRAIN, GRAIN).expect("window 0 descriptor headroom intact"); assert_eq!(u.window_of(d), Some(0)); assert_eq!(u.sparse_release(d), Some(ld)); @@ -1515,15 +1542,15 @@ mod tests { assert_eq!( u.watch_regions(), vec![ - (u.base(), MAX_RUNTIME_SPARSE_WINDOWS * WINDOW), - (u.base() + MAX_RUNTIME_SPARSE_WINDOWS * WINDOW, 16 << 20), + (u.base(), sparse * WINDOW), + (u.base() + sparse * WINDOW, 16 << 20), ] ); } } /// The Series X run's plan (`XCL_UMA_WINDOWS=16`, 4095 MB, a 512 MB coherent window) and where - /// its first graphics memory goes: 3 sparse windows, the coherent one, 6 view windows, 6 + /// its first graphics memory goes: 4 sparse windows, the coherent one, 6 view windows, 5 /// empty, and its GPU heaps of 1172 / 2199 / 563 / 596 MB and its 38 MB view heap at the /// addresses that run logged (0xf2e00000 into window 0). Nothing of the title memory size /// goes into the plan: the Series S profile gets the same one. @@ -1533,14 +1560,14 @@ mod tests { let b = u.base(); assert_eq!(b % (MAX_HEAP_WINDOWS * WINDOW), 0); use WindowKind::*; - let mut kinds = vec![Sparse, Sparse, Sparse, Committed(512 << 20)]; + let mut kinds = vec![Sparse, Sparse, Sparse, Sparse, Committed(512 << 20)]; kinds.extend([View; VIEW_WINDOWS]); - kinds.extend([None; 6]); + kinds.extend([None; 5]); assert_eq!(u.kinds, kinds); assert_eq!((u.shader_windows(), u.windows(), u.size()), (16, 1, 512 << 20)); assert_eq!(u.desc_range(), Some((b + GRAIN, b + GRAIN + DESC_HEADROOM))); - assert_eq!((u.title_sparse_start(), u.sparse_end()), (b + 0x2001_0000, b + 3 * WINDOW)); - for (p, k) in [(0xf2e0_0000, Some(0)), (WINDOW + 0x140_0000, Some(1)), (3 * WINDOW, Some(3)), (3 * WINDOW + (512 << 20), Option::None), (4 * WINDOW, Some(4)), (10 * WINDOW, Option::None)] { + assert_eq!((u.title_sparse_start(), u.sparse_end()), (b + 0x2001_0000, b + 4 * WINDOW)); + for (p, k) in [(0xf2e0_0000, Some(0)), (WINDOW + 0x140_0000, Some(1)), (3 * WINDOW, Some(3)), (4 * WINDOW, Some(4)), (4 * WINDOW + (512 << 20), Option::None), (5 * WINDOW, Some(5)), (11 * WINDOW, Option::None)] { assert_eq!(u.window_of(b + p), k, "{p:#x}"); } // the GPU heaps (2 MB pages, rounded as `kernelx::VirtualAlloc` does), then the view heap @@ -1570,8 +1597,8 @@ mod tests { let used = (2892 << 20) + 0x260_0000; assert_eq!(u.sparse_free_in(0), (WINDOW - 0x2001_0000 - used, WINDOW - 0x2020_0000 - used)); assert_eq!(u.sparse_free_in(1), (WINDOW - (664 << 20), WINDOW - (664 << 20))); - // windows 1..2 full: window 0 - let rest = u.sparse_reserve(2 * WINDOW - (664 << 20)).unwrap(); + // windows 1..3 full: window 0 + let rest = u.sparse_reserve(3 * WINDOW - (664 << 20)).unwrap(); assert_eq!(u.window_of(rest), Some(1)); let (w0, _) = u.sparse_alloc_above(GRAIN, GRAIN).unwrap(); assert_eq!(u.window_of(w0), Some(0)); @@ -1609,8 +1636,10 @@ mod tests { assert!(u.sparse_release(p).is_some()); } - // Fragmented windows 1+ (2 GiB free at end of window 1 + 2 GiB free at start of window 2): - // a 3 GiB reservation still succeeds via cross-window fallback in windows 1+ without touching window 0. + // Fragmented windows 1+ (2 GiB free at end of window 1 + 2 GiB free at start of window 2, + // window 3 taken): a 3 GiB reservation still succeeds via cross-window fallback in windows + // 1+ without touching window 0. + let (w3, _) = u.sparse_alloc_in(3, WINDOW, GRAIN).unwrap(); let (w1_head, _) = u.sparse_alloc_above(2 << 30, GRAIN).unwrap(); let (w2_head, _) = u.sparse_alloc_in(2, 2 << 30, GRAIN).unwrap(); let (w2_tail, _) = u.sparse_alloc_in(2, 2 << 30, GRAIN).unwrap(); @@ -1621,7 +1650,7 @@ mod tests { assert_eq!(u.sparse_reserve(usize::MAX), None); - for p in [c, w2_tail, w1_head, view_heap, heaps] { + for p in [c, w2_tail, w1_head, w3, view_heap, heaps] { assert!(u.sparse_release(p).is_some()); } assert_eq!(u.sparse_used(), 0); @@ -1651,6 +1680,79 @@ mod tests { assert!(u.watch_regions().iter().all(|&(a, n)| a + n <= c + c_len), "{:x?}", u.watch_regions()); } + /// `XCL_SPARSE_WINDOWS`: a number from 1 to 8, the layout's default otherwise (4 with 16 + /// windows, 3 below); and with any of them the 16-window layout's sparse, coherent and view + /// windows still fit in its 16 windows. + #[test] + fn sparse_windows_setting_parses_clamps_and_fits_the_layout() { + for (v, n) in [(None, 4), (Some(""), 4), (Some("four"), 4), (Some("-1"), 4), (Some(" 3 "), 3), (Some("0"), 1), (Some("8"), 8), (Some("99"), 8)] { + assert_eq!(sparse_windows_setting(v, MAX_HEAP_WINDOWS), n, "{v:?}"); + } + for windows in [MAX_WINDOWS, 8] { + assert_eq!(sparse_windows_setting(None, windows), MAX_RUNTIME_SPARSE_WINDOWS); + assert_eq!(sparse_windows_setting(Some("5"), windows), 5); + } + for n in 1..=8 { + let max_coh = max_coherent_windows_for(MAX_HEAP_WINDOWS, n); + assert!(max_coh >= 1 && n + max_coh + VIEW_WINDOWS <= MAX_HEAP_WINDOWS, "{n} sparse: {max_coh} coherent"); + for coh in 1..=max_coh { + let sparse = (MAX_HEAP_WINDOWS - coh).min(n); + assert!(sparse + coh + VIEW_WINDOWS <= MAX_HEAP_WINDOWS, "{n} sparse, {coh} coherent"); + } + } + assert_eq!(max_coherent_windows_for(MAX_HEAP_WINDOWS, 3), 7); + assert_eq!(max_coherent_windows_for(MAX_HEAP_WINDOWS, 4), 6); + // a 5094 MB coherent plan still gets its 2 coherent windows (4 + 2 + 6 = 12 of 16) + assert_eq!(coherent_window_sizes(5094 << 20, 5094 << 20, MAX_HEAP_WINDOWS).len(), 2); + } + + /// The 16-window layout: windows 0..3 sparse, the coherent window 4, the views 5..10, the rest + /// reserved and empty; the whole aperture stays reserved and the sparse windows are one + /// write-watched region. + #[test] + fn sixteen_windows_keep_four_sparse_windows() { + let u = Uma::for_runtime_windows(16 << 20, RUNTIME_COMMITTED_CAP, MAX_HEAP_WINDOWS).expect("16-window aperture"); + let base = u.base(); + assert!((0..4).all(|k| u.is_sparse_window(k))); + assert_eq!(u.committed_window(), Some(4)); + assert_eq!((0..MAX_HEAP_WINDOWS).filter(|&k| u.is_view_window(k)).collect::>(), (5..5 + VIEW_WINDOWS).collect::>()); + for k in 5 + VIEW_WINDOWS..MAX_HEAP_WINDOWS { + assert!(!u.is_sparse_window(k) && !u.is_committed_window(k) && !u.is_view_window(k), "window {k} holds nothing"); + } + assert_eq!(u.sparse_end(), base + 4 * WINDOW); + for k in 0..MAX_HEAP_WINDOWS { + assert!(!free_at(base + k * WINDOW) && !free_at(base + (k + 1) * WINDOW - 1), "window {k} is free: Windows may place memory there"); + } + let g = u.view_reserve(VIEW_WINDOWS * WINDOW).expect("24 GiB in the view windows"); + assert_eq!(g, base + 5 * WINDOW); + let c = u.alloc(0x2_0000, 0).unwrap() as usize; + assert_eq!(u.window_of(c), Some(4)); + assert!(u.free(c)); + assert_eq!(u.view_release(g), Some(VIEW_WINDOWS * WINDOW)); + assert_eq!(u.watch_regions(), vec![(base, 4 * WINDOW), (base + 4 * WINDOW, 16 << 20)]); + } + + /// A retail title reserves 3.39 GB of 64 KiB pages (0xd4920000 bytes, its BVH builder's + /// scratch) once windows 1..2 are taken. In the 16-window layout it goes into the 4th sparse + /// window, where the GPU sees it, never into the coherent or view windows; 6.09 GB more has + /// no room left and takes no other window. (With 3 sparse windows it found no room and became + /// plain write-watched memory, which shaders read as zeros.) + #[test] + fn a_bvh_scratch_reservation_lands_in_the_fourth_sparse_window() { + let u = Uma::for_runtime_windows(16 << 20, RUNTIME_COMMITTED_CAP, MAX_HEAP_WINDOWS).expect("16-window aperture"); + let base = u.base(); + let held = u.sparse_reserve(2 * WINDOW).expect("windows 1..2"); + assert_eq!(u.window_of(held), Some(1)); + let r = u.sparse_reserve(0xd492_0000).expect("3.39 GB in a sparse window"); + assert_eq!((u.window_of(r), u.window_of(r + 0xd492_0000 - 1)), (Some(3), Some(3))); + assert!(u.is_sparse(r) && u.is_sparse(r + 0xd492_0000 - 1)); + assert!(u.sparse_reserve(0x1_85c0_0000).is_none(), "6.09 GB has no room left and takes no other window"); + assert!(r + 0xd492_0000 <= base + 4 * WINDOW, "not into the coherent window"); + assert_eq!(u.sparse_release(r), Some(0xd492_0000)); + assert_eq!(u.sparse_release(held), Some(2 * WINDOW)); + assert_eq!(u.sparse_used(), 0); + } + /// GPU views go to the view windows, window-aligned: one of 24 GiB fills them, and its /// release gives the range back whole. The CPU view never goes there. #[test] @@ -1669,7 +1771,7 @@ mod tests { } // a CPU view of the same size does not fit the sparse windows and never takes the views assert!(u.sparse_reserve(VIEW_WINDOWS * WINDOW).is_none()); - assert!(u.sparse_alloc(2 * WINDOW, GRAIN).is_some_and(|(a, n)| a + n <= u.base() + MAX_RUNTIME_SPARSE_WINDOWS * WINDOW)); + assert!(u.sparse_alloc(2 * WINDOW, GRAIN).is_some_and(|(a, n)| a + n <= u.sparse_end())); assert_eq!(u.view_release(g), Some(VIEW_WINDOWS * WINDOW)); assert_eq!(u.view_release(g), None); assert!(!u.is_title_address(g) && u.is_view(g)); @@ -1708,9 +1810,9 @@ mod tests { fn expanded_runtime_layout_splits_large_coherent_heaps_across_multiple_windows() { // Legacy 4-window layout stays capped at 1 coherent window (4095 MiB). assert_eq!(coherent_window_sizes(6 << 30, 6 << 30, MAX_WINDOWS), vec![MAX_SIZE]); - // 8- and 16-window layouts split >4 GiB coherent heaps across up to 5 / 7 committed windows - // with exact remainder sizing while keeping sparse windows capped at 3 (12 GiB) and, with - // 16, the 6 view windows free. + // 8- and 16-window layouts split >4 GiB coherent heaps across up to 5 / 6 committed windows + // with exact remainder sizing while keeping sparse windows capped at 3 (12 GiB) / 4 (16 GiB) + // and, with 16, the 6 view windows free. let want = MAX_SIZE + (512 << 20); for w in [8usize, MAX_HEAP_WINDOWS] { assert_eq!(coherent_window_sizes(want, want, w), vec![MAX_SIZE, 512 << 20]); @@ -1718,13 +1820,13 @@ mod tests { } assert_eq!(coherent_window_sizes(20 << 30, 20 << 30, 8).len(), 5); assert_eq!(coherent_window_sizes(20 << 30, 20 << 30, MAX_HEAP_WINDOWS).len(), 6); - // a coherent need past 7 windows (as a `coherent_file` may keep) stops at 7: windows + // a coherent need past 6 windows (as a `coherent_file` may keep) stops at 6: windows // 10..15 stay the views' - assert_eq!(coherent_window_sizes(40 << 30, 40 << 30, MAX_HEAP_WINDOWS), vec![MAX_SIZE; 7]); + assert_eq!(coherent_window_sizes(40 << 30, 40 << 30, MAX_HEAP_WINDOWS), vec![MAX_SIZE; 6]); assert_eq!(max_coherent_windows(MAX_WINDOWS), 1); assert_eq!(max_coherent_windows(8), 5); - assert_eq!(max_coherent_windows(MAX_HEAP_WINDOWS), MAX_HEAP_WINDOWS - MAX_RUNTIME_SPARSE_WINDOWS - VIEW_WINDOWS); - assert_eq!(max_coherent_bytes(MAX_HEAP_WINDOWS), 7 * MAX_SIZE); + assert_eq!(max_coherent_windows(MAX_HEAP_WINDOWS), MAX_HEAP_WINDOWS - SIXTEEN_WINDOW_SPARSE_WINDOWS - VIEW_WINDOWS); + assert_eq!(max_coherent_bytes(MAX_HEAP_WINDOWS), 6 * MAX_SIZE); // Multi-window Uma::alloc seamlessly spills into the 2nd committed window. let u = Uma::with_windows(2, 8 << 20).unwrap(); let a = u.alloc(6 << 20, GRAIN).unwrap() as usize; diff --git a/crates/xcl/src/hle/d3d12x/console_heap.rs b/crates/xcl/src/hle/d3d12x/console_heap.rs index 3c9dd506b8..1534167502 100644 --- a/crates/xcl/src/hle/d3d12x/console_heap.rs +++ b/crates/xcl/src/hle/d3d12x/console_heap.rs @@ -1699,7 +1699,7 @@ mod tests { assert!(!title_memory_fits(&u, b + WINDOW - 0x1_0000, view_heap, true), "into window 1"); assert!(title_memory_fits(&u, b + WINDOW - view_heap, view_heap, true), "the end of window 0"); // the coherent window, a view window, plain memory - for p in [b + 3 * WINDOW, b + 4 * WINDOW, 0xf2e0_0000] { + for p in [b + 4 * WINDOW, b + 5 * WINDOW, 0xf2e0_0000] { assert!(!title_memory_fits(&u, p, 0x1_0000, true), "{p:#x}"); } assert!(!title_memory_fits(&u, b + 0x2001_0000, 0, true));