GPU: a heap sync leaves out the slots past the host heap #3512

Open
neonbyte1 wants to merge 2 commits from upstream-pr/3512 into main
neonbyte1 commented 2026-11-27 12:04:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-27T12:04:08Z.


What's wrong

descriptor::sync_heaps (crates/victory-gpu/src/descriptor.rs:169 on main) takes each dirty
64 KiB page of a shader-visible heap the title writes as bytes and clamps its last slot at the
title's descriptor count only:

host.sync_slots(first as u32, last.min(u64::from(heap.desc.count)) as u32, start, step);
//                                             ^^^^^^^^^^^^^^^ the title's count, descriptor.rs:196

HostHeap::sync_slots (host.rs:695) then reads every record in first..last (host.rs:699),
compares each against the slot's made key, and calls self.mirror for the ones that differ
(host.rs:714). HostHeap::mirror refuses every index at or past the host heap's count before it
reads anything at all (host.rs:723).

The host heap has fewer slots than the title's whenever the host caps its heaps
(host.rs:145-171): on NVIDIA CreateDescriptorHeap refuses count + DYNAMIC and then
count + MIN_DYNAMIC, and the cap branch (host.rs:164) keeps
count = PORTABLE_VIEWS - MIN_DYNAMIC = 934,464 slots, while the title's heap is
1,245,184 slots (#2121, #3475). The last 310,720 title slots have no host slot, and the
sync reads them and calls mirror on every one it finds stale, every frame.

Measured on the same sync code on the perf/best lineage (run 0763-heapdirty1; the host counted
762,920 slots there): of the 222 dirty pages a world frame marks (455,597 slots), 98 pages —
200,704 slots, 44 % — lay past the host's count, and every one of the ~200,000 mirror calls made
nothing
(216,049 slots were stale; of the 254,608 scanned below the count, 15,345 — 6 % — needed
making).

main has no split heap: one host: OnceLock<Option<host::HostHeap>> per title heap
(descriptor.rs:59), made with the title's count (descriptor.rs:100), so host.count() is the
whole bound and there is no per-split arithmetic to redo.

The fix

Both places stop at HostHeap::count():

  • sync_heaps clamps the page's slot range with host::host_slots(host.count(), first, last)
    before sync_slots reads anything, and the SyncSlots diagnostics counter counts the slots
    actually scanned instead of the title's.
  • sync_slots clamps again, and returns before the record read when a range is entirely past the
    count: the invariant does not depend on the caller.
  • host_slots is the one expression both use, and what the test pins.

No behaviour change: mirror never made such a slot. The heap's highest title slot still goes to
mirror once per heap per sync, so the title slot past the host heap warning (host.rs:728)
keeps firing exactly as it does now (once per new highest index); what goes away is the record read
and the refused mirror call for the other 310,719 slots.

Tests

a_heap_sync_stops_at_the_host_heaps_count (descriptor/host.rs, CPU only): a page below the
count keeps the caller's range, one straddling it stops at the count, one past it is empty and
sync_slots returns before reading a record; pinned with main's capped numbers (934,464 of
1,245,184). The existing heap_syncs_make_the_slots_whose_records_changed covers the below-count
path unchanged (needs a device, as it already does).

env -u DISPLAY -u WAYLAND_DISPLAY WINEDEBUG=-all wine \
  scratch/PrHeapCap/test/x86_64-pc-windows-msvc/debug/deps/victory_gpu-6dad26cd3f23c684.exe \
  --test-threads=1 descriptor::
test result: ok. 23 passed; 0 failed; 0 ignored; 0 measured; 210 filtered out

Clippy -p victory-gpu --all-targets -- -D warnings clean with and without --features diagnostics
(x86_64-pc-windows-msvc), cargo xtask policy ok, no formatting-only hunks against origin/main.
A device is needed to run the sync itself, so the clamp is pinned by a unit test of the range and
by the run below, not by a GPU test.

