Keep the compute wait budget on the newest frame #1831

Merged
Ondra97 merged 1 commit from upstream-pr/1831 into main 2026-11-29 08:16:53 +00:00
Ondra97 commented 2026-11-29 00:36:48 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Ondra97 on 2026-11-29T00:36:48Z.


Related to #628 and the compute wait budget added in 88244e8.

What it changes

The current frame's compute wait accounting lives in a single slot. A late completion or check tagged with an older frame could move that slot backwards, discarding the budget already spent in the newer frame. Advance the slot only for a newer frame. An older dispatch uses the normal wait path and an older completion leaves the active slot alone.

This preserves the configured threshold. A synchronous pipeline creation already in progress can still run past the remaining budget.

How it was tested

  • The exact-source regression failed on current main and passed with this change. It exhausts a frame, processes an older completion and request, and checks that the following frame starts with a fresh budget.
  • The crate regression and pending-pipeline checks with default and ordinary wait paths passed. The locked, offline release build succeeded.
  • Windows, RTX 4070 Ti SUPER, Series X, 1440p DLSS Performance, frame generation off. Two current-main runs and one run of this branch used matching save copies and empty application pipeline libraries with the default 3,000 ms setting.
  • First 3D frame-rate sample at 72.2 s and 77.7 s on main, and 78.8 s with the patch. The stock runs recorded respectively three and one repeat threshold events for the same frame and returned to older frame IDs. The patch recorded eight threshold events, all for distinct increasing frame IDs, and reached the scene without a logged crash. This checks the frame ledger and does not establish faster loading or a higher frame rate.

Checked for overlap

  • Checked open PRs for the compute wait budget. Closed #1767 proposed a different worker wait design before 88244e8. #901 handles held queue work. This change preserves the current main implementation and fixes frame ordering in its accounting.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5546090125 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1831). Originally posted by [Ondra97](https://github.com/Ondra97) on 2026-11-29T00:36:48Z. --- Related to #628 and the compute wait budget added in 88244e8. ## What it changes The current frame's compute wait accounting lives in a single slot. A late completion or check tagged with an older frame could move that slot backwards, discarding the budget already spent in the newer frame. Advance the slot only for a newer frame. An older dispatch uses the normal wait path and an older completion leaves the active slot alone. This preserves the configured threshold. A synchronous pipeline creation already in progress can still run past the remaining budget. ## How it was tested - The exact-source regression failed on current main and passed with this change. It exhausts a frame, processes an older completion and request, and checks that the following frame starts with a fresh budget. - The crate regression and pending-pipeline checks with default and ordinary wait paths passed. The locked, offline release build succeeded. - Windows, RTX 4070 Ti SUPER, Series X, 1440p DLSS Performance, frame generation off. Two current-main runs and one run of this branch used matching save copies and empty application pipeline libraries with the default 3,000 ms setting. - First 3D frame-rate sample at 72.2 s and 77.7 s on main, and 78.8 s with the patch. The stock runs recorded respectively three and one repeat threshold events for the same frame and returned to older frame IDs. The patch recorded eight threshold events, all for distinct increasing frame IDs, and reached the scene without a logged crash. This checks the frame ledger and does not establish faster loading or a higher frame rate. ## Checked for overlap - [x] Checked open PRs for the compute wait budget. Closed #1767 proposed a different worker wait design before 88244e8. #901 handles held queue work. This change preserves the current main implementation and fixes frame ordering in its accounting.
nick0451 commented 2026-11-29 03:54:17 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-29T03:54:17Z.


Checked against the #628 symptom: this PR merged onto main 568c5e5, RTX 3090, Windows 11, 3 of 3 fresh first starts reached the world (a new executable name and file hash each time, the same frozen save). As on main, each start logged the cap taking over (compute pipelines: this frame waited its most for them). There was no crash, and the in-game frame rate is unchanged.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7250329873 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1831#issuecomment-7250329873). Originally posted by [nick0451](https://github.com/nick0451) on 2026-11-29T03:54:17Z. --- Checked against the #628 symptom: this PR merged onto main `568c5e5`, RTX 3090, Windows 11, **3 of 3 fresh first starts reached the world** (a new executable name and file hash each time, the same frozen save). As on main, each start logged the cap taking over (`compute pipelines: this frame waited its most for them`). There was no crash, and the in-game frame rate is unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
trustno1-coder/VIctory-NVIDIA!1831
No description provided.