GPU: lite device-removed data in every build #437

Open
github-bot wants to merge 2 commits from github-bot/gh-437 into main AGit
Owner

@⁠sennecools on GitHub · 2026-11-25 00:49 UTC · original
sennecools:contrib/dred-lite → main · +588 −34 · 6 files · 2 commits · open

The driver's device-removed data was kept only in a diagnostics build with VICTORY_D3D12_DRED set, and that mode builds marker text for every command, which cost 450 to 1,000 ms a frame in our measurements, so runs with it on could not be timed.

VICTORY_D3D12_DRED now has three modes:

  • lite (default, every build): the driver's breadcrumbs and page-fault data without the debug layer, plus one compact record (op kind, pipeline key) per draw or dispatch;
  • 1 / any other value (diagnostics builds; others fall back to lite): today's full marker text and named allocations;
  • 0 / off: nothing.

A removal now reports the fault's class (low / mid / wild) and nearest heap, for each stopped list the last op finished and the first not with their pipelines, the last 64 ops sent, the view clamp, the loop limit and the build hash. README updated.

Testing

  • Unit tests for the mode switch, the op/breadcrumb pairing and the fault class; victory-gpu tests pass on WARP with and without diagnostics; clippy clean.
  • Not tested in a game run: no device removal has been reported with this build, and the frame cost of lite (breadcrumbs plus one record per op) is not measured yet.

AI-assisted (Claude Code)

This change has also been part of our local combined build, which ran the title in the game on an RX 9070 XT (D3D12, Windows 11) several times tonight without problems from it.

AI-assisted.

