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

Open
fuzeofficlal wants to merge 1 commit from upstream-pr/1449 into main
fuzeofficlal commented 2026-11-24 18:05:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-24T18:05:51Z.


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.
<!-- greyfinch-sync:Marvisak/VIctory:issue:6588268395 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1449). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-24T18:05:51Z. --- 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.
Marvisak commented 2026-11-25 02:06:06 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:28:40Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149590279 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1449#issuecomment-7149590279). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T01:28:40Z. --- <!-- 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)_
fuzeofficlal commented 2026-11-25 11:05:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T10:39:24Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7159994613 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1449#issuecomment-7159994613). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-25T10:39:24Z. --- 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 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/1449:upstream-pr/1449'
git switch 'upstream-pr/1449'

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/1449'
git switch 'upstream-pr/1449'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1449'
git switch 'upstream-pr/1449'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1449'
git switch 'main'
git merge --squash 'upstream-pr/1449'
git switch 'main'
git merge --ff-only 'upstream-pr/1449'
git switch 'main'
git merge 'upstream-pr/1449'
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!1448
No description provided.