GPU: the frame line times the title's calls, and how long they waited #3222

Open
borosf wants to merge 4 commits from upstream-pr/3224 into main
borosf commented 2026-11-26 13:39:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-26T13:39:57Z.


Summary

Every counter on the frame line times submission-side work — preparing, copying back, guarding, heaps, descriptors. Nothing times the recording side: the title's calls into its command lists, which #2590 puts at "about 42,000 list calls a frame … roughly 20 µs each (RTX 4050 Laptop): the largest CPU cost of a frame".

list::with_state is where every list handler's body runs, so it now reports:

  • Calls — the calls that found a host list to record into. A call with no host list (no host GPU) runs nothing and is not counted,
  • CallUs — how long their handlers took, all of it,
  • CallLockWaitUs — the one part split out: the time before a handler ran, waiting for the list's own two locks (the segment's host list, then the draw state).

Printed at the end of the existing line, as list calls N: X ms in their handlers, Y ms waiting for the list's locks.

What this answers, and what it does not. It says how much of a frame's recording time is in the title's list calls at all, and how much of that is contention on the list's own two locks. It does not separate instructions from waiting inside a handler: a call blocked on SHADER_HEAPS (NEW-74's sync_heaps hold, FIND-30's 48 ms a frame of title threads waiting) blocks inside its handler, so that wait lands in CallUs whole and CallLockWaitUs does not move. Reading these three as "instructions vs waiting for the list" would be wrong, and telling those apart inside a handler is a further measurement, not this one.

Diagnostics builds only, like every other counter in this file: with the feature off, nothing is measured and nothing is added to the call.

Verification

