GPU: a command-list 64-bit memory wait lets the consumer read before its producer writes #700

Open
opened 2026-11-26 04:13:30 +00:00 by github-bot · 19 comments
Owner

@⁠ifBars on GitHub · 2026-11-24 07:02 UTC · original

On main d2a4bae1, I reproduced a stale read through the guest command-list and queue tables with the diagnostics build on Microsoft WARP. The list's 64-bit memory wait currently returns immediately. PR #32 implements queue fence waits and explicitly leaves this separate command-list method open.

Synthetic reproduction

Create two guest direct queues, one closed list on each, and three live 64-bit words initially zero. Keep the lists, queues, and words alive throughout.

  1. The producer list records bottom-of-pipe value writes of 0x5a55a11c into the payload and 2 into the counter, in that order.
  2. The consumer list records a 64-bit wait for the counter to be greater than or equal to 1, then copies eight bytes from the payload to the result.
  3. Submit both through ExecuteCommandLists. Run once producer-first and once consumer-first on fresh objects.
Submission order Final counter Final payload Result
Producer first 2 0x5a55a11c 0x5a55a11c
Consumer first 2 0x5a55a11c 0

Once the producer completes and releases the consumer, the expected result is 0x5a55a11c in both cases. Blocking the submitting CPU thread at the first Execute would deadlock the consumer-first case. A wait in the middle of a list also needs to preserve work before it.

ABI evidence

On retail build 1.0.2.1, I found two call sites on the newer list layout that pass comparison 7 and a full-width reference. They supply a 32-bit trailing argument of 0 and 1 respectively. This agrees with the XCL 64-bit implementation, which compares the full word. The 32-bit command has a distinct signature.

This establishes a command-ordering regression with synthetic data. Its contribution to the black frame or device removal in #71 is unmeasured. No title run or game data was needed for the reproduction. AI-assisted investigation and verification with Codex.

**@⁠ifBars** on GitHub · 2026-11-24 07:02 UTC · [original](https://github.com/Marvisak/VIctory/issues/700) On main `d2a4bae1`, I reproduced a stale read through the guest command-list and queue tables with the diagnostics build on Microsoft WARP. The list's 64-bit memory wait currently returns immediately. PR #32 implements queue fence waits and explicitly leaves this separate command-list method open. ## Synthetic reproduction Create two guest direct queues, one closed list on each, and three live 64-bit words initially zero. Keep the lists, queues, and words alive throughout. 1. The producer list records bottom-of-pipe value writes of `0x5a55a11c` into the payload and `2` into the counter, in that order. 2. The consumer list records a 64-bit wait for the counter to be greater than or equal to `1`, then copies eight bytes from the payload to the result. 3. Submit both through ExecuteCommandLists. Run once producer-first and once consumer-first on fresh objects. | Submission order | Final counter | Final payload | Result | | --- | ---: | ---: | ---: | | Producer first | 2 | 0x5a55a11c | 0x5a55a11c | | Consumer first | 2 | 0x5a55a11c | 0 | Once the producer completes and releases the consumer, the expected result is `0x5a55a11c` in both cases. Blocking the submitting CPU thread at the first Execute would deadlock the consumer-first case. A wait in the middle of a list also needs to preserve work before it. ## ABI evidence On retail build 1.0.2.1, I found two call sites on the newer list layout that pass comparison 7 and a full-width reference. They supply a 32-bit trailing argument of 0 and 1 respectively. This agrees with the [XCL 64-bit implementation](https://github.com/ivall/xcl/blob/beaa245ca04e212f064efc7cafcdce104bc5c0a2/crates/xcl/src/hle/d3d12x/list_x.rs#L2459-L2470), which compares the full word. The 32-bit command has a distinct signature. This establishes a command-ordering regression with synthetic data. Its contribution to the black frame or device removal in #71 is unmeasured. No title run or game data was needed for the reproduction. AI-assisted investigation and verification with Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:13:30 +00:00
Author
Owner

@⁠ifBars on GitHub · 2026-11-24 07:24 UTC · original

Microsoft has a public Xbox sample for this exact pair. The graphics list draws its independent geometry, calls Wait64BitValueX(address, comparison, value, flags), then starts the color pass. The compute list publishes the matching counter with Write64BitValueBottomOfPipeX. This gives us a mid-list test case as well as the leading-wait case above. The sample uses equality. The synthetic reproduction above uses greater-than-or-equal.

Graphics consumer · Compute producer

**@⁠ifBars** on GitHub · 2026-11-24 07:24 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7124957652) Microsoft has a public Xbox sample for this exact pair. The graphics list draws its independent geometry, calls `Wait64BitValueX(address, comparison, value, flags)`, then starts the color pass. The compute list publishes the matching counter with `Write64BitValueBottomOfPipeX`. This gives us a mid-list test case as well as the leading-wait case above. The sample uses equality. The synthetic reproduction above uses greater-than-or-equal. [Graphics consumer](https://github.com/microsoft/Xbox-GDK-Samples/blob/b1e77b6ac10f95b07296025fda171ca2ddc42dbe/Samples/Graphics/PipelinedPostprocess/PipelinedPostprocess.cpp#L282-L310) · [Compute producer](https://github.com/microsoft/Xbox-GDK-Samples/blob/b1e77b6ac10f95b07296025fda171ca2ddc42dbe/Samples/Graphics/PipelinedPostprocess/PipelinedPostprocess.cpp#L393-L409)
Author
Owner

@⁠LAKSHYA-cmd-tech on GitHub · 2026-11-24 07:33 UTC · original

Verified the reproduction and ABI analysis on Windows 11 MSVC:

  1. Reproduction confirmation: On current main, wait_value in crates/victory-gpu/src/list.rs:1218 is an empty stub (extern system fn wait_value ... {}). When a consumer list records a wait_value followed by a memory copy, and is submitted before the producer queue executes its bottom-of-pipe write, the consumer executes immediately against stale memory.
  2. Non-blocking deferral requirement: As noted in the issue, blocking synchronously inside ExecuteCommandLists would deadlock when both queues are submitted sequentially from the same thread.
  3. Queue timeline integration: PR #32 introduces the asynchronous Timeline pattern (Op::Wait and Op::Run) that allows work behind an unsatisfied condition to remain held without blocking the submitting thread, woken when the producer's bottom-of-pipe write executes. Command-list wait_value can cleanly integrate with the timeline/held-op mechanism.
**@⁠LAKSHYA-cmd-tech** on GitHub · 2026-11-24 07:33 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7125122258) Verified the reproduction and ABI analysis on Windows 11 MSVC: 1. **Reproduction confirmation**: On current main, wait_value in crates/victory-gpu/src/list.rs:1218 is an empty stub (extern system fn wait_value ... {}). When a consumer list records a wait_value followed by a memory copy, and is submitted before the producer queue executes its bottom-of-pipe write, the consumer executes immediately against stale memory. 2. **Non-blocking deferral requirement**: As noted in the issue, blocking synchronously inside ExecuteCommandLists would deadlock when both queues are submitted sequentially from the same thread. 3. **Queue timeline integration**: PR #32 introduces the asynchronous Timeline pattern (Op::Wait and Op::Run) that allows work behind an unsatisfied condition to remain held without blocking the submitting thread, woken when the producer's bottom-of-pipe write executes. Command-list wait_value can cleanly integrate with the timeline/held-op mechanism.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-24 07:34 UTC · original

