fix: GPU_TIMING names and times commands under light or no DRED #568

Open
KainanP wants to merge 1 commit from upstream-pr/568 into main
KainanP commented 2026-11-27 23:43:00 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by KainanP on 2026-11-27T23:43:00Z.


What

VICTORY_GPU_TIMING=1 now names and times every command of the title's lists with VICTORY_D3D12_DRED=light (the launcher's TUNED set) or with DRED off. Before, only full DRED (--dred) gave the per-command lines.

Why

Reported by YUYING234 on Marvisak/VIctory#3505 (it cost two runs on a 4060 Laptop): HostList::note() returned straight away unless full DRED was on, so slowest() found no texts and no timestamps. The copy statistics printed their noted commands 0.0 and no by command block, and slow host list was followed by no slow list command lines.

How

  • note() now asks a small pure function, noting(dred_on, timing), what to keep: the text and a timestamp when either full DRED or timing is on, and a SetMarker command only with full DRED. Timing needs the texts and stamps, not the markers.
  • The DRED report pairs the k-th SETMARKER breadcrumb with the k-th note. Under light DRED no markers are recorded, so nothing is paired. This is the same as before.
  • The slow-list check now reads the list's wall time before its timestamps are mapped and sorted, and maps and sorts them once for both the totals and the six slow-command lines (timed_list). Before, the 50 ms test ran after that work, so the report's own time could flag a list that never waited. With timing on under light DRED, many more lists go through the report, so this matters more now.
  • Docs: the VICTORY_GPU_TIMING row in docs/running-gta6.md and docs/fr/lancer-gta6.md now says it works with light DRED or none. The table in VIctory's README-fxceless.md says the same.

Tests

  • host::tests::timing_notes_commands_without_full_device_removed_data (cargo test -p victory-gpu --features diagnostics --lib timing_notes). It fails with the old rule, (dred_on, dred_on): left: (false, false) right: (true, false). It passes with the fix.
  • host::tests::a_slow_list_is_its_wait_not_the_time_its_report_takes: the control andrewpozdnakov7-jpg ran in Marvisak/VIctory#3623, suggested here by akimfomin, without a device. A 60 ms delay in the report's collection must give the named commands and no slow flag. The same delay in the wait must give the same names with the flag. It fails with the old order (wall time read after collecting: left: (true, [...]) right: (false, [...])) and passes with the fix.
  • Rebased on main 132da61: cargo test -p victory-gpu --lib 642 passed. With --features diagnostics: 708 passed, 3 failed. The failures are pipeline::make::tests::missing_distinguishes_omitted_and_pending_pipelines and skipped_hash_leaves_pipeline_unqueued_and_unmatched_queues_normally, which fail the same way with main's host.rs, and timeline::report::tests::real_waits_are_recorded_with_who_ended_them, which passed when rerun. None of them is in a file this PR touches.
  • Full pytest (WARP): 1454 passed, 529 skipped.

Timing is a diagnostics-only path. With timing off and no full DRED, nothing changes.

AI use: written and tested by Claude Code (Claude Opus 5.5) for KainanP. The test was run red before the fix and green after.

🤖 Generated with Claude Code