**@⁠sennecools** on GitHub · 2026-11-25 00:49 UTC · [original](https://github.com/fxceless/victory-fork/pull/437) `sennecools:contrib/dred-lite` → `main` · +588 −34 · 6 files · 2 commits · open The driver's device-removed data was kept only in a diagnostics build with `VICTORY_D3D12_DRED` set, and that mode builds marker text for every command, which cost 450 to 1,000 ms a frame in our measurements, so runs with it on could not be timed. `VICTORY_D3D12_DRED` now has three modes: - `lite` (default, every build): the driver's breadcrumbs and page-fault data without the debug layer, plus one compact record (op kind, pipeline key) per draw or dispatch; - `1` / any other value (diagnostics builds; others fall back to lite): today's full marker text and named allocations; - `0` / `off`: nothing. A removal now reports the fault's class (low / mid / wild) and nearest heap, for each stopped list the last op finished and the first not with their pipelines, the last 64 ops sent, the view clamp, the loop limit and the build hash. README updated. Testing - Unit tests for the mode switch, the op/breadcrumb pairing and the fault class; victory-gpu tests pass on WARP with and without `diagnostics`; clippy clean. - Not tested in a game run: no device removal has been reported with this build, and the frame cost of lite (breadcrumbs plus one record per op) is not measured yet. AI-assisted (Claude Code) This change has also been part of our local combined build, which ran the title in the game on an RX 9070 XT (D3D12, Windows 11) several times tonight without problems from it. AI-assisted.
The driver's device-removed data (breadcrumbs, page fault) used to be
kept only in a diagnostics build with VICTORY_D3D12_DRED set, and that
mode wrote a marker with the text of every command. Building that
text cost 450 to 1,000 ms a frame, so a run with it on could not be
timed.

VICTORY_D3D12_DRED now has three modes: off, lite and full. Lite is the
default in every build. It turns on the driver's breadcrumbs and
page-fault data without the debug layer, and records one compact entry
(op kind and pipeline key) per draw or dispatch instead of marker text.
A removal then reports:
- the fault's class (low, mid or wild) and the nearest heap;
- for each stopped list, the last op that finished and the first that
  did not, each with its pipeline;
- the last 64 ops sent;
- the view clamp, the loop limit and the build hash.

Full (1, diagnostics builds only) keeps the marker text and the named
allocations of today. The cost of lite itself (the driver's breadcrumbs
plus one entry per op) has not been measured in a game run yet.

AI-assisted (Claude Code)
The ops of a submission went into the device-removed report's list of
sent ops while the submission was still being prepared. A settle later
in the preparing (the relay landing flights, or the compare's results
running low) can report a removal of an earlier flight, and the report
then named this submission's unsent ops as the last work sent; one of
64 ops or more pushed the real history out entirely.

The ops are now noted just before ExecuteCommandLists, per group when
each list is sent on its own. The ring is a function of its own, with a
test.

AI-assisted (Claude Code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:43:17 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-25 00:49 UTC · original · edited 2026-11-25 00:54 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T00:54:59.011633Z d05a3cc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-25 00:49 UTC · [original](https://github.com/fxceless/victory-fork/pull/437#issuecomment-7148918367) · edited 2026-11-25 00:54 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"d05a3ccbaf9690f3bab107b2b55798e313a75400","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-25T00:54:59.011633Z">2026-11-25T00:54:59.011633Z</relative-time> | `d05a3cc` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-25 00:54 UTC · original
On crates/victory-gpu/src/host.rs line 4163 (outdated):

@@ -4001,6 +4160,7 @@ impl Host {
         }
         for list in runs {
             list.run_deferred(&mut batch);
+            list.sent_ops();

P2 Badge Publish sent-op history at the actual queue submission boundary

With VICTORY_RELAY enabled, relay_land() can report removal of an earlier flight while the next submission is still being prepared, including during the card_results_low() settle below. This call has already updated SENT_OPS, but the corresponding ExecuteCommandLists has not happened yet. A next submission containing at least 64 ops therefore erases the actual recently sent history and makes the crash report identify unsent pipelines as the last work sent. Publish these records at the actual queue-send boundary rather than during preparation.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-25 00:54 UTC · [original](https://github.com/fxceless/victory-fork/pull/437#discussion_r4688711854) On `crates/victory-gpu/src/host.rs` line 4163 (outdated): ```diff @@ -4001,6 +4160,7 @@ impl Host { } for list in runs { list.run_deferred(&mut batch); + list.sent_ops(); ``` **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Publish sent-op history at the actual queue submission boundary** With `VICTORY_RELAY` enabled, `relay_land()` can report removal of an earlier flight while the next submission is still being prepared, including during the `card_results_low()` settle below. This call has already updated `SENT_OPS`, but the corresponding `ExecuteCommandLists` has not happened yet. A next submission containing at least 64 ops therefore erases the actual recently sent history and makes the crash report identify unsent pipelines as the last work sent. Publish these records at the actual queue-send boundary rather than during preparation. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

@⁠sennecools on GitHub · 2026-11-25 02:05 UTC · original
On crates/victory-gpu/src/host.rs line 4163 (outdated):

@@ -4001,6 +4160,7 @@ impl Host {
         }
         for list in runs {
             list.run_deferred(&mut batch);
+            list.sent_ops();

Confirmed. The last-sent op history was updated while the submission was still being prepared, so a settle during preparation could report a removal that named unsent work.
The ops are now recorded right before each ExecuteCommandLists, per group when lists are sent one at a time. The history buffer moved into a small function with a unit test.

AI-assisted.

**@⁠sennecools** on GitHub · 2026-11-25 02:05 UTC · [original](https://github.com/fxceless/victory-fork/pull/437#discussion_r4689276575) On `crates/victory-gpu/src/host.rs` line 4163 (outdated): ```diff @@ -4001,6 +4160,7 @@ impl Host { } for list in runs { list.run_deferred(&mut batch); + list.sent_ops(); ``` Confirmed. The last-sent op history was updated while the submission was still being prepared, so a settle during preparation could report a removal that named unsent work. The ops are now recorded right before each ExecuteCommandLists, per group when lists are sent one at a time. The history buffer moved into a small function with a unit test. AI-assisted.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/draw.rs
  • crates/victory-gpu/src/host.rs
  • crates/victory-gpu/src/indirect.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-437'
git switch 'github-bot/gh-437'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-437'
git switch 'github-bot/gh-437'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-437'
git switch 'main'
git merge --squash 'github-bot/gh-437'
git switch 'main'
git merge --ff-only 'github-bot/gh-437'
git switch 'main'
git merge 'github-bot/gh-437'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.