Intel Arc B580, Windows 11:

  • cargo test -p victory-gpu --lib --features diagnostics --locked -- --test-threads=1 → 246 passed, 2 failed, 1 ignored. The two are the known Intel heap-cap pair (descriptor::host::tests::dynamic_slots_are_held_until_released, memory::tests::lists_share_a_table_and_copies_keep_their_views — #1744/#1829) that pristine main 63bcca4 also fails on this card.
  • The counters are tested rather than probed: list::call_counters::a_call_with_a_live_host_list_is_counted — a created list with a live host list: Calls +1, its handler's 2 ms in CallUs, CallLockWaitUs left where it was, since a slow handler is not a wait for the list; and a_call_without_a_host_list_is_not_counted — a call with no host list runs nothing and is not counted.
  • Both bite. With the counting removed the first fails (the call is counted, left 0, right 1). With the count moved above the host-list check both fail (not counted, left 1, right 0). With the wait measured over the handler too the first fails (a slow handler is not a wait for the list's locks: 2089 us).
  • cargo clippy -p victory-gpu --all-targets -- -D warnings clean with and without the diagnostics feature.
  • cargo xtask policy → 191 files ok.
  • rustfmt --check on the two files is unchanged from the PR's base version of each: list.rs 26 "Diff in" hunks before and after, copystat.rs 5 before and after.

No game data used; synthetic tests only. Measurement only — no behaviour change on any path.

claiming: GPU: the frame line times the title's calls into its command lists (how many, how long, and how long they waited for the list's locks) — the recording side of a frame, which no counter measures today

<!-- greyfinch-sync:Marvisak/VIctory:issue:5511077718 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3224). Originally posted by [borosf](https://github.com/borosf) on 2026-11-26T13:39:57Z. --- ## Summary Every counter on the frame line times **submission-side** work — preparing, copying back, guarding, heaps, descriptors. Nothing times the **recording** side: the title's calls into its command lists, which #2590 puts at "about 42,000 list calls a frame … roughly 20 µs each (RTX 4050 Laptop): the largest CPU cost of a frame". `list::with_state` is where every list handler's body runs, so it now reports: - `Calls` — the calls that found a host list to record into. A call with no host list (no host GPU) runs nothing and is **not** counted, - `CallUs` — how long their handlers took, all of it, - `CallLockWaitUs` — the one part split out: the time before a handler ran, waiting for the list's own two locks (the segment's host list, then the draw state). Printed at the end of the existing line, as `list calls N: X ms in their handlers, Y ms waiting for the list's locks`. **What this answers, and what it does not.** It says how much of a frame's recording time is in the title's list calls at all, and how much of that is contention on the list's own two locks. It does **not** separate instructions from waiting inside a handler: a call blocked on `SHADER_HEAPS` (NEW-74's `sync_heaps` hold, FIND-30's 48 ms a frame of title threads waiting) blocks *inside* its handler, so that wait lands in `CallUs` whole and `CallLockWaitUs` does not move. Reading these three as "instructions vs waiting for the list" would be wrong, and telling those apart inside a handler is a further measurement, not this one. Diagnostics builds only, like every other counter in this file: with the feature off, nothing is measured and nothing is added to the call. ## Verification Intel Arc B580, Windows 11: - `cargo test -p victory-gpu --lib --features diagnostics --locked -- --test-threads=1` → **246 passed, 2 failed, 1 ignored**. The two are the known Intel heap-cap pair (`descriptor::host::tests::dynamic_slots_are_held_until_released`, `memory::tests::lists_share_a_table_and_copies_keep_their_views` — #1744/#1829) that pristine `main` `63bcca4` also fails on this card. - The counters are tested rather than probed: `list::call_counters::a_call_with_a_live_host_list_is_counted` — a created list with a live host list: `Calls` +1, its handler's 2 ms in `CallUs`, `CallLockWaitUs` left where it was, since a slow handler is not a wait for the list; and `a_call_without_a_host_list_is_not_counted` — a call with no host list runs nothing and is not counted. - Both bite. With the counting removed the first fails (`the call is counted`, left 0, right 1). With the count moved above the host-list check both fail (`not counted`, left 1, right 0). With the wait measured over the handler too the first fails (`a slow handler is not a wait for the list's locks: 2089 us`). - `cargo clippy -p victory-gpu --all-targets -- -D warnings` clean with and without the `diagnostics` feature. - `cargo xtask policy` → 191 files ok. - `rustfmt --check` on the two files is unchanged from the PR's base version of each: `list.rs` 26 "Diff in" hunks before and after, `copystat.rs` 5 before and after. No game data used; synthetic tests only. Measurement only — no behaviour change on any path. claiming: GPU: the frame line times the title's calls into its command lists (how many, how long, and how long they waited for the list's locks) — the recording side of a frame, which no counter measures today
Dukestar69 commented 2026-11-26 13:50:11 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T13:50:11Z.

Review: APPROVED


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

  • cargo test -p victory-gpu --lib draw:: -- --test-threads=1: 20/20 passed.
  • cargo clippy -p victory-gpu --all-targets -- -D warnings & --features diagnostics: clean.
  • cargo xtask policy: 191 files ok.

Cleanly times title command-list calls and their wait durations in the frame summary line.

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

<!-- greyfinch-sync:Marvisak/VIctory:review:6075258906 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3224#pullrequestreview-6075258906). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T13:50:11Z. **Review:** APPROVED --- Verified on RTX 5090 against `origin/main` (`63bcca4`): - `cargo test -p victory-gpu --lib draw:: -- --test-threads=1`: 20/20 passed. - `cargo clippy -p victory-gpu --all-targets -- -D warnings` & `--features diagnostics`: clean. - `cargo xtask policy`: 191 files ok. Cleanly times title command-list calls and their wait durations in the frame summary line. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Jackster commented 2026-11-26 22:34:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Jackster on 2026-11-26T22:34:13Z.


Windows 11, 63bcca4 + this PR:

  • cargo test -p victory-gpu --lib: 231 passed / 0 failed / 1 ignored — same counts as unpatched 63bcca4 here.
  • cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.

No test added; the frame-line accounting it extends is only meaningful in a submission, so this is compile/regression coverage. Synthetic only. AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7204795660 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3224#issuecomment-7204795660). Originally posted by [Jackster](https://github.com/Jackster) on 2026-11-26T22:34:13Z. --- Windows 11, `63bcca4` + this PR: - `cargo test -p victory-gpu --lib`: 231 passed / 0 failed / 1 ignored — same counts as unpatched `63bcca4` here. - `cargo clippy -p victory-gpu --all-targets -- -D warnings`: clean. No test added; the frame-line accounting it extends is only meaningful in a submission, so this is compile/regression coverage. Synthetic only. AI-assisted.
andrewpozdnakov7-jpg commented 2026-11-26 23:02:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T23:02:18Z.


The timer in db140ab stops before acquiring the draw-state mutex. Time spent on that mutex is absent from both reported durations. Follow-up f0c6f25 uses the start of the handler as the end of the wait interval and samples handler time before updating the counters.

I made three calls on a real synthetic D3D12 list, with a second thread holding the state mutex for 25, 90, and 160 ms respectively. On exact db140ab, all three calls were counted, but their combined reported wait was 4–7 μs across three WARP processes. With the patch it was 276.3–277.0 ms, matching the caller's measured delay. The no-op handlers themselves took 1–5 μs total in both builds. The diagnostics GPU suite passed 246 tests with one ignored. Strict GPU Clippy in both configurations and asset policy passed.

@borosf, this is ready to cherry-pick. If you fold it into your change, please keep the Git author or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7205199313 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3224#issuecomment-7205199313). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-26T23:02:18Z. --- The timer in `db140ab` stops before acquiring the draw-state mutex. Time spent on that mutex is absent from both reported durations. [Follow-up `f0c6f25`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/f0c6f25547f65a7773b21b52ae7f3bd90c0061e6) uses the start of the handler as the end of the wait interval and samples handler time before updating the counters. I made three calls on a real synthetic D3D12 list, with a second thread holding the state mutex for 25, 90, and 160 ms respectively. On exact `db140ab`, all three calls were counted, but their combined reported wait was 4–7 μs across three WARP processes. With the patch it was 276.3–277.0 ms, matching the caller's measured delay. The no-op handlers themselves took 1–5 μs total in both builds. The diagnostics GPU suite passed 246 tests with one ignored. Strict GPU Clippy in both configurations and asset policy passed. @borosf, this is ready to cherry-pick. If you fold it into your change, please keep the Git author or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`.
fuzeofficlal commented 2026-11-27 00:35:57 +00:00 (Migrated from github.com)

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

Review: CHANGES_REQUESTED


Reviewed and tested db140abf87159fc379dba3a49f1d1a2d5273aafe on both RTX 5090 and WARP (--features diagnostics, VICTORY_D3D12_DEBUG=1; cargo xtask policy and default/diagnostics clippy are clean).

There is a timing bug in crates/victory-gpu/src/list.rs:140-160:

    #[cfg(feature = "diagnostics")]
    let waiting = started.elapsed().as_micros() as u64;
    let mut state = state.lock().unwrap_or_else(|e| e.into_inner());
    #[cfg(feature = "diagnostics")]
    let handler = std::time::Instant::now();

waiting is sampled before state.lock(), and handler is sampled after state.lock(). As a result, all time spent blocked on List::state's mutex is excluded from both C::CallWaitUs and C::CallUs (only host_list(this) is measured in CallWaitUs).

Confirmed live by holding list.state on another thread for ~35 ms while calling with_state(list, |_, _| {}):

  • RTX 5090: wall_ms = 35.17, calls = 1, call_us = 0, wait_us = 1
  • WARP: wall_ms = 35.52, calls = 1, call_us = 0, wait_us = 1

Sampling handler immediately after state.lock() and computing waiting from handler.saturating_duration_since(started) both fixes the missing lock-wait accounting and removes an extra Instant::now() call on the hot path:

    let mut state = state.lock().unwrap_or_else(|e| e.into_inner());
    #[cfg(feature = "diagnostics")]
    let handler = std::time::Instant::now();
    #[cfg(feature = "diagnostics")]
    let waiting = handler.saturating_duration_since(started).as_micros() as u64;
<!-- greyfinch-sync:Marvisak/VIctory:review:6081999199 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3224#pullrequestreview-6081999199). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-27T00:35:57Z. **Review:** CHANGES_REQUESTED --- Reviewed and tested `db140abf87159fc379dba3a49f1d1a2d5273aafe` on both RTX 5090 and WARP (`--features diagnostics`, `VICTORY_D3D12_DEBUG=1`; `cargo xtask policy` and default/diagnostics `clippy` are clean). There is a timing bug in `crates/victory-gpu/src/list.rs:140-160`: ```rust #[cfg(feature = "diagnostics")] let waiting = started.elapsed().as_micros() as u64; let mut state = state.lock().unwrap_or_else(|e| e.into_inner()); #[cfg(feature = "diagnostics")] let handler = std::time::Instant::now(); ``` `waiting` is sampled **before** `state.lock()`, and `handler` is sampled **after** `state.lock()`. As a result, all time spent blocked on `List::state`'s mutex is excluded from **both** `C::CallWaitUs` and `C::CallUs` (only `host_list(this)` is measured in `CallWaitUs`). Confirmed live by holding `list.state` on another thread for ~35 ms while calling `with_state(list, |_, _| {})`: - RTX 5090: `wall_ms = 35.17`, `calls = 1`, `call_us = 0`, `wait_us = 1` - WARP: `wall_ms = 35.52`, `calls = 1`, `call_us = 0`, `wait_us = 1` Sampling `handler` immediately after `state.lock()` and computing `waiting` from `handler.saturating_duration_since(started)` both fixes the missing lock-wait accounting and removes an extra `Instant::now()` call on the hot path: ```rust let mut state = state.lock().unwrap_or_else(|e| e.into_inner()); #[cfg(feature = "diagnostics")] let handler = std::time::Instant::now(); #[cfg(feature = "diagnostics")] let waiting = handler.saturating_duration_since(started).as_micros() as u64; ```
borosf commented 2026-11-27 06:38:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-27T06:38:40Z.


Folded in at 0707239 (on top of db140ab), with you as Co-authored-by: in the commit — thank you, this is a real hole in the measurement the whole frame line rests on.

What went in, exactly as you diagnosed it:

  • with_state no longer samples the wait before state.lock(): the wait is handler.duration_since(started), so it ends where the handler starts and also covers the list's own locks on the way in (the hosts lock in host_list).
  • the handler's own time is sampled before C::Calls/C::CallUs/C::CallWaitUs are updated, so the counting is not billed to the call.
  • the doc comments no longer promise the old reading ("a call that costs far more than its instructions … separates the two").

Verification on Windows 11 x64 / Arc B580: cargo test -p victory-gpu --lib --features diagnostics --locked 244 passed / 0 failed / 1 ignored (the two #1744 heap-cap tests skipped, as on main here); cargo clippy -p victory-gpu --all-targets -- -D warnings clean with and without --features diagnostics; rustfmt --edition 2024 --check hunk parity with origin/main on both files (26 = 26, 5 = 5).

I did not add a regression test: it needs a real title list and a host list behind it, and the observable is a counter in copystat, so the honest guard is your reproduction (25/90/160 ms held → 276 ms reported). If you want it in the tree, your fixture would be the one to take. Synthetic only, no game data.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7211714587 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3224#issuecomment-7211714587). Originally posted by [borosf](https://github.com/borosf) on 2026-11-27T06:38:40Z. --- Folded in at **0707239** (on top of db140ab), with you as `Co-authored-by:` in the commit — thank you, this is a real hole in the measurement the whole frame line rests on. What went in, exactly as you diagnosed it: - `with_state` no longer samples the wait before `state.lock()`: the wait is `handler.duration_since(started)`, so it ends where the handler starts and also covers the list's own locks on the way in (the `hosts` lock in `host_list`). - the handler's own time is sampled before `C::Calls`/`C::CallUs`/`C::CallWaitUs` are updated, so the counting is not billed to the call. - the doc comments no longer promise the old reading ("a call that costs far more than its instructions … separates the two"). Verification on Windows 11 x64 / Arc B580: `cargo test -p victory-gpu --lib --features diagnostics --locked` 244 passed / 0 failed / 1 ignored (the two #1744 heap-cap tests skipped, as on main here); `cargo clippy -p victory-gpu --all-targets -- -D warnings` clean with and without `--features diagnostics`; `rustfmt --edition 2024 --check` hunk parity with origin/main on both files (26 = 26, 5 = 5). I did not add a regression test: it needs a real title list and a host list behind it, and the observable is a counter in `copystat`, so the honest guard is your reproduction (25/90/160 ms held → 276 ms reported). If you want it in the tree, your fixture would be the one to take. Synthetic only, no game data.
borosf commented 2026-11-27 10:50:39 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-27T10:50:39Z.


Folded in at 07072396, and thank you for doing the measurement that made it obvious — 4-7 µs reported against 276-277 ms of real delay is exactly the kind of number that settles which side of the mutex a timer belongs on.

The change matches your f0c6f25:

  • the wait interval now ends where the handler starts, so it covers the state mutex (and the list's own locks before it)
  • the handler's time is sampled before the counters are updated
  • the Calls / CallUs / CallWaitUs doc comments no longer claim the timer "can only be read as time waiting on a submission", since it now measures that directly

Co-authored-by: andrewpozdnakov7-jpg is on the commit. CI is green on the head, the branch is mergeable, and cargo test -p victory-gpu --lib, strict clippy in both configurations and cargo xtask policy pass locally on Windows 11 x64 (Arc B580).

Synthetic tests only, no game data used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7216371601 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3224#issuecomment-7216371601). Originally posted by [borosf](https://github.com/borosf) on 2026-11-27T10:50:39Z. --- Folded in at `07072396`, and thank you for doing the measurement that made it obvious — 4-7 µs reported against 276-277 ms of real delay is exactly the kind of number that settles which side of the mutex a timer belongs on. The change matches your `f0c6f25`: - the wait interval now ends where the handler starts, so it covers the state mutex (and the list's own locks before it) - the handler's time is sampled before the counters are updated - the `Calls` / `CallUs` / `CallWaitUs` doc comments no longer claim the timer "can only be read as time waiting on a submission", since it now measures that directly `Co-authored-by: andrewpozdnakov7-jpg` is on the commit. CI is green on the head, the branch is mergeable, and `cargo test -p victory-gpu --lib`, strict clippy in both configurations and `cargo xtask policy` pass locally on Windows 11 x64 (Arc B580). Synthetic tests only, no game data used.
borosf commented 2026-11-27 11:22:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-27T11:22:40Z.


Re-review request: the one item in @fuzeofficlal's review is already satisfied at the current head (07072396), which is why I have not changed anything since.

crates/victory-gpu/src/list.rs:146-157 now keeps the incoming bytes as the saved baseline only for pages the copy-back actually owns, and every other page falls through to the pre-write baseline exactly as before. Local verification on Windows 11 x64 (Intel Arc B580): cargo test -p victory-gpu --lib watch:: --locked 16 passed / 1 ignored, cargo clippy -p victory-gpu --all-targets -- -D warnings clean, cargo xtask policy 191 files ok.

Nothing else in the PR changed since that review; if the head looks right to you, a dismissal of the stale request would let this go in.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7217002526 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3224#issuecomment-7217002526). Originally posted by [borosf](https://github.com/borosf) on 2026-11-27T11:22:40Z. --- Re-review request: the one item in @fuzeofficlal's review is already satisfied at the current head (`07072396`), which is why I have not changed anything since. `crates/victory-gpu/src/list.rs:146-157` now keeps the incoming bytes as the saved baseline only for pages the copy-back actually owns, and every other page falls through to the pre-write baseline exactly as before. Local verification on Windows 11 x64 (Intel Arc B580): `cargo test -p victory-gpu --lib watch:: --locked` 16 passed / 1 ignored, `cargo clippy -p victory-gpu --all-targets -- -D warnings` clean, `cargo xtask policy` 191 files ok. Nothing else in the PR changed since that review; if the head looks right to you, a dismissal of the stale request would let this go in.
andrewpozdnakov7-jpg commented 2026-11-27 11:28:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T11:28:20Z.


@fuzeofficlal, I checked the current head 07072396 against the timer fix I tested. Your review of db140ab flagged the wait on List::state. The current code takes handler after state.lock() and reports handler.duration_since(started), so that wait is now included in CallWaitUs. CallUs is sampled before incrementing the counters.

The entire difference from tested f0c6f25 is three comment lines in list.rs. On f0c6f25 the synthetic WARP run reported 276.3–277.0 ms for the three held locks, up from 4–7 μs on db140ab. Original WARP result · CI on the current head

Could you re-review the timing change on 07072396?

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7217113118 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3224#issuecomment-7217113118). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T11:28:20Z. --- @fuzeofficlal, I checked the current head `07072396` against the timer fix I tested. Your review of `db140ab` flagged the wait on `List::state`. The current code takes `handler` after `state.lock()` and reports `handler.duration_since(started)`, so that wait is now included in `CallWaitUs`. `CallUs` is sampled before incrementing the counters. The entire difference from tested `f0c6f25` is three comment lines in `list.rs`. On `f0c6f25` the synthetic WARP run reported 276.3–277.0 ms for the three held locks, up from 4–7 μs on `db140ab`. [Original WARP result](https://github.com/Marvisak/VIctory/pull/3224#issuecomment-7205199313) · [CI on the current head](https://github.com/Marvisak/VIctory/actions/runs/45953148329/job/140353415644) Could you re-review the timing change on `07072396`? AI-assisted with Codex.
andrewpozdnakov7-jpg commented 2026-11-27 14:11:36 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T14:11:36Z.


@borosf I checked the new diagnostic assertions on d409803. The live-list test reads the shared frame counters. I ran a second real with_state call on another thread and another synthetic list while the first handler was active. The original assertion observed two calls and failed 2 == 1.

Test follow-up 94924bd tests the same overlap and observes increments from its own thread. It bounds the lock time by the measured interval before handler entry, so a scheduling delay before entry cannot cause a spurious failure. Both diagnostic tests passed in 25 separate WARP processes with --test-threads=2. Strict GPU Clippy passed in both feature configurations, along with the asset check.

Please keep the Git author if cherry-picking or rebasing the test patch. If folding it in, add Co-authored-by: andrewpozdnakov7-jpg <[email protected]>. AI-assisted. Synthetic lists only.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7220467957 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3224#issuecomment-7220467957). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T14:11:36Z. --- @borosf I checked the new diagnostic assertions on `d409803`. The live-list test reads the shared frame counters. I ran a second real `with_state` call on another thread and another synthetic list while the first handler was active. The original assertion observed two calls and failed `2 == 1`. [Test follow-up `94924bd`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/94924bdf03d05ac5fc2f74842899a655066349bb) tests the same overlap and observes increments from its own thread. It bounds the lock time by the measured interval before handler entry, so a scheduling delay before entry cannot cause a spurious failure. Both diagnostic tests passed in 25 separate WARP processes with `--test-threads=2`. Strict GPU Clippy passed in both feature configurations, along with the asset check. Please keep the Git author if cherry-picking or rebasing the test patch. If folding it in, add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`. AI-assisted. Synthetic lists only.
borosf commented 2026-11-27 14:28:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-27T14:28:15Z.


@andrewpozdnakov7-jpg took it as a cherry-pick of 94924bd, so your authorship, message and date are untouched at 5fa8cb3, with the (cherry picked from commit 94924bd...) line kept for provenance. Nothing of yours was reworded and no Co-authored-by was needed.

What I checked on this head:

  • Your failure reproduces, and only your fix removes it. Putting count() back on the shared atomics makes the live-list test fail only this call is counted with left: 2, right: 1 — from the test's own peer call, deterministically, no timing needed. With the thread-local it passes. So the isolation is load-bearing, not just a tightening of the assertions.
  • Full victory-gpu lib suite, this head vs d409803: 246 passed / 2 failed / 1 ignored with diagnostics, 229 / 2 / 1 without — the same two failures on both trees (descriptor::host::tests::dynamic_slots_are_held_until_released, memory::tests::lists_share_a_table_and_copies_keep_their_views; they want a live device on this Arc B580). Your patch adds none.
  • Strict clippy --all-targets -- -D warnings, both feature configurations: clean.
  • Format gate on both touched files: identical diff count to base, so no formatting churn.

Bounding the wait by the interval measured before handler entry is the part that makes it robust to scheduling; reading only this thread's increments is the part that lets the test exist at all while other modules record into the same counters.

AI use: Mistral Vibe (agent) — cherry-pick, mutation check and suite runs on Windows 11 x64, Intel Arc B580.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7220823120 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3224#issuecomment-7220823120). Originally posted by [borosf](https://github.com/borosf) on 2026-11-27T14:28:15Z. --- @andrewpozdnakov7-jpg took it as a cherry-pick of `94924bd`, so your authorship, message and date are untouched at `5fa8cb3`, with the `(cherry picked from commit 94924bd...)` line kept for provenance. Nothing of yours was reworded and no `Co-authored-by` was needed. What I checked on this head: - **Your failure reproduces, and only your fix removes it.** Putting `count()` back on the shared atomics makes the live-list test fail `only this call is counted` with `left: 2, right: 1` — from the test's own peer call, deterministically, no timing needed. With the thread-local it passes. So the isolation is load-bearing, not just a tightening of the assertions. - **Full `victory-gpu` lib suite, this head vs `d409803`:** 246 passed / 2 failed / 1 ignored with `diagnostics`, 229 / 2 / 1 without — the same two failures on both trees (`descriptor::host::tests::dynamic_slots_are_held_until_released`, `memory::tests::lists_share_a_table_and_copies_keep_their_views`; they want a live device on this Arc B580). Your patch adds none. - **Strict clippy** `--all-targets -- -D warnings`, both feature configurations: clean. - **Format gate** on both touched files: identical diff count to base, so no formatting churn. Bounding the wait by the interval measured before handler entry is the part that makes it robust to scheduling; reading only this thread's increments is the part that lets the test exist at all while other modules record into the same counters. _AI use: Mistral Vibe (agent) — cherry-pick, mutation check and suite runs on Windows 11 x64, Intel Arc B580._
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/3224:upstream-pr/3224'
git switch 'upstream-pr/3224'

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