GPU: report the view heap sizes when the host caps one #35

Closed
github-bot wants to merge 1 commit from gh-pr/35/head into gh-pr/35/base
Owner

@⁠WallasSCRIPTS on GitHub · 2026-11-23 23:28 UTC · original
WallasSCRIPTS:gpu/view-heap-past-report → main · +92 −2 · 2 files · 1 commits · closed without merging

Relates to #16 and #11.

What

When the host cannot make a view heap as large as the title asked for, it
caps it and keeps PORTABLE_VIEWS - DYNAMIC slots. The warning named only
the resulting size, so the number of title slots lost was invisible. This
reports three numbers at creation: what the title asked for, what the host
made, and the difference.

The earlier version of this PR also reported out-of-range reads from
mirror(). On main, mirror() already logs the highest past-heap slot,
and #21 remaps the root tables that reach past the cap. Two reports of the
same reads would overlap, so that part is gone. One report, one place.

Doc corrections

docs/view-heap-limit.md now reflects #21 landing: root tables are made
afresh in the dynamic area, State::tables does that when a table holds a
constant buffer or an entry past the host heap (there is no 16-descriptor
rule), and #16 is the RTX 5070 Ti report, not the RX 7600 this was built on.
The sampler heap's 2,048-entry limit is left for a separate issue.

Verification

Static review only; no NVIDIA host here.

  • Rebased onto main at 97c78d1, after #21 landed.
  • cargo check -p victory-gpu --all-targets: clean.
  • cargo test -p victory-gpu: 36 passed, 0 failed.
  • The changed hunk is rustfmt --edition 2024 clean; the file has
    pre-existing formatting drift elsewhere.
**@⁠WallasSCRIPTS** on GitHub · 2026-11-23 23:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/35) `WallasSCRIPTS:gpu/view-heap-past-report` → `main` · +92 −2 · 2 files · 1 commits · closed without merging Relates to #16 and #11. ## What When the host cannot make a view heap as large as the title asked for, it caps it and keeps `PORTABLE_VIEWS - DYNAMIC` slots. The warning named only the resulting size, so the number of title slots lost was invisible. This reports three numbers at creation: what the title asked for, what the host made, and the difference. The earlier version of this PR also reported out-of-range reads from `mirror()`. On `main`, `mirror()` already logs the highest past-heap slot, and #21 remaps the root tables that reach past the cap. Two reports of the same reads would overlap, so that part is gone. One report, one place. ## Doc corrections `docs/view-heap-limit.md` now reflects #21 landing: root tables are made afresh in the dynamic area, `State::tables` does that when a table holds a constant buffer or an entry past the host heap (there is no 16-descriptor rule), and #16 is the RTX 5070 Ti report, not the RX 7600 this was built on. The sampler heap's 2,048-entry limit is left for a separate issue. ## Verification Static review only; no NVIDIA host here. - Rebased onto `main` at `97c78d1`, after #21 landed. - `cargo check -p victory-gpu --all-targets`: clean. - `cargo test -p victory-gpu`: 36 passed, 0 failed. - The changed hunk is `rustfmt --edition 2024` clean; the file has pre-existing formatting drift elsewhere.
The cap warning only said how many descriptors the host made, so a capped
NVIDIA heap gave no clue how many title slots were lost. Report what the
title asked for, what the host made, and the difference.

This replaces the earlier per-read report: main now logs the highest
past-heap slot in mirror() and #21 remaps the root tables that reach it,
so a second report of the same reads would only overlap.

docs/view-heap-limit.md is updated for #21 landing: root tables are
remapped, State::tables makes tables afresh for a CBV or a past-cap entry
(no descriptor-count rule), and #16 is an RTX 5070 Ti. The sampler heap's
2,048 limit is left as a separate issue.

Verified with cargo check -p victory-gpu --all-targets and cargo test
-p victory-gpu (36 passed).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:47:23 +00:00
github-bot closed this pull request 2026-11-26 03:47:23 +00:00
Author
Owner

@⁠Sunkiller-qc on GitHub · 2026-11-23 23:46 UTC · original

Thanks, the heap-creation report (asked for / made / lost) is useful. Since #21 landed, mirror() already logs the highest past-heap slot (main descriptor/host.rs:312), so this conflicts and the two reports would overlap. Picking one would help. A few things in docs/view-heap-limit.md look outdated or off: lines 14-15 say nothing remaps, but #21 now remaps tables; line 25 says draw::tables copies "tables holding more than 16 descriptors", but it makes tables afresh when they hold a CBV or reach past the cap (there's no 16-descriptor rule); and line 68 puts the "machine that filed #16" as an RX 7600, while the PR text says #16 is an RTX 5070 Ti. The note that a sampler heap over 2,048 makes HostHeap::new return None is a good catch and might deserve its own issue. Static review, not built or run.

**@⁠Sunkiller-qc** on GitHub · 2026-11-23 23:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/35#issuecomment-7117354135) Thanks, the heap-creation report (asked for / made / lost) is useful. Since #21 landed, `mirror()` already logs the highest past-heap slot (main `descriptor/host.rs:312`), so this conflicts and the two reports would overlap. Picking one would help. A few things in `docs/view-heap-limit.md` look outdated or off: lines 14-15 say nothing remaps, but #21 now remaps tables; line 25 says `draw::tables` copies "tables holding more than 16 descriptors", but it makes tables afresh when they hold a CBV or reach past the cap (there's no 16-descriptor rule); and line 68 puts the "machine that filed #16" as an RX 7600, while the PR text says #16 is an RTX 5070 Ti. The note that a sampler heap over 2,048 makes `HostHeap::new` return `None` is a good catch and might deserve its own issue. Static review, not built or run.
Author
Owner