I extended the synthetic reproduction on d2a4bae using the same guest list and queue paths, on both RTX 5090 and WARP. The consumer list writes a bottom-of-pipe prefix marker, does the 64-bit wait, then copies the payload and writes a suffix marker. A second list in the same ExecuteCommandLists call writes a separate marker. The producer uses a different guest queue. I tested equality with matching low bits but different high bits initially, and greater-or-equal with a reference above the 32-bit range.

Both producer-first controls copied the expected payload on each backend. With the consumer first, its submit returned with the prefix, suffix and following-list markers already written. The copy had replaced its sentinel with zero. The producer then wrote the payload and full-width counter, but the result stayed zero.

The useful acceptance check is to see the prefix marker and the original result sentinel before the producer submits, with neither later marker set. After the producer releases the wait, the result and both later markers should be visible. On main the memory copy runs during host preparation, so the wait needs to hold the suffix and following list before that stage, while leaving the producer queue free to submit.

**@⁠fuzeofficlal** on GitHub · 2026-11-24 07:34 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7125142650) I extended the synthetic reproduction on `d2a4bae` using the same guest list and queue paths, on both RTX 5090 and WARP. The consumer list writes a bottom-of-pipe prefix marker, does the 64-bit wait, then copies the payload and writes a suffix marker. A second list in the same `ExecuteCommandLists` call writes a separate marker. The producer uses a different guest queue. I tested equality with matching low bits but different high bits initially, and greater-or-equal with a reference above the 32-bit range. Both producer-first controls copied the expected payload on each backend. With the consumer first, its submit returned with the prefix, suffix and following-list markers already written. The copy had replaced its sentinel with zero. The producer then wrote the payload and full-width counter, but the result stayed zero. The useful acceptance check is to see the prefix marker and the original result sentinel before the producer submits, with neither later marker set. After the producer releases the wait, the result and both later markers should be visible. On main the memory copy runs during host preparation, so the wait needs to hold the suffix and following list before that stage, while leaving the producer queue free to submit.
Author
Owner

@⁠cj5k9dnkfd-afk on GitHub · 2026-11-24 07:40 UTC · original

Hi anyone have the gameLink it something

**@⁠cj5k9dnkfd-afk** on GitHub · 2026-11-24 07:40 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7125249695) Hi anyone have the gameLink it something
Author
Owner

@⁠NuraadGit on GitHub · 2026-11-24 07:52 UTC · original

In-title measurement: the world hits this case continuously. About 29% of list 64-bit waits are still unmet when VIctory submits the list, and none of them is satisfied by a write earlier in the same list.

Setup: RTX 2080, Windows 11, Xbox Series 1.0.2.1, diag build of d2a4bae + #493 + #189 + #206 (the set that keeps the world up here; see #71), VICTORY_SHADER_LOOP_LIMIT=32, Enter-only input to the world, a ~4.5-min run. The wait_value stub in list.rs got a temporary probe:

  • At record time: log the address, comparison and reference, and read the current value with host::read_into.
  • At submit time: a defer_host step re-reads the value when run_deferred reaches the wait.
  • Same-list check: each list's defer_write addresses since its last reset are kept, so a wait can be split into two cases. Either an earlier write in the same list produces the value (in order on the GPU, harmless), or another list does (this issue).

Results (counts over the whole run; menus and loading have none unmet):

waits unmet at submit of which produced by an earlier write in the same list
first 1024 (menus/loading) 1024 0 0
up to 2048 2048 220 0
up to 4096 (world) 4096 1193 0
  • All of them use comparison 7 with a full 64-bit reference, matching the ABI note above.
  • Two address families:
    • 0xdd2b00000: unmet at record time but always met by submit, so its producer is submitted first.
    • 16 counters at 0xd0417fe00–0xd04180080 (8-byte stride, not contiguous): these are the unmet ones. Each waits for reference = now + 1 (rarely +2), a per-frame counter that another list has not yet written when the consumer runs. The first ones in the world wait on counters that are still 0 (e.g. reference=0x633 now=0x0).
  • What it means today: with wait_value a no-op, those consumer lists run with the producer's previous-frame data, or zeros the first time. I haven't yet shown how much of the black scene this explains. That needs a scheduler that holds the consumer until the producer list's writes land. As you note, blocking at Execute deadlocks the consumer-first case, so it has to be queue-level.

Probe patch (diagnostics only, not for merging) on request.

AI-assisted (Claude Code): the probe, runs and log summary were automated. The hardware, title copy and runs are the user's.

**@⁠NuraadGit** on GitHub · 2026-11-24 07:52 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7125473196) **In-title measurement: the world hits this case continuously. About 29% of list 64-bit waits are still unmet when VIctory submits the list, and none of them is satisfied by a write earlier in the same list.** Setup: RTX 2080, Windows 11, Xbox Series 1.0.2.1, diag build of `d2a4bae` + #493 + #189 + #206 (the set that keeps the world up here; see #71), `VICTORY_SHADER_LOOP_LIMIT=32`, Enter-only input to the world, a ~4.5-min run. The `wait_value` stub in `list.rs` got a temporary probe: - **At record time:** log the address, comparison and reference, and read the current value with `host::read_into`. - **At submit time:** a `defer_host` step re-reads the value when `run_deferred` reaches the wait. - **Same-list check:** each list's `defer_write` addresses since its last `reset` are kept, so a wait can be split into two cases. Either an earlier write in the *same* list produces the value (in order on the GPU, harmless), or another list does (this issue). Results (counts over the whole run; menus and loading have none unmet): | | waits | unmet at submit | of which produced by an earlier write in the same list | |---|---|---|---| | first 1024 (menus/loading) | 1024 | 0 | 0 | | up to 2048 | 2048 | 220 | 0 | | up to 4096 (world) | 4096 | **1193** | **0** | - **All of them use comparison 7** with a full 64-bit reference, matching the ABI note above. - **Two address families:** - `0xdd2b00000`: unmet at record time but always met by submit, so its producer is submitted first. - 16 counters at `0xd0417fe00`–`0xd04180080` (8-byte stride, not contiguous): these are the unmet ones. Each waits for `reference = now + 1` (rarely +2), a per-frame counter that another list has not yet written when the consumer runs. The first ones in the world wait on counters that are still `0` (e.g. `reference=0x633 now=0x0`). - **What it means today:** with `wait_value` a no-op, those consumer lists run with the producer's previous-frame data, or zeros the first time. I haven't yet shown how much of the black scene this explains. That needs a scheduler that holds the consumer until the producer list's writes land. As you note, blocking at Execute deadlocks the consumer-first case, so it has to be queue-level. Probe patch (diagnostics only, not for merging) on request. *AI-assisted (Claude Code): the probe, runs and log summary were automated. The hardware, title copy and runs are the user's.*
Author
Owner

