GPU timing: report peak duration per command #3651

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/3651 into main
andrewpozdnakov7-jpg commented 2026-11-28 02:43:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T02:43:49Z.


Change

Add the largest individual command sample to each pipeline entry in the VICTORY_GPU_TIMING report. The existing ranking still uses cumulative GPU time. This makes it possible to distinguish a large timestamp interval from several shorter calls with a similar total. It also covers commands on lists below the slow-list warning threshold.

The report in #3590 shows two indirect entries with similar call counts and a significant share of the aggregate. The new number describes one timestamp interval in the reporting window, in milliseconds.

Verification

  • Compared the exact main and candidate reporting functions on Windows x64 with a synthetic two-window fixture. Frame totals, call counts and ranking match. The first window reports maxima of 26.00, 48.00 and 0.00 ms. The next window reports 3.00 ms for the previously 48.00 ms entry.
  • Asset policy passes for 191 files. Fixture uses generated timestamps and command labels.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5535914081 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3651). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T02:43:49Z. --- ## Change Add the largest individual command sample to each pipeline entry in the `VICTORY_GPU_TIMING` report. The existing ranking still uses cumulative GPU time. This makes it possible to distinguish a large timestamp interval from several shorter calls with a similar total. It also covers commands on lists below the slow-list warning threshold. The [report in #3590](https://github.com/Marvisak/VIctory/issues/3590#issuecomment-7232487547) shows two indirect entries with similar call counts and a significant share of the aggregate. The new number describes one timestamp interval in the reporting window, in milliseconds. ## Verification - Compared the exact main and candidate reporting functions on Windows x64 with a synthetic two-window fixture. Frame totals, call counts and ranking match. The first window reports maxima of 26.00, 48.00 and 0.00 ms. The next window reports 3.00 ms for the previously 48.00 ms entry. - Asset policy passes for 191 files. Fixture uses generated timestamps and command labels. AI-assisted with Codex.
Dukestar69 commented 2026-11-28 02:47:05 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-28T02:47:05Z.

Review: APPROVED


LGTM — verified on Windows (RTX 5090):

  • cargo test -p victory-gpu --features diagnostics --lib host:: passed (35/35, skipping the pre-existing origin/main RTX 5090 failure)
  • cargo clippy -p victory-gpu --all-targets -- -D warnings and --features diagnostics --all-targets -- -D warnings both passed with 0 warnings
  • cargo xtask policy passed (191 files ok)

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

<!-- greyfinch-sync:Marvisak/VIctory:review:6095253735 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3651#pullrequestreview-6095253735). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-28T02:47:05Z. **Review:** APPROVED --- LGTM — verified on Windows (RTX 5090): - `cargo test -p victory-gpu --features diagnostics --lib host::` passed (35/35, skipping the pre-existing `origin/main` RTX 5090 failure) - `cargo clippy -p victory-gpu --all-targets -- -D warnings` and `--features diagnostics --all-targets -- -D warnings` both passed with 0 warnings - `cargo xtask policy` passed (`191 files ok`) Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
andrewpozdnakov7-jpg commented 2026-11-28 02:47:33 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T02:47:33Z.


Verified 32847d9917e605fba86d8bfe62f75de04a4f9546 against 63bcca43 using the exact reporting functions and generated timestamps. In the first two-frame window, totals and command counts match main. The entry ranked first by total time reported a 26.00 ms maximum and the next reported 48.00 ms. A zero-duration sample reported 0.00 ms. The next window reported a 3.00 ms maximum for the previously 48.00 ms entry.

The Windows CI run passed both Clippy stages, including the diagnostics build. The test stage had 230 GPU tests pass, one ignored and one failure. views_bound_while_another_slot_gets_its_texture_do_not_wait hit the existing both made assertion tracked in #2585 and #2861. This commit touches only the timing summary. A maintainer rerun is the next CI step.

For a matched hardware sample, the combined #3534, #3622 and #3651 branch and its synthetic verification are linked in #3534.

Please keep the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding this change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7232596289 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3651#issuecomment-7232596289). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T02:47:33Z. --- Verified `32847d9917e605fba86d8bfe62f75de04a4f9546` against `63bcca43` using the exact reporting functions and generated timestamps. In the first two-frame window, totals and command counts match main. The entry ranked first by total time reported a 26.00 ms maximum and the next reported 48.00 ms. A zero-duration sample reported 0.00 ms. The next window reported a 3.00 ms maximum for the previously 48.00 ms entry. The [Windows CI run](https://github.com/Marvisak/VIctory/actions/runs/46099493970/job/140838459938) passed both Clippy stages, including the diagnostics build. The test stage had 230 GPU tests pass, one ignored and one failure. `views_bound_while_another_slot_gets_its_texture_do_not_wait` hit the existing `both made` assertion tracked in #2585 and #2861. This commit touches only the timing summary. A maintainer rerun is the next CI step. For a matched hardware sample, the combined #3534, #3622 and #3651 branch and its synthetic verification are linked in [#3534](https://github.com/Marvisak/VIctory/pull/3534#issuecomment-7232584414). Please keep the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding this change into another commit. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 07:38:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T07:38:38Z.


I checked the failed Windows job and combined this head with fyernald's test-only #2585 in 50da667. The only difference from this PR is the prepare hook inside the descriptor tests.

I exercised the two exact hook implementations with a forced thread ordering. On the original head, an unrelated thread consumed the hook and the assertion failed before the owner ran. With #2585, the owner consumed it exactly once. Both heads also passed 30 out of 30 local runs of the 15 descriptor tests at eight threads. The combined branch passed all 12 additional full diagnostic GPU runs, each with 246 passed and one ignored. The original had 11 completed runs and one process exit without a test assertion. Strict GPU Clippy and the asset policy passed on the combined head. These local runs used generated fixtures with the software adapter option.

Next step for a maintainer is to merge #2585 and rerun the Windows check with main included. Please retain fyernald's Git authorship if applying the test fix directly.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7236071606 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3651#issuecomment-7236071606). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T07:38:38Z. --- I checked the [failed Windows job](https://github.com/Marvisak/VIctory/actions/runs/46099493970/job/140838459938) and combined this head with fyernald's test-only #2585 in [50da667](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/50da66742535fe01f26f44bd1983af10f380ee5c). The only difference from this PR is the prepare hook inside the descriptor tests. I exercised the two exact hook implementations with a forced thread ordering. On the original head, an unrelated thread consumed the hook and the assertion failed before the owner ran. With #2585, the owner consumed it exactly once. Both heads also passed 30 out of 30 local runs of the 15 descriptor tests at eight threads. The combined branch passed all 12 additional full diagnostic GPU runs, each with 246 passed and one ignored. The original had 11 completed runs and one process exit without a test assertion. Strict GPU Clippy and the asset policy passed on the combined head. These local runs used generated fixtures with the software adapter option. Next step for a maintainer is to merge #2585 and rerun the Windows check with main included. Please retain fyernald's Git authorship if applying the test fix directly. AI-assisted with OpenAI Codex.
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/3651:upstream-pr/3651'
git switch 'upstream-pr/3651'

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