In game

Measured on an RTX 5090 (driver 620.73.04), Linux, GE-Proton11-14 Wine with its vkd3d-proton, GTA VI's opening prison yard, warm caches, diagnostics build, 420 s runs, medians of the last 30 frame-rate lines. The measured build is the same clamp on our test stack (main plus the unmerged PRs we need on NVIDIA under Wine; listed in #3425), where the host heap counts 762,920 slots; candidate and control alternated A-B-A-B.

control with the clamp
slots the sync reads per frame 463,995 272,778 (−41 %)
stale slots handed to mirror per frame 216,049 16,236 (−93 %)
heap sync (SyncHeapsUs) per frame 19.9 ms 16.3–18.6 ms (about −2.4 ms)
frame, mean of two runs each 223.3 ms 218.5 ms (within run-to-run spread)
pictures at frames 1700/2048 vs the adjacent control — 0.2–0.9 % of pixels off by more than 32 (same lighting)

The frame-time difference is inside our run-to-run spread, so the counters are the claim: the sync does about 40 % less reading and 93 % fewer refused mirror calls. The remaining heap-sync time is mostly waiting on the SHADER_HEAPS lock rather than per-slot work, which this PR doesn't touch. On that build the title slot past the host heap warning stopped appearing; the version here keeps one past-count mirror per sync on purpose, so on main it keeps firing as before.

Overlap with open PRs

gh pr list -R Marvisak/VIctory --state open --search "heap count" / "sync_slots" / "past the host heap": nothing open makes main's sync stop at the host's count as its own change.

  • #3055 (draft, "Part 3 of 3", queued behind #3139) rewrites sync_slots into sync_ranges and
    clamps each range at self.count there, keeping one past-cap mirror call for the warning. This
    PR is the same two clamps on main's code without the batching rewrite: it composes with
    #3139/#3055 rather than conflicting with them.
  • #3139 (Part 1) and #3356 batch and probe the page walk and do not clamp; #3475 turns the cap
    warning into counted statistics; #3052 clamps the read-mark scan, not the heap sync.

