GPU: report host resources held by descriptor heap slots in diagnostics #1449

Open
github-bot wants to merge 1 commit from github-bot/gh-1449 into main AGit
Owner

@⁠fuzeofficlal on GitHub · 2026-11-24 18:05 UTC · original
fuzeofficlal:feat/diagnostics-heap-slot-host-resource-895 → main · +235 −17 · 3 files · 1 commits · open

Fixes #895.

Summary

  • Add HostHeap::slot_host / describe_resource (#[cfg(feature = "diagnostics")]) and include the underlying ID3D12Resource summary (host 2d WxH fFMT mips M, host 3d ..., host buffer 0x...B, or host none) in HostHeap::describe_slot (including dynamic and stale slots) and State::reads without eagerly allocating uncreated host heaps.

Verification

  • Added describe_slot_reports_missing_and_live_host_resources testing null, unbacked, committed 2D multi-mip texture, dynamic, stale/released, and buffer slots under VICTORY_D3D12_DEBUG=1 on NVIDIA GeForce RTX 5090 and Microsoft D3D12 WARP.
  • cargo clippy --workspace --all-targets --all-features and cargo xtask policy: passed.
**@⁠fuzeofficlal** on GitHub · 2026-11-24 18:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/1449) `fuzeofficlal:feat/diagnostics-heap-slot-host-resource-895` → `main` · +235 −17 · 3 files · 1 commits · open Fixes #895. ### Summary - Add `HostHeap::slot_host` / `describe_resource` (`#[cfg(feature = "diagnostics")]`) and include the underlying `ID3D12Resource` summary (`host 2d WxH fFMT mips M`, `host 3d ...`, `host buffer 0x...B`, or `host none`) in `HostHeap::describe_slot` (including dynamic and stale slots) and `State::reads` without eagerly allocating uncreated host heaps. ### Verification - Added `describe_slot_reports_missing_and_live_host_resources` testing null, unbacked, committed 2D multi-mip texture, dynamic, stale/released, and buffer slots under `VICTORY_D3D12_DEBUG=1` on **NVIDIA GeForce RTX 5090** and **Microsoft D3D12 WARP**. - `cargo clippy --workspace --all-targets --all-features` and `cargo xtask policy`: passed.
Extend HostHeap::describe_slot (and per-draw table read traces in State::reads) under the diagnostics feature to report the underlying ID3D12Resource held by the slot (dimension, size, DXGI format, and mip count, or host none when empty), covering mirrored, stale, and dynamic descriptor slots.

Co-authored-by: rpmaster2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:32:10 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:28 UTC · original · edited 2026-11-26 01:19 UTC

Automated triage for the maintainers.

Still a merge candidate. The new head 25a6030 is the same change rebased onto current main as one commit. It is diagnostics only. HostHeap::describe_slot and HostHeap::slot_host (descriptor/host.rs) name the host ID3D12Resource that a slot keeps. They also cover dynamic and stale slots. State::reads (draw.rs) finds the heap through heap_of/Heap::index and reads it through the new Heap::existing_host, so it no longer creates a host heap as a side effect. I checked the index handling against main's HostHeap::new, where made has count entries and kept has count + extra. A title handle maps only below count, so the new dynamic branch is never reached from State::reads. The branch merges cleanly, and CI (check) passes on this head.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/1449#issuecomment-7149590279) · edited 2026-11-26 01:19 UTC <!-- victory-triage v1 head=25a60307f5de2956a55f359b842abc7c2025c331 verdict=merge-candidate at=2026-11-26T01:19:02Z --> Automated triage for the maintainers. **Still a merge candidate.** The new head `25a6030` is the same change rebased onto current `main` as one commit. It is diagnostics only. `HostHeap::describe_slot` and `HostHeap::slot_host` (`descriptor/host.rs`) name the host `ID3D12Resource` that a slot keeps. They also cover dynamic and stale slots. `State::reads` (`draw.rs`) finds the heap through `heap_of`/`Heap::index` and reads it through the new `Heap::existing_host`, so it no longer creates a host heap as a side effect. I checked the index handling against main's `HostHeap::new`, where `made` has `count` entries and `kept` has `count + extra`. A title handle maps only below `count`, so the new `dynamic` branch is never reached from `State::reads`. The branch merges cleanly, and CI (`check`) passes on this head. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 10:39 UTC · original

Amended commit message in cfbdee2b (no code change, tree identical to 7d8720f1) to add Co-authored-by credit for @⁠rpmaster2 from #895.

**@⁠fuzeofficlal** on GitHub · 2026-11-25 10:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/1449#issuecomment-7159994613) Amended commit message in `cfbdee2b` (no code change, tree identical to `7d8720f1`) to add `Co-authored-by` credit for @⁠rpmaster2 from #895.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1449/head:github-bot/gh-1449'
git switch 'github-bot/gh-1449'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1449'
git switch 'github-bot/gh-1449'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1449'
git switch 'github-bot/gh-1449'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1449'
git switch 'main'
git merge --squash 'github-bot/gh-1449'
git switch 'main'
git merge --ff-only 'github-bot/gh-1449'
git switch 'main'
git merge 'github-bot/gh-1449'
git push origin 'main'
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!1449
No description provided.