gpu(host,memory): log DXGI removal reason/VRAM and track BVH compacted-size slots #519

Open
hingeowl wants to merge 1 commit from hingeowl/Darner:pr/dxgi-removal-bvh-slots into Main
Contributor

What it changes

  • The problem on main: device-removal diagnostics do not log the decoded DXGI removal reason name and host.log_video_memory() together at removal time, and BVH compacted-size slots lack per-submission readiness tracking.
  • Ported from leonida/mandy (1bc561dd1d, e94d9d5c13..8ae981c7c1):
    • Logs the DXGI removal reason name and host.log_video_memory() on device removal in crates/darner-gpu/src/host.rs (preserving Darner's existing 3 s log_removal_context wait).
    • Adds per-submission BVH compacted-size slot readiness tracking in crates/darner-gpu/src/memory.rs (DARNER_BVH_SIZES_WAIT, active only when DARNER_BVH_BUILDER=1), with unit tests.

How it was tested

  • Tested revision: c7cbcc9 (based on main c8258f9)
  • Commands and results:
    • cargo xtask policy — pass
    • cargo clippy --workspace --all-targets --locked -- -D warnings — pass
    • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings — pass
    • cargo test -p darner-gpu --locked — pass
  • Changes a default: diagnostic logging on device removal; BVH compacted-size slot readiness tracking is active only with DARNER_BVH_BUILDER=1 (DARNER_BVH_SIZES_WAIT).
  • A/B result: diagnostic / RT correctness change; ran clean in cam-city60 (RTX 4090 + Ryzen 9 7950X3D, Series X, HW RT) as part of our integration branch.
  • Gates run on that revision: cargo xtask policy, both workspace clippy gates, cargo test -p darner-gpu --locked.
  • Hardware dependence: likely general.
  • Coverage gaps: standalone A/B run not recorded.

Checklist

  • I ran this change in the game.
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #452 (DARNER_HW_RT_COMPACT)
  • Replaces or overlaps: none found
## What it changes - The problem on main: device-removal diagnostics do not log the decoded DXGI removal reason name and `host.log_video_memory()` together at removal time, and BVH compacted-size slots lack per-submission readiness tracking. - Ported from `leonida/mandy` (`1bc561dd1d`, `e94d9d5c13..8ae981c7c1`): - Logs the DXGI removal reason name and `host.log_video_memory()` on device removal in `crates/darner-gpu/src/host.rs` (preserving Darner's existing 3 s `log_removal_context` wait). - Adds per-submission BVH compacted-size slot readiness tracking in `crates/darner-gpu/src/memory.rs` (`DARNER_BVH_SIZES_WAIT`, active only when `DARNER_BVH_BUILDER=1`), with unit tests. ## How it was tested - Tested revision: `c7cbcc9` (based on `main` `c8258f9`) - Commands and results: - `cargo xtask policy` — pass - `cargo clippy --workspace --all-targets --locked -- -D warnings` — pass - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` — pass - `cargo test -p darner-gpu --locked` — pass - Changes a default: diagnostic logging on device removal; BVH compacted-size slot readiness tracking is active only with `DARNER_BVH_BUILDER=1` (`DARNER_BVH_SIZES_WAIT`). - A/B result: diagnostic / RT correctness change; ran clean in `cam-city60` (RTX 4090 + Ryzen 9 7950X3D, Series X, HW RT) as part of our integration branch. - Gates run on that revision: `cargo xtask policy`, both workspace `clippy` gates, `cargo test -p darner-gpu --locked`. - Hardware dependence: likely general. - Coverage gaps: standalone A/B run not recorded. ## Checklist - [x] I ran this change in the game. - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #452 (`DARNER_HW_RT_COMPACT`) - Replaces or overlaps: none found
Ported from Mandy:
- DXGI removal reason name and host.log_video_memory() on device removal
  (Darner already has the 3 s log_removal_context thread wait).
- Per-submission BVH compacted-size slot readiness tracking (DARNER_BVH_SIZES_WAIT,
  active only with DARNER_BVH_BUILDER=1).

Upstream-Repository: https://git.leonida.now/leonida/mandy
Upstream-Commit: 1bc561dd1d, e94d9d5c13..8ae981c7c1
Integration-Base: 6134402
Validation: cargo test --locked -p darner-gpu --lib memory:: (passed)
TrustNo1 changed title from [pr-diagnostics][RAYTRACING] gpu(host,memory): log DXGI removal reason/VRAM and track BVH compacted-size slots to gpu(host,memory): log DXGI removal reason/VRAM and track BVH compacted-size slots 2026-12-06 03:27:43 +00:00
Owner

Test needed — commit c7cbcc98; what to check:

  • The problem on main: device-removal diagnostics do not log the decoded DXGI removal reason name and host.log_video_memory() together at removal time, and BVH compacted-size slots lack per-submission readiness tracking.
  • Ported from leonida/mandy (1bc561dd1d, e94d9d5c13..8ae981c7c1):
    • Logs the DXGI removal reason name and host.log_video_memory() on device removal in crates/darner-gpu/src/host.rs (preserving Darner's existing 3 s log_removal_context wait).
    • Adds per-submission BVH compacted-size slot readiness tracking in crates/darner-gpu/src/memory.rs (DARNER_BVH_SIZES_WAIT, active only when DARNER_BVH_BUILDER=1), with unit tests.

Evidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture.

Reply testing to take this run; it's free again after 24 h with no results.

**Test needed** — commit `c7cbcc98`; what to check: - The problem on main: device-removal diagnostics do not log the decoded DXGI removal reason name and `host.log_video_memory()` together at removal time, and BVH compacted-size slots lack per-submission readiness tracking. - Ported from `leonida/mandy` (`1bc561dd1d`, `e94d9d5c13..8ae981c7c1`): - Logs the DXGI removal reason name and `host.log_video_memory()` on device removal in `crates/darner-gpu/src/host.rs` (preserving Darner's existing 3 s `log_removal_context` wait). - Adds per-submission BVH compacted-size slot readiness tracking in `crates/darner-gpu/src/memory.rs` (`DARNER_BVH_SIZES_WAIT`, active only when `DARNER_BVH_BUILDER=1`), with unit tests. Evidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture. Reply `testing` to take this run; it's free again after 24 h with no results.
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 'pr/dxgi-removal-bvh-slots:hingeowl-pr/dxgi-removal-bvh-slots'
git switch 'hingeowl-pr/dxgi-removal-bvh-slots'

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 'hingeowl-pr/dxgi-removal-bvh-slots'
git switch 'hingeowl-pr/dxgi-removal-bvh-slots'
git rebase 'Main'
git switch 'Main'
git merge --ff-only 'hingeowl-pr/dxgi-removal-bvh-slots'
git switch 'hingeowl-pr/dxgi-removal-bvh-slots'
git rebase 'Main'
git switch 'Main'
git merge --no-ff 'hingeowl-pr/dxgi-removal-bvh-slots'
git switch 'Main'
git merge --squash 'hingeowl-pr/dxgi-removal-bvh-slots'
git switch 'Main'
git merge --ff-only 'hingeowl-pr/dxgi-removal-bvh-slots'
git switch 'Main'
git merge 'hingeowl-pr/dxgi-removal-bvh-slots'
git push origin 'Main'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
TrustNo1/Darner!519
No description provided.