AI-assisted (Claude); measured on my machine, no game data shared.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5526304638 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3512). Originally posted by [neonbyte1](https://github.com/neonbyte1) on 2026-11-27T12:04:08Z. --- ## What's wrong `descriptor::sync_heaps` (`crates/victory-gpu/src/descriptor.rs:169` on `main`) takes each dirty 64 KiB page of a shader-visible heap the title writes as bytes and clamps its last slot at the **title's** descriptor count only: ```rust host.sync_slots(first as u32, last.min(u64::from(heap.desc.count)) as u32, start, step); // ^^^^^^^^^^^^^^^ the title's count, descriptor.rs:196 ``` `HostHeap::sync_slots` (`host.rs:695`) then reads every record in `first..last` (`host.rs:699`), compares each against the slot's `made` key, and calls `self.mirror` for the ones that differ (`host.rs:714`). `HostHeap::mirror` refuses every index at or past the host heap's count before it reads anything at all (`host.rs:723`). The host heap has fewer slots than the title's whenever the host caps its heaps (`host.rs:145-171`): on NVIDIA `CreateDescriptorHeap` refuses `count + DYNAMIC` and then `count + MIN_DYNAMIC`, and the cap branch (`host.rs:164`) keeps `count = PORTABLE_VIEWS - MIN_DYNAMIC` = **934,464** slots, while the title's heap is **1,245,184** slots (#2121, #3475). The last **310,720** title slots have no host slot, and the sync reads them and calls `mirror` on every one it finds stale, every frame. Measured on the same sync code on the `perf/best` lineage (run `0763-heapdirty1`; the host counted 762,920 slots there): of the 222 dirty pages a world frame marks (455,597 slots), **98 pages — 200,704 slots, 44 % — lay past the host's count, and every one of the ~200,000 `mirror` calls made nothing** (216,049 slots were stale; of the 254,608 scanned below the count, 15,345 — 6 % — needed making). `main` has no split heap: one `host: OnceLock<Option<host::HostHeap>>` per title heap (`descriptor.rs:59`), made with the title's count (`descriptor.rs:100`), so `host.count()` is the whole bound and there is no per-split arithmetic to redo. ## The fix Both places stop at `HostHeap::count()`: * `sync_heaps` clamps the page's slot range with `host::host_slots(host.count(), first, last)` before `sync_slots` reads anything, and the `SyncSlots` diagnostics counter counts the slots actually scanned instead of the title's. * `sync_slots` clamps again, and returns before the record read when a range is entirely past the count: the invariant does not depend on the caller. * `host_slots` is the one expression both use, and what the test pins. No behaviour change: `mirror` never made such a slot. The heap's highest title slot still goes to `mirror` once per heap per sync, so the `title slot past the host heap` warning (`host.rs:728`) keeps firing exactly as it does now (once per new highest index); what goes away is the record read and the refused `mirror` call for the other 310,719 slots. ## Tests `a_heap_sync_stops_at_the_host_heaps_count` (`descriptor/host.rs`, CPU only): a page below the count keeps the caller's range, one straddling it stops at the count, one past it is empty and `sync_slots` returns before reading a record; pinned with `main`'s capped numbers (934,464 of 1,245,184). The existing `heap_syncs_make_the_slots_whose_records_changed` covers the below-count path unchanged (needs a device, as it already does). ``` env -u DISPLAY -u WAYLAND_DISPLAY WINEDEBUG=-all wine \ scratch/PrHeapCap/test/x86_64-pc-windows-msvc/debug/deps/victory_gpu-6dad26cd3f23c684.exe \ --test-threads=1 descriptor:: test result: ok. 23 passed; 0 failed; 0 ignored; 0 measured; 210 filtered out ``` Clippy `-p victory-gpu --all-targets -- -D warnings` clean with and without `--features diagnostics` (x86_64-pc-windows-msvc), `cargo xtask policy` ok, no formatting-only hunks against `origin/main`. A device is needed to run the sync itself, so the clamp is pinned by a unit test of the range and by the run below, not by a GPU test. ## In game Measured on an RTX 5090 (driver 620.73.04), Linux, GE-Proton11-14 Wine with its vkd3d-proton, GTA VI's opening prison yard, warm caches, diagnostics build, 420 s runs, medians of the last 30 frame-rate lines. The measured build is the same clamp on our test stack (`main` plus the unmerged PRs we need on NVIDIA under Wine; listed in #3425), where the host heap counts 762,920 slots; candidate and control alternated A-B-A-B. | | control | with the clamp | |---|---|---| | slots the sync reads per frame | 463,995 | 272,778 (−41 %) | | stale slots handed to `mirror` per frame | 216,049 | 16,236 (−93 %) | | heap sync (`SyncHeapsUs`) per frame | 19.9 ms | 16.3–18.6 ms (about −2.4 ms) | | frame, mean of two runs each | 223.3 ms | 218.5 ms (within run-to-run spread) | | pictures at frames 1700/2048 vs the adjacent control | — | 0.2–0.9 % of pixels off by more than 32 (same lighting) | The frame-time difference is inside our run-to-run spread, so the counters are the claim: the sync does about 40 % less reading and 93 % fewer refused `mirror` calls. The remaining heap-sync time is mostly waiting on the `SHADER_HEAPS` lock rather than per-slot work, which this PR doesn't touch. On that build the `title slot past the host heap` warning stopped appearing; the version here keeps one past-count `mirror` per sync on purpose, so on `main` it keeps firing as before. ## Overlap with open PRs `gh pr list -R Marvisak/VIctory --state open --search "heap count" / "sync_slots" / "past the host heap"`: nothing open makes `main`'s sync stop at the host's count as its own change. * #3055 (draft, "Part 3 of 3", queued behind #3139) rewrites `sync_slots` into `sync_ranges` and clamps each range at `self.count` there, keeping one past-cap `mirror` call for the warning. This PR is the same two clamps on `main`'s code without the batching rewrite: it composes with #3139/#3055 rather than conflicting with them. * #3139 (Part 1) and #3356 batch and probe the page walk and do not clamp; #3475 turns the cap warning into counted statistics; #3052 clamps the read-mark scan, not the heap sync. _AI-assisted (Claude); measured on my machine, no game data shared._
KainanP commented 2026-11-27 12:31:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by KainanP on 2026-11-27T12:31:16Z.


@neonbyte1, contention numbers for this PR (1b11a72) against 63bcca4. The bench is the one from #3425; it would also fit your per-16-page-chunk version.

base #3512
game-shaped heap: 1,245,184 slots, host cap 934,464, the 200 pages drawn from the whole heap, 5 runs 7.9 ms 6.9 ms (−12 %)
title-thread wait per frame (same runs) 41.5 ms 36.3 ms
2^20 slots, pages only below the cap, 12 runs 9.6 ms 8.5 ms (noise level, as expected)

No views were lost or stale. The full victory-gpu suite on RTX fails only the two tests that main also fails here. #3055 has the same clamp in its sync_ranges (the past_cap mirror of the highest slot), so whichever of the two lands second will conflict there.

Bench: sync_contention_bench (#[ignore]d; commit f34bcfb8, cherry-picks onto any tree). A placed, write-watched view heap of 2^20 slots (the host heap caps it at 934,464 here). Each frame, one thread rewrites 200 random 64 KiB pages (50 changed records each) and runs one sync_heaps, while 5 title threads write a placed-buffer SRV every 20 µs into pages of their own. "Wait" is the title threads' time in view writes beyond the uncontended 2–3 µs, summed per frame. Release build, RTX 4060 Laptop, runs interleaved with the base, medians of 30 frames per run. The bench also checks that every view written before a sync is the slot's view address after it, and that every slot is right after a final quiet sync.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7218339456 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3512#issuecomment-7218339456). Originally posted by [KainanP](https://github.com/KainanP) on 2026-11-27T12:31:16Z. --- @neonbyte1, contention numbers for this PR (`1b11a72`) against `63bcca4`. The bench is the one from #3425; it would also fit your per-16-page-chunk version. | | base | #3512 | |---|---|---| | game-shaped heap: 1,245,184 slots, host cap 934,464, the 200 pages drawn from the whole heap, 5 runs | 7.9 ms | **6.9 ms** (−12 %) | | title-thread wait per frame (same runs) | 41.5 ms | 36.3 ms | | 2^20 slots, pages only below the cap, 12 runs | 9.6 ms | 8.5 ms (noise level, as expected) | No views were lost or stale. The full `victory-gpu` suite on RTX fails only the two tests that `main` also fails here. #3055 has the same clamp in its `sync_ranges` (the `past_cap` mirror of the highest slot), so whichever of the two lands second will conflict there. Bench: [`sync_contention_bench`](https://github.com/KainanP/VIctory/blob/bench/sync-heaps-contention/crates/victory-gpu/src/descriptor/sync_bench.rs) (`#[ignore]`d; commit `f34bcfb8`, cherry-picks onto any tree). A placed, write-watched view heap of 2^20 slots (the host heap caps it at 934,464 here). Each frame, one thread rewrites 200 random 64 KiB pages (50 changed records each) and runs one `sync_heaps`, while 5 title threads write a placed-buffer SRV every 20 µs into pages of their own. "Wait" is the title threads' time in view writes beyond the uncontended 2–3 µs, summed per frame. Release build, RTX 4060 Laptop, runs interleaved with the base, medians of 30 frames per run. The bench also checks that every view written before a sync is the slot's view address after it, and that every slot is right after a final quiet sync. _AI use: Claude Code (Claude Opus 5.5)._
cloph-dsp commented 2026-11-27 12:35:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-27T12:35:15Z.


Independent CPU-only verification of PR #3512 (Windows, Rust 1.100.0/MSVC, worktree-local CARGO_TARGET_DIR=D:\Victory-Contrib\target-3512-watch, CARGO_BUILD_JOBS=2, no game data).

  • Head: 1b11a72119ff16068b153d5a06895e646eefef04; merge base: 63bcca43c6a00a758510398fa43096ce7e4f7df0.
  • Exact test: cargo test --locked -p victory-gpu --lib -- descriptor::host::tests::a_heap_sync_stops_at_the_host_heaps_count --exact --test-threads=1 --quiet → test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out, exit 0 (2 pre-existing fetch_update deprecation warnings in object.rs).
  • Negative control: git grep -F -c a_heap_sync_stops_at_the_host_heaps_count 63bcca43 -- crates/victory-gpu/src/descriptor/host.rs → 0 hits, exit 1 (test is genuinely new).
  • git diff --check 63bcca43 HEAD → exit 0 (clean).

Only the named synthetic pure-CPU test was replayed; the actual sync_heaps device path was not exercised here. GPU/driver: N/A for this CPU test. AI-assisted (Hy4 flash). No game data, assets, shaders or DRM involved.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7218428488 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3512#issuecomment-7218428488). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-27T12:35:15Z. --- Independent CPU-only verification of PR #3512 (Windows, Rust 1.100.0/MSVC, worktree-local `CARGO_TARGET_DIR=D:\Victory-Contrib\target-3512-watch`, `CARGO_BUILD_JOBS=2`, no game data). - Head: `1b11a72119ff16068b153d5a06895e646eefef04`; merge base: `63bcca43c6a00a758510398fa43096ce7e4f7df0`. - Exact test: `cargo test --locked -p victory-gpu --lib -- descriptor::host::tests::a_heap_sync_stops_at_the_host_heaps_count --exact --test-threads=1 --quiet` → `test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out`, exit 0 (2 pre-existing `fetch_update` deprecation warnings in `object.rs`). - Negative control: `git grep -F -c a_heap_sync_stops_at_the_host_heaps_count 63bcca43 -- crates/victory-gpu/src/descriptor/host.rs` → 0 hits, exit 1 (test is genuinely new). - `git diff --check 63bcca43 HEAD` → exit 0 (clean). Only the named synthetic pure-CPU test was replayed; the actual `sync_heaps` device path was not exercised here. GPU/driver: N/A for this CPU test. AI-assisted (Hy4 flash). No game data, assets, shaders or DRM involved.
neonbyte1 commented 2026-11-27 12:43:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-27T12:43:40Z.


@cloph-dsp thanks for your feedback but Hy4 Flash likes to hallucinate and I don't want to verify every cheep model claim. Could you do that maybe with a better one?

<!-- greyfinch-sync:Marvisak/VIctory:comment:7218601053 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3512#issuecomment-7218601053). Originally posted by [neonbyte1](https://github.com/neonbyte1) on 2026-11-27T12:43:40Z. --- @cloph-dsp thanks for your feedback but Hy4 Flash likes to hallucinate and I don't want to verify every cheep model claim. Could you do that maybe with a better one?
passerbyyhx commented 2026-11-27 18:56:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-11-27T18:56:55Z.


Windows synthetic verification at 1b11a72119ff16068b153d5a06895e646eefef04.

On an RTX 4090 Laptop (621.14), a synthetic placed title heap of 1,245,184 slots naturally capped at 934,464. Using a freshly dirtied 64-KiB page at a time, the number of records actually visited on parent → head was 2048→2048 below the cap, 2048→576 on a straddling page and 2048→0 wholly past the cap. The diagnostic scan count agreed with the read loop. A byte-copied texture descriptor in the last valid slot (934,463) gave the expected 64/64 output words on both revisions. WARP with an injected cap of 3,073 in an 8,192-slot title heap gave 2048/1025/0 on head and the same 64/64 readback.

One diagnostic detail: after draining the initial dirty state and before any new page writes, head already reported slot 1,245,183 on the clean sync. Parent had no high-water warning there and subsequently reported 935,935 and 940,031 for the selected dirty pages. The head warning describes the heap extent and cannot on its own establish that the title wrote/read that high slot. This fixture measures work counts and pixel correctness, not frame time.

Reproducible fixture. GTA-VI-3/EIGHT-20261127. AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7226034111 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3512#issuecomment-7226034111). Originally posted by [passerbyyhx](https://github.com/passerbyyhx) on 2026-11-27T18:56:55Z. --- Windows synthetic verification at `1b11a72119ff16068b153d5a06895e646eefef04`. On an RTX 4090 Laptop (621.14), a synthetic placed title heap of 1,245,184 slots naturally capped at 934,464. Using a freshly dirtied 64-KiB page at a time, the number of records actually visited on parent → head was 2048→2048 below the cap, 2048→576 on a straddling page and 2048→0 wholly past the cap. The diagnostic scan count agreed with the read loop. A byte-copied texture descriptor in the last valid slot (934,463) gave the expected 64/64 output words on both revisions. WARP with an injected cap of 3,073 in an 8,192-slot title heap gave 2048/1025/0 on head and the same 64/64 readback. One diagnostic detail: after draining the initial dirty state and before any new page writes, head already reported slot 1,245,183 on the clean sync. Parent had no high-water warning there and subsequently reported 935,935 and 940,031 for the selected dirty pages. The head warning describes the heap extent and cannot on its own establish that the title wrote/read that high slot. This fixture measures work counts and pixel correctness, not frame time. [Reproducible fixture](https://github.com/passerbyyhx/VIctory/commit/14ff1d60303ac55006f24bfa89ff0c19c071b277). GTA-VI-3/EIGHT-20261127. AI-assisted with Codex.
neonbyte1 commented 2026-11-27 19:23:48 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-27T19:23:48Z.


@passerbyyhx thanks for the verification, and good catch on the warning. You're right: after the change the sync called mirror with the heap's last slot whenever the title heap is larger than the host's, so the warning described the heap's extent, not a write.

Fixed in 004185a3: the sync now remembers the highest slot of a page the title actually wrote past the host heap's count, and only reports that one (nothing when no such page was synced). The resolution is a page: the slot reported is the last one of a written 64 KiB page, the same granularity the parent's high-water mark had. Clippy (-D warnings, with and without diagnostics), formatting and descriptor:: tests (23/23) are clean; I haven't rerun your fixture.

AI-assisted (Claude); no game data shared.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7226485303 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3512#issuecomment-7226485303). Originally posted by [neonbyte1](https://github.com/neonbyte1) on 2026-11-27T19:23:48Z. --- @passerbyyhx thanks for the verification, and good catch on the warning. You're right: after the change the sync called `mirror` with the heap's last slot whenever the title heap is larger than the host's, so the warning described the heap's extent, not a write. Fixed in `004185a3`: the sync now remembers the highest slot of a page the title actually wrote past the host heap's count, and only reports that one (nothing when no such page was synced). The resolution is a page: the slot reported is the last one of a written 64 KiB page, the same granularity the parent's high-water mark had. Clippy (`-D warnings`, with and without `diagnostics`), formatting and `descriptor::` tests (23/23) are clean; I haven't rerun your fixture. _AI-assisted (Claude); no game data shared._
passerbyyhx commented 2026-11-28 07:54:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-11-28T07:54:40Z.


I reran the original capped-heap fixture on 004185a39bc6754ac49e2c7d49fcce0a2efa9ca5. The clean-sync warning reported in my previous run is fixed on both adapters. I added one test-only print inside the existing high-water warning branch to count fresh emissions separately from the retained high-water value.

Adapter and cap Records visited on clean / below / straddling / past / clean again New warning indices, in order Last valid texture slot
RTX 4090 Laptop, driver 621.14, natural cap 934,464 of 1,245,184 0 / 2,048 / 576 / 0 / 0 935,935 then 940,031 934,463
Microsoft WARP, injected cap 3,073 of 8,192 0 / 2,048 / 1,025 / 0 / 0 4,095 then 8,191 3,072

On each adapter only the straddling and wholly past-cap writes emitted a warning. The reported index was the last slot of the corresponding dirty page. The final clean sync retained the previous high-water value with zero new emissions. The diagnostic slot counter matched the actual record-read count at every step. Sampling the byte-copied texture descriptor in the last valid slot returned all 64 expected words (1,066 through 1,129) on both adapters.

GTA-VI-3 / AU-20261127-08X. AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7236239694 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3512#issuecomment-7236239694). Originally posted by [passerbyyhx](https://github.com/passerbyyhx) on 2026-11-28T07:54:40Z. --- I reran the [original capped-heap fixture](https://github.com/passerbyyhx/VIctory/commit/14ff1d60303ac55006f24bfa89ff0c19c071b277) on `004185a39bc6754ac49e2c7d49fcce0a2efa9ca5`. The clean-sync warning reported in [my previous run](https://github.com/Marvisak/VIctory/pull/3512#issuecomment-7226034111) is fixed on both adapters. I added one test-only print inside the existing high-water warning branch to count fresh emissions separately from the retained high-water value. | Adapter and cap | Records visited on clean / below / straddling / past / clean again | New warning indices, in order | Last valid texture slot | | --- | --- | --- | --- | | RTX 4090 Laptop, driver 621.14, natural cap 934,464 of 1,245,184 | 0 / 2,048 / 576 / 0 / 0 | 935,935 then 940,031 | 934,463 | | Microsoft WARP, injected cap 3,073 of 8,192 | 0 / 2,048 / 1,025 / 0 / 0 | 4,095 then 8,191 | 3,072 | On each adapter only the straddling and wholly past-cap writes emitted a warning. The reported index was the last slot of the corresponding dirty page. The final clean sync retained the previous high-water value with zero new emissions. The diagnostic slot counter matched the actual record-read count at every step. Sampling the byte-copied texture descriptor in the last valid slot returned all 64 expected words (1,066 through 1,129) on both adapters. GTA-VI-3 / AU-20261127-08X. AI-assisted with Codex.
neonbyte1 commented 2026-11-28 07:59:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-28T07:59:18Z.


@passerbyyhx thanks for the rerun on both adapters. It confirms the fix in 004185a3: a clean sync no longer emits a warning, only the straddling and past-cap pages do, the first report on each is their page's last slot, and the last valid slot still samples correctly. Nothing else is open on my side for this PR.

AI-assisted (Claude); no game data shared.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7236287809 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3512#issuecomment-7236287809). Originally posted by [neonbyte1](https://github.com/neonbyte1) on 2026-11-28T07:59:18Z. --- @passerbyyhx thanks for the rerun on both adapters. It confirms the fix in `004185a3`: a clean sync no longer emits a warning, only the straddling and past-cap pages do, the first report on each is their page's last slot, and the last valid slot still samples correctly. Nothing else is open on my side for this PR. _AI-assisted (Claude); no game data shared._
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3512:upstream-pr/3512'
git switch 'upstream-pr/3512'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3512'
git switch 'upstream-pr/3512'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3512'
git switch 'upstream-pr/3512'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3512'
git switch 'main'
git merge --squash 'upstream-pr/3512'
git switch 'main'
git merge --ff-only 'upstream-pr/3512'
git switch 'main'
git merge 'upstream-pr/3512'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!3512
No description provided.