@⁠AlanQiang0418 on GitHub · 2026-11-24 07:59 UTC · original

A fix is ready, but I can't open a PR while PR creation is limited to collaborators (#712): branch AlanQiang0418:claude/list-memory-waits, commit 8dc74b6, on main d2a4bae.

  • Lists record their Wait32BitValueX / Wait64BitValueX waits. A wait is over once (value & mask) <comparison> reference, the comparison a D3D12_COMPARISON_FUNC; the 64-bit form compares the whole word, the argument after the value being flags.
  • A submission runs up to its first list whose wait is not over. That list, the rest of the submission, and later submissions and signals on the same queue are held in order without blocking the submitting thread. They run once the value is there: at any submission or signal, and every millisecond while anything is held.
  • A wait not over after 2 s is taken as over, with a warning.
  • Shortcut: a list waits as a whole, so work before a mid-list wait is delayed, not dropped.

Your reproduction is ported as a_list_waiting_for_a_value_runs_once_it_is_written: consumer first, producer first, and both in one submission, with a fence signalled after the consumer. Each gives 0x5a55a11c, with the fence at 1 only after the consumer ran. It fails on the old code. cargo test -p victory-gpu passes on an RTX 5080 (46) and on WARP with diagnostics (48). No game data.

I'll open the PR when PR creation reopens. AI-assisted (Claude Code).

**@⁠AlanQiang0418** on GitHub · 2026-11-24 07:59 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7125589007) A fix is ready, but I can't open a PR while PR creation is limited to collaborators (#712): branch [AlanQiang0418:claude/list-memory-waits](https://github.com/AlanQiang0418/VIctory/tree/claude/list-memory-waits), commit `8dc74b6`, on `main` `d2a4bae`. - Lists record their `Wait32BitValueX` / `Wait64BitValueX` waits. A wait is over once `(value & mask) <comparison> reference`, the comparison a `D3D12_COMPARISON_FUNC`; the 64-bit form compares the whole word, the argument after the value being flags. - A submission runs up to its first list whose wait is not over. That list, the rest of the submission, and later submissions and signals on the same queue are held in order without blocking the submitting thread. They run once the value is there: at any submission or signal, and every millisecond while anything is held. - A wait not over after 2 s is taken as over, with a warning. - Shortcut: a list waits as a whole, so work before a mid-list wait is delayed, not dropped. Your reproduction is ported as `a_list_waiting_for_a_value_runs_once_it_is_written`: consumer first, producer first, and both in one submission, with a fence signalled after the consumer. Each gives `0x5a55a11c`, with the fence at 1 only after the consumer ran. It fails on the old code. `cargo test -p victory-gpu` passes on an RTX 5080 (46) and on WARP with `diagnostics` (48). No game data. I'll open the PR when PR creation reopens. AI-assisted (Claude Code).
Author
Owner

@⁠NuraadGit on GitHub · 2026-11-24 08:28 UTC · original

@⁠AlanQiang0418 I tested 8dc74b6 (merged cleanly) on the RTX 2080 stack from my measurement above. On this card it makes the world lose the device almost immediately.

Build (all d2a4bae + #493 + #189 + #206, VICTORY_SHADER_LOOP_LIMIT=32, DRED, Enter-only input) Runs
without 8dc74b6 stayed up 3 of 3 (one run 21 min in the world)
with 8dc74b6 removed ~3 s into the world; removed at world entry
  • Run 1: 0x887A0006 3 s after the first world frame. No breadcrumbs. Compute ebf622dcaeae13db was in the in-flight set.
  • Run 2: removed at the very first world submission: a submission of 1 lists … list 0 of 1, of its 131: dispatch 7x1x1 [compute 3cf39f4495b908d0]. That is the compute program @⁠matheushagedorn found most dispatched in the hung Linux list above.
  • Before world entry: menus and loading ran normally at 24–30 fps in both runs.

Two readings:

  1. With the waits honoured, these compute passes now run in the console order, read the producer's real data, and that exposes a hang in them.
  2. The holding or release order differs from what the title expects across queues.

I haven't told the two apart. A run with your change and VICTORY_SKIP_PIPELINES=3cf39f4495b908d0,ebf622dcaeae13db would separate them. I can do that if useful.

AI-assisted (Claude Code): the builds, runs and summary were automated. The hardware, title copy and runs are the user's.

**@⁠NuraadGit** on GitHub · 2026-11-24 08:28 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7126177036) @⁠AlanQiang0418 I tested `8dc74b6` (merged cleanly) on the RTX 2080 stack from my measurement above. On this card it makes the world lose the device almost immediately. | Build (all `d2a4bae` + #493 + #189 + #206, `VICTORY_SHADER_LOOP_LIMIT=32`, DRED, Enter-only input) | Runs | |---|---| | without `8dc74b6` | stayed up 3 of 3 (one run 21 min in the world) | | with `8dc74b6` | removed ~3 s into the world; removed at world entry | - **Run 1:** `0x887A0006` 3 s after the first world frame. No breadcrumbs. Compute `ebf622dcaeae13db` was in the in-flight set. - **Run 2:** removed at the very first world submission: `a submission of 1 lists … list 0 of 1, of its 131: dispatch 7x1x1 [compute 3cf39f4495b908d0]`. That is the compute program @⁠matheushagedorn found most dispatched in the hung Linux list above. - **Before world entry:** menus and loading ran normally at 24–30 fps in both runs. Two readings: 1. With the waits honoured, these compute passes now run in the console order, read the producer's real data, and that exposes a hang in them. 2. The holding or release order differs from what the title expects across queues. I haven't told the two apart. A run with your change and `VICTORY_SKIP_PIPELINES=3cf39f4495b908d0,ebf622dcaeae13db` would separate them. I can do that if useful. *AI-assisted (Claude Code): the builds, runs and summary were automated. The hardware, title copy and runs are the user's.*
Author
Owner

@⁠NuraadGit on GitHub · 2026-11-24 08:29 UTC · original

Follow-up to my last comment: I skipped those two compute programs (VICTORY_SKIP_PIPELINES=3cf39f4495b908d0,ebf622dcaeae13db) on the same 8dc74b6 build, and the device is still removed at world entry. This time the stop is an ordinary draw: list 0 of 3, of its 288: indexed 36x1 [vertex 861bd1a467a31f9b, pixel e63bdd53a9b47da8], with no breadcrumbs.

So on this card the failure follows whatever runs first after lists start being held. It does not follow particular programs. That points at the holding and release path (reading 2) rather than at shaders hanging on real data. Without 8dc74b6 the same stack runs 21 min in the world.

AI-assisted (Claude Code).

**@⁠NuraadGit** on GitHub · 2026-11-24 08:29 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7126207546) Follow-up to my last comment: I skipped those two compute programs (`VICTORY_SKIP_PIPELINES=3cf39f4495b908d0,ebf622dcaeae13db`) on the same `8dc74b6` build, and the device is **still removed at world entry**. This time the stop is an ordinary draw: `list 0 of 3, of its 288: indexed 36x1 [vertex 861bd1a467a31f9b, pixel e63bdd53a9b47da8]`, with no breadcrumbs. So on this card the failure follows whatever runs first after lists start being held. It does not follow particular programs. That points at the holding and release path (reading 2) rather than at shaders hanging on real data. Without `8dc74b6` the same stack runs 21 min in the world. *AI-assisted (Claude Code).*
Author
Owner

