GPU: report frames with completed fence waits #3155

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/3157 into main
andrewpozdnakov7-jpg commented 2026-11-26 10:29:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T10:29:29Z.


A frame can complete a title fence event without releasing or blocking any command-list segments. The held-work logger drains the fence counters at each present, but its existing filter suppresses the entire row when the queue has no held work. Include completed fence waits in the filter.

I ran the same isolated Windows fixture on base 63bcca4 and on this change. It registered one event on a synthetic fence, signaled the fence and confirmed the event was signaled. There were no held command lists. Three successive report calls produced these results.

Frame Scenario Base Patched
1 Idle No row No row
2 One completed fence event No row One row with fence_waits=1 and fence_wait_ms=5.185
3 Idle No row No row

The included regression covers the frame filter for idle frames, fence-only frames, blocked work and released work. The full diagnostics suite on app-local WARP passed 247 tests with one ignored. Strict GPU Clippy passed with default and all features. Asset policy passed.

Run the regression with this command.

cargo test -p victory-gpu --features diagnostics --locked reports_frames_with_completed_fence_waits_only
<!-- greyfinch-sync:Marvisak/VIctory:issue:5508315883 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3157). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-26T10:29:29Z. --- A frame can complete a title fence event without releasing or blocking any command-list segments. The held-work logger drains the fence counters at each present, but its existing filter suppresses the entire row when the queue has no held work. Include completed fence waits in the filter. I ran the same isolated Windows fixture on base 63bcca4 and on this change. It registered one event on a synthetic fence, signaled the fence and confirmed the event was signaled. There were no held command lists. Three successive report calls produced these results. | Frame | Scenario | Base | Patched | | --- | --- | --- | --- | | 1 | Idle | No row | No row | | 2 | One completed fence event | No row | One row with fence_waits=1 and fence_wait_ms=5.185 | | 3 | Idle | No row | No row | The included regression covers the frame filter for idle frames, fence-only frames, blocked work and released work. The full diagnostics suite on app-local WARP passed 247 tests with one ignored. Strict GPU Clippy passed with default and all features. Asset policy passed. Run the regression with this command. cargo test -p victory-gpu --features diagnostics --locked reports_frames_with_completed_fence_waits_only
Dukestar69 commented 2026-11-26 10:51:27 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T10:51:27Z.

Review: APPROVED


Verified on RTX 5090 against origin/main (63bcca4):

  • cargo test -p victory-gpu --lib queue:: -- --test-threads=1: 6/6 passed (including reports_frames_with_completed_fence_waits_only).
  • cargo test -p victory-gpu --lib fence:: -- --test-threads=1: 2/2 passed.
  • cargo clippy -p victory-gpu --all-targets -- -D warnings & --features diagnostics: clean.
  • cargo xtask policy: 191 files ok.

Cleanly reports frames with completed fence waits in queue.rs.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6072815116 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3157#pullrequestreview-6072815116). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T10:51:27Z. **Review:** APPROVED --- Verified on RTX 5090 against `origin/main` (`63bcca4`): - `cargo test -p victory-gpu --lib queue:: -- --test-threads=1`: 6/6 passed (including `reports_frames_with_completed_fence_waits_only`). - `cargo test -p victory-gpu --lib fence:: -- --test-threads=1`: 2/2 passed. - `cargo clippy -p victory-gpu --all-targets -- -D warnings` & `--features diagnostics`: clean. - `cargo xtask policy`: 191 files ok. Cleanly reports frames with completed fence waits in `queue.rs`. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Jackster commented 2026-11-26 23:02:07 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Jackster on 2026-11-26T23:02:07Z.


Windows 11, 63bcca4 + this PR, Radeon RX 7900 XTX:

  • cargo test -p victory-gpu --lib: 232 passed / 0 failed / 1 ignored (unpatched 63bcca4 here: 231 passed).
  • cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.

The added test reports_frames_with_completed_fence_waits_only is in that count and passes, and the surrounding queue/fence tests are unchanged. Synthetic only. AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7205196754 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3157#issuecomment-7205196754). Originally posted by [Jackster](https://github.com/Jackster) on 2026-11-26T23:02:07Z. --- Windows 11, `63bcca4` + this PR, Radeon RX 7900 XTX: - `cargo test -p victory-gpu --lib`: 232 passed / 0 failed / 1 ignored (unpatched `63bcca4` here: 231 passed). - `cargo clippy -p victory-gpu --all-targets -- -D warnings`: clean. The added test `reports_frames_with_completed_fence_waits_only` is in that count and passes, and the surrounding queue/fence tests are unchanged. Synthetic only. AI-assisted.
fuzeofficlal commented 2026-11-27 00:35:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-27T00:35:54Z.

Review: APPROVED


Reviewed and tested dfccab1eefad19022a9975bbde7ab4daded1faca on both RTX 5090 and WARP (VICTORY_D3D12_DEBUG=1).

account_frame already consumes (fence_waits, fence_waited) via crate::fence::take_waited() and logs both fields in the frame summary (queue.rs:302, 323-324), so adding fence_waits != 0 to Account::should_report fixes the silent omission of frames whose only wait activity was completed fence waits.

Checks run:

  • cargo xtask policy — pass
  • cargo clippy --tests -p victory-gpu -- -D warnings (default and --features diagnostics) — clean
  • queue::tests — 6/6 pass on RTX 5090 and 6/6 pass on WARP (VICTORY_D3D12_DEBUG=1, 0 Debug Layer errors).

LGTM!

<!-- greyfinch-sync:Marvisak/VIctory:review:6081998939 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3157#pullrequestreview-6081998939). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-27T00:35:54Z. **Review:** APPROVED --- Reviewed and tested `dfccab1eefad19022a9975bbde7ab4daded1faca` on both RTX 5090 and WARP (`VICTORY_D3D12_DEBUG=1`). `account_frame` already consumes `(fence_waits, fence_waited)` via `crate::fence::take_waited()` and logs both fields in the frame summary (`queue.rs:302, 323-324`), so adding `fence_waits != 0` to `Account::should_report` fixes the silent omission of frames whose only wait activity was completed fence waits. Checks run: - `cargo xtask policy` — pass - `cargo clippy --tests -p victory-gpu -- -D warnings` (default and `--features diagnostics`) — clean - `queue::tests` — 6/6 pass on RTX 5090 and 6/6 pass on WARP (`VICTORY_D3D12_DEBUG=1`, 0 Debug Layer errors). LGTM!
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/3157:upstream-pr/3157'
git switch 'upstream-pr/3157'

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