@⁠WallasSCRIPTS on GitHub · 2026-11-24 00:02 UTC · original

Picked one: dropped the per-read report and kept the creation-time sizes
(asked for / made / lost). mirror() on main stays the single report for
past-heap slots.

Rebased onto 97c78d1 after #21 landed. The doc now says root tables are
remapped, describes State::tables correctly (CBV or a past-cap entry, no
descriptor-count rule), and attributes #16 to the RTX 5070 Ti. The
sampler-heap > 2,048 failure will go in its own issue.

cargo check -p victory-gpu --all-targets clean, cargo test -p victory-gpu
36 passed. Static only, as you noted — no NVIDIA host here to see the line
fire. Thanks for the review.

**@⁠WallasSCRIPTS** on GitHub · 2026-11-24 00:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/35#issuecomment-7117643713) Picked one: dropped the per-read report and kept the creation-time sizes (asked for / made / lost). `mirror()` on `main` stays the single report for past-heap slots. Rebased onto `97c78d1` after #21 landed. The doc now says root tables are remapped, describes `State::tables` correctly (CBV or a past-cap entry, no descriptor-count rule), and attributes #16 to the RTX 5070 Ti. The sampler-heap > 2,048 failure will go in its own issue. `cargo check -p victory-gpu --all-targets` clean, `cargo test -p victory-gpu` 36 passed. Static only, as you noted — no NVIDIA host here to see the line fire. Thanks for the review.
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 00:58 UTC · original

Tested df40f86 under Wine 11.22 + vkd3d-proton 3.1 on Arch Linux x86_64 (AMD RX 9060 XT, RADV 26.3.1), Windows build with cargo xwin ... --target x86_64-pc-windows-msvc: pass, no regression.\n\n- victory_gpu: 36 passed, 3 failed — the same three environment-only failures as main (argument_clamp_builds, a_rejected_blob_gives_an_empty_library, #128's VirtualQuery upload skip).\n\nNo game data used. AI-assisted (DeepSeek V4.1 Flash coding agent).

**@⁠DaviTostes** on GitHub · 2026-11-24 00:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/35#issuecomment-7118625120) Tested `df40f86` under **Wine 11.22 + vkd3d-proton 3.1** on Arch Linux x86_64 (AMD RX 9060 XT, RADV 26.3.1), Windows build with `cargo xwin ... --target x86_64-pc-windows-msvc`: **pass, no regression**.\n\n- `victory_gpu`: **36 passed, 3 failed** — the same three environment-only failures as `main` (`argument_clamp_builds`, `a_rejected_blob_gives_an_empty_library`, #128's `VirtualQuery` upload skip).\n\nNo game data used. AI-assisted (DeepSeek V4.1 Flash coding agent).
Author
Owner

@⁠Sunkiller-qc on GitHub · 2026-11-24 01:05 UTC · original

Thanks, the new version reads well, and the doc matches main now.

One small heads-up: if #135 lands, the capped heap keeps PORTABLE_VIEWS - DYNAMIC_CAPPED title slots, while made = PORTABLE_VIEWS - extra (descriptor/host.rs:97) still uses DYNAMIC, so the logged numbers would be off. Whichever merges second should adjust that line.

Static review, not built or run.

**@⁠Sunkiller-qc** on GitHub · 2026-11-24 01:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/35#issuecomment-7118751128) Thanks, the new version reads well, and the doc matches main now. One small heads-up: if #135 lands, the capped heap keeps `PORTABLE_VIEWS - DYNAMIC_CAPPED` title slots, while `made = PORTABLE_VIEWS - extra` (`descriptor/host.rs:97`) still uses `DYNAMIC`, so the logged numbers would be off. Whichever merges second should adjust that line. Static review, not built or run.
Author
Owner

@⁠WallasSCRIPTS on GitHub · 2026-11-24 01:36 UTC · original

Superseded by #21 (merged), which makes tables past a capped host view heap afresh: the hang this diagnosed is now fixed rather than logged, so the reporting here has nothing left to say on a capped heap.

This branch is more than a hundred commits behind main. Its one piece nothing else carries is docs/view-heap-limit.md, the reasoning about SM 6.6 directly indexed heaps (ResourceDescriptorHeap): two heaps do not merge into one index space, so the remap that works for root descriptor tables cannot serve indices past the cap there. Nothing hits that path today; the note stands if something does. Closing rather than rebasing a log line.

**@⁠WallasSCRIPTS** on GitHub · 2026-11-24 01:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/35#issuecomment-7119268926) Superseded by #21 (merged), which makes tables past a capped host view heap afresh: the hang this diagnosed is now fixed rather than logged, so the reporting here has nothing left to say on a capped heap. This branch is more than a hundred commits behind main. Its one piece nothing else carries is `docs/view-heap-limit.md`, the reasoning about SM 6.6 directly indexed heaps (`ResourceDescriptorHeap`): two heaps do not merge into one index space, so the remap that works for root descriptor tables cannot serve indices past the cap there. Nothing hits that path today; the note stands if something does. Closing rather than rebasing a log line.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!35
No description provided.