@⁠AndyLatimer on GitHub · 2026-11-24 08:44 UTC · original

A fix for this is on a branch, because new pull requests are closed right now (#717): AndyLatimer:fix/gpu-list-wait-value, commit a9a7985. It is stacked on #32 because it uses that PR's queue timeline. Only the last commit is new. I'll open the PR once creation is allowed again.

What it does:

  • Recording. The 64-bit wait (0x240, 0x250 in newer lists) closes the host list recorded so far, and recording goes on in a new one. The draw state is set again on the new list: topology, targets, viewports, scissors, blend factor and stencil reference right away; heaps, root signature and pipeline at the next draw.
  • Submission. ExecuteCommandLists runs each part as its own host submission. Between two parts it holds the queue on its timeline until the word compares true. The submitting thread never blocks, so submitting the consumer first does not deadlock, and work before the wait runs at once.
  • Waking. Bottom-of-pipe writes and fence signals on the word wake the queue. The fence watcher polls other writes (CPU writes, shader copy-back).
  • Comparison. D3D12_COMPARISON_FUNC on the full 64-bit word, as in the call sites above (7 with a full-width reference). ALWAYS, NEVER and unknown values are not held. The trailing flags argument is ignored.
  • Not covered. The 32-bit wait stays a no-op, because its arguments are not known.

Test: the reproduction above with the consumer first, plus the markers before and after the wait from @⁠fuzeofficlal's acceptance check. Before the producer runs, the marker before the wait is set, the result still holds its sentinel, and the marker after the wait is not set. Once the producer's list runs, the result is 0x5a55a11c and the marker after the wait is set. Without the change the result is 0, as in the table. cargo test -p victory-gpu --lib passes (56 passed, 1 ignored, 0 failures in 30 runs) on Windows 11 with the hardware adapter, and the diagnostics build compiles.

Not run with the title, so the effect on #71 and the device removals is not measured. AI-assisted.

**@⁠AndyLatimer** on GitHub · 2026-11-24 08:44 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7126503562) A fix for this is on a branch, because new pull requests are closed right now (#717): [`AndyLatimer:fix/gpu-list-wait-value`](https://github.com/AndyLatimer/VIctory/tree/fix/gpu-list-wait-value), commit [`a9a7985`](https://github.com/AndyLatimer/VIctory/commit/a9a7985a3c7fe38a4983717b195ad4a4072a3032). It is stacked on #32 because it uses that PR's queue timeline. Only the last commit is new. I'll open the PR once creation is allowed again. What it does: - **Recording.** The 64-bit wait (0x240, 0x250 in newer lists) closes the host list recorded so far, and recording goes on in a new one. The draw state is set again on the new list: topology, targets, viewports, scissors, blend factor and stencil reference right away; heaps, root signature and pipeline at the next draw. - **Submission.** `ExecuteCommandLists` runs each part as its own host submission. Between two parts it holds the queue on its timeline until the word compares true. The submitting thread never blocks, so submitting the consumer first does not deadlock, and work before the wait runs at once. - **Waking.** Bottom-of-pipe writes and fence signals on the word wake the queue. The fence watcher polls other writes (CPU writes, shader copy-back). - **Comparison.** `D3D12_COMPARISON_FUNC` on the full 64-bit word, as in the call sites above (7 with a full-width reference). `ALWAYS`, `NEVER` and unknown values are not held. The trailing flags argument is ignored. - **Not covered.** The 32-bit wait stays a no-op, because its arguments are not known. Test: the reproduction above with the consumer first, plus the markers before and after the wait from @⁠fuzeofficlal's acceptance check. Before the producer runs, the marker before the wait is set, the result still holds its sentinel, and the marker after the wait is not set. Once the producer's list runs, the result is `0x5a55a11c` and the marker after the wait is set. Without the change the result is 0, as in the table. `cargo test -p victory-gpu --lib` passes (56 passed, 1 ignored, 0 failures in 30 runs) on Windows 11 with the hardware adapter, and the `diagnostics` build compiles. Not run with the title, so the effect on #71 and the device removals is not measured. AI-assisted.
Author
Owner

@⁠LAKSHYA-cmd-tech on GitHub · 2026-11-24 09:03 UTC · original

Verified \AndyLatimer:fix/gpu-list-wait-value\ merged cleanly onto latest upstream main (\8e79c80):

  • Synthetic Acceptance Test: \list::tests::work_after_a_memory_wait_runs_once_another_queue_writes_the_word\ passed on Windows 11 MSVC with host hardware adapter. Work preceding the wait runs immediately; prefix marker is written while result sentinel remains untouched and suffix marker is held until producer writes bottom-of-pipe value.
  • Suite Result: All 63 tests in \crates/victory-gpu\ passed, 0 failures, clippy clean, and \cargo xtask policy\ passed (154 files ok).
  • Fork Branch: Available on fork branch \ ix/gpu-list-wait-value\ (rebased with latest main CI and BCPack updates).
**@⁠LAKSHYA-cmd-tech** on GitHub · 2026-11-24 09:03 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7126904479) Verified \AndyLatimer:fix/gpu-list-wait-value\ merged cleanly onto latest upstream main (\8e79c80\): - **Synthetic Acceptance Test**: \list::tests::work_after_a_memory_wait_runs_once_another_queue_writes_the_word\ passed on Windows 11 MSVC with host hardware adapter. Work preceding the wait runs immediately; prefix marker is written while result sentinel remains untouched and suffix marker is held until producer writes bottom-of-pipe value. - **Suite Result**: All 63 tests in \crates/victory-gpu\ passed, 0 failures, clippy clean, and \cargo xtask policy\ passed (154 files ok). - **Fork Branch**: Available on fork branch \ ix/gpu-list-wait-value\ (rebased with latest main CI and BCPack updates).
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-24 08:58 UTC · original · edited 2026-11-24 09:23 UTC

AlanQiang0418 at 8dc74b6. A held submission retains the guest list and later reads its current host recording. Guest Reset clears the uploads and resets that recording in place, so recording B can replace the already submitted A. A synthetic test can submit A with a pending wait and a marker, reset with a second allocator, then close B without submitting it. When the producer releases the wait, only A should run. #32 has the relevant ownership pattern of retaining the submitted host recording and detaching it on reset. The CPU model reproduces the recording substitution. Its connection to the reported device removal remains unconfirmed. Queue retention and retry · Guest reset

