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

Open
sennecools wants to merge 2 commits from upstream-pr/437 into main
sennecools commented 2026-11-25 00:49:22 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by sennecools on 2026-11-25T00:49:22Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6594544605 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/437). Originally posted by [sennecools](https://github.com/sennecools) on 2026-11-25T00:49:22Z. --- 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.
chatgpt-codex-connector[bot commented 2026-11-25 01:11:50 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T00:54:57Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d05a3ccbaf

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<!-- greyfinch-sync:fxceless/victory-fork:review:6049890962 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/437#pullrequestreview-6049890962). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T00:54:57Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `d05a3ccbaf` <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". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". </details>
chatgpt-codex-connector[bot commented 2026-11-25 01:12:05 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T00:49:34Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7148918367 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/437#issuecomment-7148918367). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T00:49:34Z. --- <!-- 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>
chatgpt-codex-connector[bot commented 2026-11-25 01:12:10 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T00:54:57Z.

Code review location: crates/victory-gpu/src/host.rs; line 4163

@@ -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 👍 / 👎.

<!-- greyfinch-sync:fxceless/victory-fork:review-comment:4688711854 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/437#discussion_r4688711854). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T00:54:57Z. **Code review location:** `crates/victory-gpu/src/host.rs`; line 4163 ~~~~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 -->
sennecools commented 2026-11-25 02:09:34 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by sennecools on 2026-11-25T02:05:28Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:fxceless/victory-fork:review:6050552728 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/437#pullrequestreview-6050552728). Originally posted by [sennecools](https://github.com/sennecools) on 2026-11-25T02:05:28Z. **Review:** COMMENTED --- _No description provided._
sennecools commented 2026-11-25 02:10:15 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by sennecools on 2026-11-25T02:05:28Z.

Code review location: crates/victory-gpu/src/host.rs; line 4163

@@ -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.

<!-- greyfinch-sync:fxceless/victory-fork:review-comment:4689276575 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/437#discussion_r4689276575). Originally posted by [sennecools](https://github.com/sennecools) on 2026-11-25T02:05:28Z. **Code review location:** `crates/victory-gpu/src/host.rs`; line 4163 ~~~~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 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/437:upstream-pr/437'
git switch 'upstream-pr/437'

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