<!-- greyfinch-sync:LooperSalty/AnyXboxX:issue:5534553418 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/568). Originally posted by [KainanP](https://github.com/KainanP) on 2026-11-27T23:43:00Z. --- ## What `VICTORY_GPU_TIMING=1` now names and times every command of the title's lists with `VICTORY_D3D12_DRED=light` (the launcher's `TUNED` set) or with DRED off. Before, only full DRED (`--dred`) gave the per-command lines. ## Why Reported by YUYING234 on Marvisak/VIctory#3505 (it cost two runs on a 4060 Laptop): `HostList::note()` returned straight away unless full DRED was on, so `slowest()` found no texts and no timestamps. The copy statistics printed `their noted commands 0.0` and no `by command` block, and `slow host list` was followed by no `slow list command` lines. ## How - `note()` now asks a small pure function, `noting(dred_on, timing)`, what to keep: the text and a timestamp when either full DRED or timing is on, and a `SetMarker` command only with full DRED. Timing needs the texts and stamps, not the markers. - The DRED report pairs the k-th `SETMARKER` breadcrumb with the k-th note. Under light DRED no markers are recorded, so nothing is paired. This is the same as before. - The slow-list check now reads the list's wall time before its timestamps are mapped and sorted, and maps and sorts them once for both the totals and the six slow-command lines (`timed_list`). Before, the 50 ms test ran after that work, so the report's own time could flag a list that never waited. With timing on under light DRED, many more lists go through the report, so this matters more now. - Docs: the `VICTORY_GPU_TIMING` row in `docs/running-gta6.md` and `docs/fr/lancer-gta6.md` now says it works with light DRED or none. The table in VIctory's `README-fxceless.md` says the same. ## Tests - `host::tests::timing_notes_commands_without_full_device_removed_data` (`cargo test -p victory-gpu --features diagnostics --lib timing_notes`). It fails with the old rule, `(dred_on, dred_on)`: `left: (false, false) right: (true, false)`. It passes with the fix. - `host::tests::a_slow_list_is_its_wait_not_the_time_its_report_takes`: the control andrewpozdnakov7-jpg ran in Marvisak/VIctory#3623, suggested here by akimfomin, without a device. A 60 ms delay in the report's collection must give the named commands and no slow flag. The same delay in the wait must give the same names with the flag. It **fails** with the old order (wall time read after collecting: `left: (true, [...]) right: (false, [...])`) and passes with the fix. - Rebased on main `132da61`: `cargo test -p victory-gpu --lib` 642 passed. With `--features diagnostics`: 708 passed, 3 failed. The failures are `pipeline::make::tests::missing_distinguishes_omitted_and_pending_pipelines` and `skipped_hash_leaves_pipeline_unqueued_and_unmatched_queues_normally`, which fail the same way with main's `host.rs`, and `timeline::report::tests::real_waits_are_recorded_with_who_ended_them`, which passed when rerun. None of them is in a file this PR touches. - Full pytest (WARP): 1454 passed, 529 skipped. Timing is a diagnostics-only path. With timing off and no full DRED, nothing changes. _AI use: written and tested by Claude Code (Claude Opus 5.5) for KainanP. The test was run red before the fix and green after._ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
LooperSalty commented 2026-11-28 00:15:41 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-28T00:15:41Z.


Main just took #563 (the VIctory copy moved to Vice-Tay 4f15f09e) and #564 (memory stack), and this PR now conflicts in third_party/victory/crates/victory-gpu/src/host.rs, third_party/victory/docs/README-fxceless.md. Please rebase on current main, rerun the tests for the files you touch, and force-push.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7230773617 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/568#issuecomment-7230773617). Originally posted by [LooperSalty](https://github.com/LooperSalty) on 2026-11-28T00:15:41Z. --- Main just took #563 (the VIctory copy moved to Vice-Tay `4f15f09e`) and #564 (memory stack), and this PR now conflicts in `third_party/victory/crates/victory-gpu/src/host.rs`, `third_party/victory/docs/README-fxceless.md`. Please rebase on current main, rerun the tests for the files you touch, and force-push.
akimfomin commented 2026-11-28 00:21:58 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by akimfomin on 2026-11-28T00:21:58Z.


PortBridge checked 2e1939d against current main 132da61: the rebase conflicts in host.rs. Pairing it with #519 also conflicts in the diagnostics code and the vendored README. This is a Git check, before any build.

A second control is already demonstrated by andrewpozdnakov7-jpg in VIctory #3623: inject a delay into collection, then independently into list wait. With the timing-notes fix, the first run should show named commands without a slow-list flag and the second should show the same names with the flag. It separates an apparent hitch created by reporting from a real wait; it also complements timing_notes_commands_without_full_device_removed_data. Can this pair be the first check on the rebased state? Source reuse is optional. PortBridge merge-check entry.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7230854923 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/568#issuecomment-7230854923). Originally posted by [akimfomin](https://github.com/akimfomin) on 2026-11-28T00:21:58Z. --- PortBridge checked `2e1939d` against [current main `132da61`](https://github.com/LooperSalty/AnyXboxX/commit/132da61504cc2c2d086796c468a8ace1759aba22): the rebase conflicts in `host.rs`. Pairing it with [#519](https://github.com/LooperSalty/AnyXboxX/pull/519) also conflicts in the diagnostics code and the vendored README. This is a Git check, before any build. A second control is already demonstrated by andrewpozdnakov7-jpg in [VIctory #3623](https://github.com/Marvisak/VIctory/pull/3623): inject a delay into collection, then independently into list wait. With the timing-notes fix, the first run should show named commands without a slow-list flag and the second should show the same names with the flag. It separates an apparent hitch created by reporting from a real wait; it also complements `timing_notes_commands_without_full_device_removed_data`. Can this pair be the first check on the rebased state? Source reuse is optional. [PortBridge merge-check entry](https://github.com/akimfomin/PortBridge/issues/98).
LooperSalty commented 2026-11-28 00:49:06 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-28T00:49:06Z.


The noting(dred_on, timing) logic is right and the four combinations are tested. After #563 this conflicts with main in third_party/victory/crates/victory-gpu/src/host.rs and third_party/victory/docs/README-fxceless.md; please rebase, keep both sides of the host.rs hunk, and force-push.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7231213335 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/568#issuecomment-7231213335). Originally posted by [LooperSalty](https://github.com/LooperSalty) on 2026-11-28T00:49:06Z. --- The `noting(dred_on, timing)` logic is right and the four combinations are tested. After #563 this conflicts with main in `third_party/victory/crates/victory-gpu/src/host.rs` and `third_party/victory/docs/README-fxceless.md`; please rebase, keep both sides of the `host.rs` hunk, and force-push.
KainanP commented 2026-11-28 00:58:59 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by KainanP on 2026-11-28T00:58:59Z.


Rebased on main 132da61 and force-pushed: the head is now d935b4d4, one commit. The conflicts were the test module of host.rs (main's new a_host_list_can_reset_an_abandoned_recording and this PR's test are both kept) and the VICTORY_GPU_TIMING row of README-fxceless.md (main's "with the above" wording is kept and this PR's note is added).

@akimfomin, I added your control as a test that needs no device. Doing it showed a real ordering bug, which this PR now fixes:

  • The 50 ms slow-list check ran after the timestamps had been mapped and sorted (twice), so the time the report itself took could flag a list that never waited. Under light DRED far more lists go through that report.
  • The wall time is now read first, and the samples are mapped and sorted once, for both the totals and the six lines (timed_list). The idea of reading the time first is the one andrewpozdnakov7-jpg found in Marvisak/VIctory#3623; the code here is written separately.
  • a_slow_list_is_its_wait_not_the_time_its_report_takes delays the collection first: the result must be named commands and no flag. Then it delays the wait: the same names, with the flag. It fails with the old order (left: (true, [...]) right: (false, [...])) and passes now.

Tests on the rebased head:

  • cargo test -p victory-gpu --lib: 642 passed.
  • cargo test -p victory-gpu --features diagnostics --lib: 708 passed, 3 failed. Two of the failures (pipeline::make::tests::missing_distinguishes_omitted_and_pending_pipelines and skipped_hash_leaves_pipeline_unqueued_and_unmatched_queues_normally) fail the same way with main's host.rs. The third (timeline::report::tests::real_waits_are_recorded_with_who_ended_them) passed when rerun. None is in a file this PR touches.
  • Full pytest (WARP): 1454 passed, 529 skipped.

As akimfomin noted, combining this PR with #519 still conflicts in the diagnostics code and the vendored README. Whichever merges second will need a rebase; I can do it for this one.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7231332551 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/568#issuecomment-7231332551). Originally posted by [KainanP](https://github.com/KainanP) on 2026-11-28T00:58:59Z. --- Rebased on main `132da61` and force-pushed: the head is now `d935b4d4`, one commit. The conflicts were the test module of `host.rs` (main's new `a_host_list_can_reset_an_abandoned_recording` and this PR's test are both kept) and the `VICTORY_GPU_TIMING` row of `README-fxceless.md` (main's "with the above" wording is kept and this PR's note is added). @akimfomin, I added your control as a test that needs no device. Doing it showed a real ordering bug, which this PR now fixes: - The 50 ms slow-list check ran after the timestamps had been mapped and sorted (twice), so the time the report itself took could flag a list that never waited. Under light DRED far more lists go through that report. - The wall time is now read first, and the samples are mapped and sorted once, for both the totals and the six lines (`timed_list`). The idea of reading the time first is the one andrewpozdnakov7-jpg found in Marvisak/VIctory#3623; the code here is written separately. - `a_slow_list_is_its_wait_not_the_time_its_report_takes` delays the collection first: the result must be named commands and no flag. Then it delays the wait: the same names, with the flag. It **fails** with the old order (`left: (true, [...]) right: (false, [...])`) and passes now. Tests on the rebased head: - `cargo test -p victory-gpu --lib`: 642 passed. - `cargo test -p victory-gpu --features diagnostics --lib`: 708 passed, 3 failed. Two of the failures (`pipeline::make::tests::missing_distinguishes_omitted_and_pending_pipelines` and `skipped_hash_leaves_pipeline_unqueued_and_unmatched_queues_normally`) fail the same way with main's `host.rs`. The third (`timeline::report::tests::real_waits_are_recorded_with_who_ended_them`) passed when rerun. None is in a file this PR touches. - Full pytest (WARP): 1454 passed, 529 skipped. As akimfomin noted, combining this PR with #519 still conflicts in the diagnostics code and the vendored README. Whichever merges second will need a rebase; I can do it for this one.
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/568:upstream-pr/568'
git switch 'upstream-pr/568'

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