Windows D3D12 WARP follow-up. I ran the reset-while-held regression 10 times on each pinned revision. Both recordings used the same pending wait and wrote separate markers. A was submitted, then the guest list was reset with a second allocator and B was closed without being submitted. The test waited for the consumer fence after the producer released the wait.

  • AlanQiang0418 at 8dc74b6 wrote B's marker and left A's marker untouched in 10/10 runs.
  • KLeek5 at 50ebfa1 wrote A's marker and left B's marker untouched in 10/10 runs.

The test on 8dc74b6 paused retries only while the guest reset and re-recorded B, then let the normal queue path resume. This isolates which recording the queue picked. The test used synthetic input on the software adapter. The cause of the reported in-title device removal remains unconfirmed.

AI-assisted source review and CPU/WARP checks.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-24 08:58 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7126804825) · edited 2026-11-24 09:23 UTC **AlanQiang0418 at `8dc74b6`.** A held submission retains the guest list and later reads its current host recording. Guest `Reset` clears the uploads and resets that recording in place, so recording B can replace the already submitted A. A synthetic test can submit A with a pending wait and a marker, reset with a second allocator, then close B without submitting it. When the producer releases the wait, only A should run. #32 has the relevant ownership pattern of retaining the submitted host recording and detaching it on reset. The CPU model reproduces the recording substitution. Its connection to the reported device removal remains unconfirmed. [Queue retention and retry](https://github.com/AlanQiang0418/VIctory/blob/8dc74b6755d787d8339480b21db77e0778a7f42f/crates/victory-gpu/src/queue.rs#L301-L365) · [Guest reset](https://github.com/AlanQiang0418/VIctory/blob/8dc74b6755d787d8339480b21db77e0778a7f42f/crates/victory-gpu/src/list.rs#L254-L275) **Windows D3D12 WARP follow-up.** I ran the reset-while-held regression 10 times on each pinned revision. Both recordings used the same pending wait and wrote separate markers. A was submitted, then the guest list was reset with a second allocator and B was closed without being submitted. The test waited for the consumer fence after the producer released the wait. - AlanQiang0418 at `8dc74b6` wrote B's marker and left A's marker untouched in 10/10 runs. - KLeek5 at `50ebfa1` wrote A's marker and left B's marker untouched in 10/10 runs. The test on `8dc74b6` paused retries only while the guest reset and re-recorded B, then let the normal queue path resume. This isolates which recording the queue picked. The test used synthetic input on the software adapter. The cause of the reported in-title device removal remains unconfirmed. AI-assisted source review and CPU/WARP checks.
Author
Owner

@⁠NuraadGit on GitHub · 2026-11-24 09:48 UTC · original

