gpu: keep small mip tiles without room and track allocations past cap #192

Closed
Androtim wants to merge 0 commits from upstream-pr/192 into main
Androtim commented 2026-11-30 03:26:49 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-30T03:26:49Z.


Summary

  • Allow Tiled::give to keep allocating up to VICTORY_LEVELS_SMALL_TILES (default 8, covering packed tail + smallest mips via small_held / small_levels) even when host VRAM room is tight, preventing unbacked textures from sampling black when large-mip uploads wait.
  • Track own_card_bytes() in Host::video_memory with use_past_the_cap / past_the_cap so drivers/layers that clamp reported CurrentUsage at the DXGI budget still expose allocations made past the cap to residency guards.
  • Added unit tests tiles::tests::without_room_the_smallest_held_levels_still_get_tiles and host::tests::use_at_the_budget_counts_what_the_layer_made_since, and updated tiles::tests::card_wrote_failure_does_not_poison_card_mask so held level 1 exceeds small_tiles() when testing room == false.

Verification

  • cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy (311 files ok)
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu tiles:: -- --test-threads=1 (8 passed; 0 failed; 1 ignored)
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu host::tests::use_at_the_budget -- --test-threads=1 (1 passed; 0 failed)
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings
  • Live 75s Series S verification (PlayParity): all 6 gates PASS, median 12.55 fps (min 5.3 fps, preparing 35.85 ms, max_draws=12464), used_max=6565 MB / budget_min=6868 MB (over=0 MB, room_false=66.7%), final_waiting=1700, mapped_rate=7.86 ms/s, bakes=8 (failed=0), lit=20/24 (luma=103.0, near_black=0.0%, magenta=0.0%), 0 crashes; late captured PNGs visually verified crisp.
  • Live 75s Series X 1440p verification (PlayParity): median 10.5 fps (preparing 38.8 ms, min 4.4 fps), lit=18/24 (luma=104.35, near_black=0.01%, edge_energy=7.83, magenta=0.0%), 0 crashes; late captured PNGs visually verified crisp.
<!-- greyfinch-sync:Androtim/MiniVI:issue:5558428613 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/192). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-30T03:26:49Z. --- ## Summary - Allow `Tiled::give` to keep allocating up to `VICTORY_LEVELS_SMALL_TILES` (default `8`, covering packed tail + smallest mips via `small_held` / `small_levels`) even when host VRAM room is tight, preventing unbacked textures from sampling black when large-mip uploads wait. - Track `own_card_bytes()` in `Host::video_memory` with `use_past_the_cap` / `past_the_cap` so drivers/layers that clamp reported `CurrentUsage` at the DXGI budget still expose allocations made past the cap to residency guards. - Added unit tests `tiles::tests::without_room_the_smallest_held_levels_still_get_tiles` and `host::tests::use_at_the_budget_counts_what_the_layer_made_since`, and updated `tiles::tests::card_wrote_failure_does_not_poison_card_mask` so held level 1 exceeds `small_tiles()` when testing `room == false`. ## Verification - `cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy` (`311 files ok`) - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu tiles:: -- --test-threads=1` (`8 passed; 0 failed; 1 ignored`) - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu host::tests::use_at_the_budget -- --test-threads=1` (`1 passed; 0 failed`) - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings` - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings` - Live 75s Series S verification (`PlayParity`): **all 6 gates PASS**, median `12.55 fps` (`min 5.3 fps`, `preparing 35.85 ms`, `max_draws=12464`), `used_max=6565 MB / budget_min=6868 MB` (`over=0 MB`, `room_false=66.7%`), `final_waiting=1700`, `mapped_rate=7.86 ms/s`, `bakes=8` (`failed=0`), `lit=20/24` (`luma=103.0`, `near_black=0.0%`, `magenta=0.0%`), `0` crashes; late captured PNGs visually verified crisp. - Live 75s Series X 1440p verification (`PlayParity`): median `10.5 fps` (`preparing 38.8 ms`, `min 4.4 fps`), `lit=18/24` (`luma=104.35`, `near_black=0.01%`, `edge_energy=7.83`, `magenta=0.0%`), `0` crashes; late captured PNGs visually verified crisp.
Androtim commented 2026-11-30 07:33:30 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-30T07:33:30Z.


CI check is failing (FAILURE); marking triage: needs work so it can be fixed before GPU testing.

<!-- greyfinch-sync:Androtim/MiniVI:comment:7271866823 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/192#issuecomment-7271866823). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-30T07:33:30Z. --- CI check is failing (`FAILURE`); marking `triage: needs work` so it can be fixed before GPU testing.
Androtim commented 2026-11-30 10:02:50 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-30T10:02:50Z.


Automated triage for the maintainers (not an approval).

Verdict: needs-rebase · CI (check): failing

This PR no longer merges cleanly into main.

To change the verdict: Rebase onto current main and resolve conflicts; CI and triage will run again automatically.


Generated with Antigravity CLI (agy).

<!-- greyfinch-sync:Androtim/MiniVI:comment:7275040924 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/192#issuecomment-7275040924). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-30T10:02:50Z. --- <!-- minivi-triage v1 head=37830ac2d4d6289c0457fe0cd6b490a83b9380b5 verdict=needs-rebase ci=failing at=2026-11-30T10:03:23Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-rebase` · **CI (`check`):** `failing` This PR no longer merges cleanly into `main`. **To change the verdict:** Rebase onto current `main` and resolve conflicts; CI and triage will run again automatically. --- _Generated with Antigravity CLI (`agy`)._
Androtim commented 2026-12-01 01:39:03 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-01T01:39:03Z.


Closing stale/conflicted backlog PR per #276. Superseded by the active root-architecture replacement pillars with isolated plain --release A/B verification.

<!-- greyfinch-sync:Androtim/MiniVI:comment:7297739615 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/192#issuecomment-7297739615). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-01T01:39:03Z. --- Closing stale/conflicted backlog PR per #276. Superseded by the active root-architecture replacement pillars with isolated plain --release A/B verification.

Pull request closed

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
Androtim/MiniVI!192
No description provided.