@⁠AlanQiang0418 I found why 8dc74b6 removes the device here, and the fix is on a branch: NuraadGit:gpu/held-list-reset, commit 8168962 on top of yours, +27 lines plus a test.

  • Cause: D3D12 lets a title Reset a list as soon as it has submitted it. Held work names the title's lists and run executes whatever host_list(l) holds when the wait ends. If the title has reset the list and is recording it again, the host executes an open or different list. Our removal reason was "the application made a call that is invalid", not a hang.
  • Fix: held::list_reset(list), called at the top of list::reset. It runs the held work that names the list first, up to and including it and whole, in queue order.
  • Test: a_held_list_the_title_resets_runs_first holds a list on a counter nothing writes, resets it, and checks the queue no longer holds it and that its copy ran with the submitted commands. It fails without the change. Your two tests still pass, all three on the RTX 2080.
  • In the title (RTX 2080, with #493 + #189 + #206, loop limit 32): the world now runs to my 7-min cap. Without the fix it lost the device at world entry, 2 of 2 runs.

Two more things the run showed:

  1. Many waits time out. The 2-s give-up fired 234 times in ~5.5 min. The waits on the 16 counters at 0xd0417fe00–0xd04180080 from my measurement above often aren't satisfied by any write the branch models. So those counters are probably written on a path you don't see, likely by shaders through UAVs, or copied back. Frames got slower: 2.9–4.1 s, with copy-back up to 40–52 MB.
  2. Black scene not checked yet. My frame captures missed the world (it ran slower than my capture list assumed). A rerun with captures across the world range is next.

The reset path is logged with your "not over after 2 s" warning (a shortcut: in the commit); tell me if you'd rather it had its own message.

AI-assisted (Claude Code): the fix, test and runs were automated. The hardware, title copy and runs are the user's.

**@⁠NuraadGit** on GitHub · 2026-11-24 09:48 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7127923225) @⁠AlanQiang0418 I found why `8dc74b6` removes the device here, and the fix is on a branch: [NuraadGit:gpu/held-list-reset](https://github.com/NuraadGit/VIctory/tree/gpu/held-list-reset), commit `8168962` on top of yours, +27 lines plus a test. - **Cause:** D3D12 lets a title `Reset` a list as soon as it has submitted it. Held work names the title's lists and `run` executes whatever `host_list(l)` holds when the wait ends. If the title has reset the list and is recording it again, the host executes an open or different list. Our removal reason was *"the application made a call that is invalid"*, not a hang. - **Fix:** `held::list_reset(list)`, called at the top of `list::reset`. It runs the held work that names the list first, up to and including it and whole, in queue order. - **Test:** `a_held_list_the_title_resets_runs_first` holds a list on a counter nothing writes, resets it, and checks the queue no longer holds it and that its copy ran with the submitted commands. It fails without the change. Your two tests still pass, all three on the RTX 2080. - **In the title** (RTX 2080, with #493 + #189 + #206, loop limit 32): the world now runs to my 7-min cap. Without the fix it lost the device at world entry, 2 of 2 runs. Two more things the run showed: 1. **Many waits time out.** The 2-s give-up fired 234 times in ~5.5 min. The waits on the 16 counters at `0xd0417fe00`–`0xd04180080` from my measurement above often aren't satisfied by any write the branch models. So those counters are probably written on a path you don't see, likely by shaders through UAVs, or copied back. Frames got slower: 2.9–4.1 s, with copy-back up to 40–52 MB. 2. **Black scene not checked yet.** My frame captures missed the world (it ran slower than my capture list assumed). A rerun with captures across the world range is next. The reset path is logged with your "not over after 2 s" warning (a `shortcut:` in the commit); tell me if you'd rather it had its own message. *AI-assisted (Claude Code): the fix, test and runs were automated. The hardware, title copy and runs are the user's.*
Author
Owner

@⁠KLeek5 on GitHub · 2026-11-24 09:06 UTC · original · edited 2026-11-24 10:01 UTC

An updated fix is available on [KLeek5:fix/gpu-wait64-v3](https://github.com/KLeek5/VIctory/tree/fix/gpu-wait64-v3), commit [836490b](https://github.com/KLeek5/VIctory/commit/836490b9690c0215a66914f47269783bc12aa86e). It integrates main 8e79c80 and the source tree of #32 at 9c5328d. I'll open a PR once creation is allowed again (#717).

What it does:

  • Recording. Splits host lists at wait boundaries, avoiding empty native segments for consecutive waits.
  • Submission. Runs the prefix immediately and holds subsequent work until the predicate is satisfied, without blocking the submitting thread. Preserves submitted recordings across guest resets.
  • Waking. Bottom-of-pipe writes and CPU/queue Signal capture satisfied predicates before subsequent writes. Other writes are polled. No forced timeout.
  • Comparison. Supports masked 32-bit and full-width 64-bit waits with all eight D3D12_COMPARISON_FUNC modes.
  • Memory. Uses checked guest-memory reads and releases resources for impossible predicates.

Tests: 14/14 shared scenarios, 79/79 GPU tests (including ignored), and 400/400 stress runs passed on each of WARP and RTX 3050. Short equality tests passed 16/16 for each Signal path on both adapters.

Nonzero flags, transient external writes, and end-to-end UAV/copy-back behavior remain unverified. Full workspace CI was blocked by a missing dependency. Not tested with the title; independent testing is welcome.

**@⁠KLeek5** on GitHub · 2026-11-24 09:06 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7126968047) · edited 2026-11-24 10:01 UTC An updated fix is available on [`[KLeek5:fix/gpu-wait64-v3](https://github.com/KLeek5/VIctory/tree/fix/gpu-wait64-v3)`](https://github.com/KLeek5/VIctory/tree/fix/gpu-wait64-v3), commit [`[836490b](https://github.com/KLeek5/VIctory/commit/836490b9690c0215a66914f47269783bc12aa86e)`](https://github.com/KLeek5/VIctory/commit/836490b9690c0215a66914f47269783bc12aa86e). It integrates main `8e79c80` and the source tree of #32 at `9c5328d`. I'll open a PR once creation is allowed again (#717). What it does: - **Recording.** Splits host lists at wait boundaries, avoiding empty native segments for consecutive waits. - **Submission.** Runs the prefix immediately and holds subsequent work until the predicate is satisfied, without blocking the submitting thread. Preserves submitted recordings across guest resets. - **Waking.** Bottom-of-pipe writes and CPU/queue Signal capture satisfied predicates before subsequent writes. Other writes are polled. No forced timeout. - **Comparison.** Supports masked 32-bit and full-width 64-bit waits with all eight `D3D12_COMPARISON_FUNC` modes. - **Memory.** Uses checked guest-memory reads and releases resources for impossible predicates. Tests: 14/14 shared scenarios, 79/79 GPU tests (including ignored), and 400/400 stress runs passed on each of WARP and RTX 3050. Short equality tests passed 16/16 for each Signal path on both adapters. Nonzero flags, transient external writes, and end-to-end UAV/copy-back behavior remain unverified. Full workspace CI was blocked by a missing dependency. Not tested with the title; independent testing is welcome.
Author
Owner

@⁠NuraadGit on GitHub · 2026-11-24 10:11 UTC · original

Image result for 8dc74b6 + 8168962 on the RTX 2080 (#493 + #189 + #206, loop limit 32, ~4 min in the world): the presented world frame doesn't change.

Build World frames: non-zero pixels Max value (of 255) Mean
without the wait branch 33–35 % 2 0.34–0.35
with 8dc74b6 + 8168962 34–35 % 2 0.36

Both stay near black: faint noise, no image. So honouring the list waits, on its own, isn't what's missing for the black scene here, though it may be one of several things. The title-card and transition frames before the world look the same with or without it.

AI-assisted (Claude Code).

**@⁠NuraadGit** on GitHub · 2026-11-24 10:11 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7128446482) Image result for `8dc74b6` + `8168962` on the RTX 2080 (#493 + #189 + #206, loop limit 32, ~4 min in the world): **the presented world frame doesn't change.** | Build | World frames: non-zero pixels | Max value (of 255) | Mean | |---|---|---|---| | without the wait branch | 33–35 % | 2 | 0.34–0.35 | | with `8dc74b6` + `8168962` | 34–35 % | 2 | 0.36 | Both stay near black: faint noise, no image. So honouring the list waits, on its own, isn't what's missing for the black scene here, though it may be one of several things. The title-card and transition frames before the world look the same with or without it. *AI-assisted (Claude Code).*
Author
Owner

@⁠KLeek5 on GitHub · 2026-11-24 07:50 UTC · original · edited 2026-11-24 12:55 UTC

An updated fix is available on [KLeek5:fix/gpu-wait64-v3](https://github.com/KLeek5/VIctory/tree/fix/gpu-wait64-v3), commit [836490b](github.com/KLeek5/VIctory@836490b969). It integrates main 8e79c80 and the source tree of #32 at 9c5328d. I'll open a PR once creation is allowed again (#717).

What it does:

Recording. Splits host lists at wait boundaries, avoiding empty native segments for consecutive waits.
Submission. Runs the prefix immediately and holds subsequent work until the predicate is satisfied, without blocking the submitting thread. Preserves submitted recordings across guest resets.
Waking. Bottom-of-pipe writes and CPU/queue Signal capture satisfied predicates before subsequent writes. Other writes are polled. No forced timeout.
Comparison. Supports masked 32-bit and full-width 64-bit waits with all eight D3D12_COMPARISON_FUNC modes.
Memory. Uses checked guest-memory reads and releases resources for impossible predicates.
Tests: 14/14 shared scenarios, 79/79 GPU tests (including ignored), and 400/400 stress runs passed on each of WARP and RTX 3050. Short equality tests passed 16/16 for each Signal path on both adapters.

Nonzero flags, transient external writes, and end-to-end UAV/copy-back behavior remain unverified. Full workspace CI was blocked by a missing dependency. Not tested with the title; independent testing is welcome.

**@⁠KLeek5** on GitHub · 2026-11-24 07:50 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7125422515) · edited 2026-11-24 12:55 UTC An updated fix is available on [[KLeek5:fix/gpu-wait64-v3](https://github.com/KLeek5/VIctory/tree/fix/gpu-wait64-v3)](https://github.com/KLeek5/VIctory/tree/fix/gpu-wait64-v3), commit [[836490b](https://github.com/KLeek5/VIctory/commit/836490b9690c0215a66914f47269783bc12aa86e)](https://github.com/KLeek5/VIctory/commit/836490b9690c0215a66914f47269783bc12aa86e). It integrates main 8e79c80 and the source tree of https://git.gtahub.st/github/Marvisak--VIctory/pulls/32 at 9c5328d. I'll open a PR once creation is allowed again (https://git.gtahub.st/github/Marvisak--VIctory/issues/717). What it does: Recording. Splits host lists at wait boundaries, avoiding empty native segments for consecutive waits. Submission. Runs the prefix immediately and holds subsequent work until the predicate is satisfied, without blocking the submitting thread. Preserves submitted recordings across guest resets. Waking. Bottom-of-pipe writes and CPU/queue Signal capture satisfied predicates before subsequent writes. Other writes are polled. No forced timeout. Comparison. Supports masked 32-bit and full-width 64-bit waits with all eight D3D12_COMPARISON_FUNC modes. Memory. Uses checked guest-memory reads and releases resources for impossible predicates. Tests: 14/14 shared scenarios, 79/79 GPU tests (including ignored), and 400/400 stress runs passed on each of WARP and RTX 3050. Short equality tests passed 16/16 for each Signal path on both adapters. Nonzero flags, transient external writes, and end-to-end UAV/copy-back behavior remain unverified. Full workspace CI was blocked by a missing dependency. Not tested with the title; independent testing is welcome.
Author
Owner

@⁠AgneyaK on GitHub · 2026-11-24 19:01 UTC · original

How often this happens in the title itself, measured with a local probe on main ffe310e plus the stack in #1232 (RTX 3050 6 GB Laptop, diag build, title 1.0.2.1, Series X profile, story load).

Probe: the list's 32-bit and 64-bit wait methods (newer layout 0x248 and 0x250) record the condition. At submission, a host step reads the word and checks the comparison, taking 7 as >= as in this issue. Each bottom-of-pipe Written::Value write is checked against the unmet ones. Local only, not a PR.

Result, 300 s:

  • About 25% of the list waits are not met when their list runs: met=2866 unmet=1024 near the end. In the first minute nearly all are met (one word at 0xdd2b00000, waiting for 1, which is already 1).
  • All of them are 64-bit, comparison 7, on a ring of words at 0xd0417fe00–0xd0417fff8. The value is a frame-like counter and the word holds one less (reference=0x6f7 now=0x6f6) or still 0.
  • Each unmet wait is met later by a bottom-of-pipe write from a later submission: 1,024 of them. The delay runs from 184 ms to 4.1 s, median 750 ms, at this machine's ~0.3 fps.

So on this title the consumer-first case from the synthetic test above happens all the time during the world load, not as an edge case. I haven't checked which queues the producer and consumer are on, or what the consumers read.

AI use: Claude Code (Claude Opus 5.5) wrote the probe, ran the title on my machine and drafted this; results are from the runs described.

**@⁠AgneyaK** on GitHub · 2026-11-24 19:01 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7141486637) How often this happens in the title itself, measured with a local probe on `main` `ffe310e` plus the stack in #1232 (RTX 3050 6 GB Laptop, diag build, title 1.0.2.1, Series X profile, story load). **Probe:** the list's 32-bit and 64-bit wait methods (newer layout `0x248` and `0x250`) record the condition. At submission, a host step reads the word and checks the comparison, taking 7 as `>=` as in this issue. Each bottom-of-pipe `Written::Value` write is checked against the unmet ones. Local only, not a PR. **Result, 300 s:** - **About 25% of the list waits are not met when their list runs:** `met=2866 unmet=1024` near the end. In the first minute nearly all are met (one word at `0xdd2b00000`, waiting for 1, which is already 1). - **All of them are 64-bit, comparison 7, on a ring of words at `0xd0417fe00`–`0xd0417fff8`.** The value is a frame-like counter and the word holds one less (`reference=0x6f7 now=0x6f6`) or still 0. - **Each unmet wait is met later by a bottom-of-pipe write from a later submission:** 1,024 of them. The delay runs from 184 ms to 4.1 s, median 750 ms, at this machine's ~0.3 fps. So on this title the consumer-first case from the synthetic test above happens all the time during the world load, not as an edge case. I haven't checked which queues the producer and consumer are on, or what the consumers read. AI use: Claude Code (Claude Opus 5.5) wrote the probe, ran the title on my machine and drafted this; results are from the runs described.
Author
Owner

@⁠KLeek5 on GitHub · 2026-11-24 19:20 UTC · original

@⁠AgneyaK Thanks for the detailed measurements!

The fact that all 1,024 initially unmet waits were eventually satisfied, with delays of up to 4.1 seconds, is particularly interesting.

Would you be willing to test my implementation in #1023 using the same integration stack and diagnostic probe?

It would be valuable to compare:

  • Whether all pending waits resolve naturally.
  • Whether any queues remain stalled.
  • Stability during world loading.
  • Frame times compared to your existing baseline.

The implementation does not use a forced timeout, so your findings could help validate its behavior under real workloads.

Thanks for your work!

**@⁠KLeek5** on GitHub · 2026-11-24 19:20 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7141947162) @⁠AgneyaK Thanks for the detailed measurements! The fact that all 1,024 initially unmet waits were eventually satisfied, with delays of up to 4.1 seconds, is particularly interesting. Would you be willing to test my implementation in #1023 using the same integration stack and diagnostic probe? It would be valuable to compare: - Whether all pending waits resolve naturally. - Whether any queues remain stalled. - Stability during world loading. - Frame times compared to your existing baseline. The implementation does not use a forced timeout, so your findings could help validate its behavior under real workloads. Thanks for your work!
Author
Owner

@⁠AgneyaK on GitHub · 2026-11-24 20:55 UTC · original

@⁠KLeek5 here are the results for #1023, with #1388 measured the same way.

Setup:

  • RTX 3050 6 GB Laptop, i7-13700H, 16 GB RAM (34.5 GB commit limit), Windows 11 26300, diag build, no DRED unless noted.
  • Title 1.0.2.1, Series X profile, VICTORY_SKIP_WAVE64=mesh, the story load. This laptop doesn't reach the world, so this covers the load only.
  • Base: main ffe310e + #208 + #223/#233/#320/#439 + #452 + #579 + #431. Each PR was merged onto that base (both clean). Runs of up to 600 s.
  • My probe isn't in these builds (it hooks the same methods), so "waits resolve" comes from #1023's own GPU queue still waiting for memory warning, which fires after 5 s.
tree run ended world frame private peak GPU memory spilled to RAM
base, run 1 7:26 title pool assert +0x5149aec (#1232) 2,578 ms 18.4 GB 3.8 GB
base, run 2 8:21 same 2,992 ms 18.8 GB 3.9 GB
+ #1023 8:33 same 3,142 ms 19.3 GB 4.4 GB
+ #1388, run 1 2:46 device removed, "some other application submitted invalid commands" (0x887A0007) 5,767 ms 17.8 GB 2.9 GB
+ #1388, run 2 3:29 same 5,848 ms 17.8 GB 2.9 GB
+ #1388, VICTORY_D3D12_DRED=1 9:29 pool assert, no removal 5,070 ms (DRED slows it) 18.6 GB 3.3 GB

#1023:

  • All pending waits resolve: no still waiting for memory warning in 8.5 minutes. My earlier probe saw waits met 184 ms–4.1 s after submission on the base, so none reached the 5 s line.
  • No stalled queue, no no new host list, no failure. It ended at the same title stop as the base, a bit later.
  • Frame time about 13% higher than the base. That's consistent with lists now waiting for their producers.
  • One earlier run without #431 died at 1:39 with host GPU failure: wait segment: Not enough memory resources … (0x8007000E), after three no new host list: a list to run is reset. The machine was at its commit limit (22.7 GB private + 6.9 GB GPU memory in RAM, 34.5 GB limit), and acquire_list failing goes through host::fail. On low-memory machines it might be worth falling back, e.g. recording on in the same list and treating that wait as met with a warning, as #1388 does, rather than ending the process.

#1388: about twice the base frame time, and the device was removed in 2 of 2 runs without DRED (at 2:46 and 3:29, after submissions of 29 and 3 lists). The DRED run didn't reproduce it, so it looks timing-dependent. #1388 makes a new HostList (two allocators, two lists) for every wait. On this title that's thousands per load, which may explain the frame time. I'll post this on #1388 too.

One run per row except where noted; spread between runs here is about ±15%.

AI use: Claude Code (Claude Opus 5.5) built the trees, ran the title on my machine and drafted this; results are from the runs described.

**@⁠AgneyaK** on GitHub · 2026-11-24 20:55 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7144235622) @⁠KLeek5 here are the results for #1023, with #1388 measured the same way. **Setup:** - RTX 3050 6 GB Laptop, i7-13700H, 16 GB RAM (34.5 GB commit limit), Windows 11 26300, diag build, no DRED unless noted. - Title 1.0.2.1, Series X profile, `VICTORY_SKIP_WAVE64=mesh`, the story load. This laptop doesn't reach the world, so this covers the load only. - Base: `main` `ffe310e` + #208 + #223/#233/#320/#439 + #452 + #579 + #431. Each PR was merged onto that base (both clean). Runs of up to 600 s. - My probe isn't in these builds (it hooks the same methods), so "waits resolve" comes from #1023's own `GPU queue still waiting for memory` warning, which fires after 5 s. | tree | run | ended | world frame | private peak | GPU memory spilled to RAM | |---|---|---|---|---|---| | base, run 1 | 7:26 | title pool assert `+0x5149aec` (#1232) | 2,578 ms | 18.4 GB | 3.8 GB | | base, run 2 | 8:21 | same | 2,992 ms | 18.8 GB | 3.9 GB | | **+ #1023** | 8:33 | same | 3,142 ms | 19.3 GB | 4.4 GB | | + #1388, run 1 | **2:46** | device removed, "some other application submitted invalid commands" (`0x887A0007`) | 5,767 ms | 17.8 GB | 2.9 GB | | + #1388, run 2 | **3:29** | same | 5,848 ms | 17.8 GB | 2.9 GB | | + #1388, `VICTORY_D3D12_DRED=1` | 9:29 | pool assert, no removal | 5,070 ms (DRED slows it) | 18.6 GB | 3.3 GB | **#1023:** - **All pending waits resolve:** no `still waiting for memory` warning in 8.5 minutes. My earlier probe saw waits met 184 ms–4.1 s after submission on the base, so none reached the 5 s line. - **No stalled queue,** no `no new host list`, no failure. It ended at the same title stop as the base, a bit later. - **Frame time about 13% higher than the base.** That's consistent with lists now waiting for their producers. - **One earlier run without #431 died at 1:39** with `host GPU failure: wait segment: Not enough memory resources … (0x8007000E)`, after three `no new host list: a list to run is reset`. The machine was at its commit limit (22.7 GB private + 6.9 GB GPU memory in RAM, 34.5 GB limit), and `acquire_list` failing goes through `host::fail`. On low-memory machines it might be worth falling back, e.g. recording on in the same list and treating that wait as met with a warning, as #1388 does, rather than ending the process. **#1388:** about twice the base frame time, and the device was removed in 2 of 2 runs without DRED (at 2:46 and 3:29, after submissions of 29 and 3 lists). The DRED run didn't reproduce it, so it looks timing-dependent. #1388 makes a new `HostList` (two allocators, two lists) for every wait. On this title that's thousands per load, which may explain the frame time. I'll post this on #1388 too. One run per row except where noted; spread between runs here is about ±15%. AI use: Claude Code (Claude Opus 5.5) built the trees, ran the title on my machine and drafted this; results are from the runs described.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:48 UTC · original · edited 2026-11-25 15:46 UTC

Automated triage for the maintainers.

Fixed in main by 9cc37c5 ("GPU: lists wait on memory values; queues hold work until its waits hold"). wait_value is no longer an empty function: in crates/victory-gpu/src/list.rs, wait32 / wait64 (method slots 0x238 / 0x240, newer 0x248 / 0x250) record a hold::ValueWait. A wait recorded after commands cuts the title list into a new host list (wait, next_segment). crates/victory-gpu/src/hold.rs then keeps each queue as a FIFO of list segments, Signals and fence Waits, and runs a queue's head once its waits hold, without blocking the submitting thread. The comparison is any D3D12_COMPARISON_FUNC on the masked 32-bit or full 64-bit word. Work held across a title Reset keeps its own host list. The commit adds hold::tests and the GPU test resource::tests::a_list_waiting_for_another_queues_write_reads_what_it_wrote (a consumer cut at its wait, reset while held, reads what the other queue wrote).

That covers the synthetic consumer-first reproduction above and the reset-while-held problem found on the fork branches. Open PRs #1023 and #1388 implement the same method on an older main and are superseded by this commit.

Proposed close as fixed in main (9cc37c5). This issue will be closed in 48 hours unless the reporter replies or a maintainer removes the triage: proposed close label.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:48 UTC · [original](https://github.com/Marvisak/VIctory/issues/700#issuecomment-7149984559) · edited 2026-11-25 15:46 UTC <!-- victory-issue-triage v1 verdict=proposed-close seen=2026-11-24T20:55:22Z at=2026-11-25T15:46:30Z --> Automated triage for the maintainers. Fixed in `main` by 9cc37c5 ("GPU: lists wait on memory values; queues hold work until its waits hold"). `wait_value` is no longer an empty function: in `crates/victory-gpu/src/list.rs`, `wait32` / `wait64` (method slots `0x238` / `0x240`, newer `0x248` / `0x250`) record a `hold::ValueWait`. A wait recorded after commands cuts the title list into a new host list (`wait`, `next_segment`). `crates/victory-gpu/src/hold.rs` then keeps each queue as a FIFO of list segments, Signals and fence Waits, and runs a queue's head once its waits hold, without blocking the submitting thread. The comparison is any `D3D12_COMPARISON_FUNC` on the masked 32-bit or full 64-bit word. Work held across a title `Reset` keeps its own host list. The commit adds `hold::tests` and the GPU test `resource::tests::a_list_waiting_for_another_queues_write_reads_what_it_wrote` (a consumer cut at its wait, reset while held, reads what the other queue wrote). That covers the synthetic consumer-first reproduction above and the reset-while-held problem found on the fork branches. Open PRs #1023 and #1388 implement the same method on an older `main` and are superseded by this commit. Proposed close as fixed in `main` (9cc37c5). This issue will be closed in 48 hours unless the reporter replies or a maintainer removes the `triage: proposed close` label. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#700
No description provided.