GPU: a frame whose presented image a dropped draw left unwritten is not shown #3353

Open
github-bot wants to merge 2 commits from github-bot/gh-3353 into main AGit
Owner

@⁠neonbyte1 on GitHub · 2026-11-26 19:53 UTC · original
neonbyte1:fix/hold-unwritten-frames → main · +461 −6 · 6 files · 2 commits · open

What is wrong

A draw whose pipeline is still being made is dropped once the frame's wait budget is spent, and leaves its render targets as they were. When that draw is the one that writes a presented image, the image still holds what was drawn into it the last time. Titles present two back buffers in turn, so the window alternates between two old frames.

In Grand Theft Auto VI's world start with a cold driver cache (seven runs, RTX 5090, Wine + vkd3d-proton), the first world frame first-binds ~1,900 pipelines. The final upscale (VS_TAA2_SpatialUpscale + PS_TAA2_SpatialUpscaleWithDithering) is one of them, queued behind the others: in one run it waited 41 s and then took 3.3 ms to make. Until then every other frame was black (the fade's last frame in one back buffer) and the others dim (the first fade-in frame in the other), 46 frames in a row. In every run the flicker stopped within one frame of that pipeline being made; runs whose cache was warm had it before the world started and never flickered.

What changes

  • A draw (or indirect draw / mesh dispatch) dropped because its pipeline is being made, whose render target is an image the title has presented, puts that pipeline at the head of the workers' queue, once (make::hurry).
  • The next present of an image such a draw left unwritten is not shown; the window keeps the last frame it showed (crate::shown). The log says where a run of held frames starts and ends.
  • A run of held frames lasts at most 10 s (HOLD_LIMIT): the pipeline held for is the next one a worker takes, and the longest worker job in my cold-cache runs was 10.5 s (typically 4–6 s). Past it the frames are shown as they come and the log names the pipelines waited for, so a pipeline that never arrives (a dead worker, a hung driver compile) cannot freeze the window.
  • Pipelines that are refused or do not translate never count.
  • VICTORY_SHOW_UNWRITTEN=1 shows those frames as before.
  • Diagnostics builds: the black-frame detector only sees frames that are shown, so held frames produce no black-frame warning; zero warnings is expected, not by itself proof.

Trade-off: a first-use draw into the back buffer (a new HUD element) whose pipeline misses the budget now holds the frame until it is made, which is the next thing a worker makes, instead of showing a frame without it.

Related: #2582/#2435 give full-screen passes their own workers (that would also shorten this if the upscale classifies as one, but never holds), #3025 orders graphics before compute; both edit the same queue in pipeline/make.rs, so whichever lands second needs a small rebase. I found no open PR that holds the present of an unwritten image.

Tested

  • New tests: shown::tests (an unwritten image is held once, an image never presented is never held, old images are forgotten, a hold is given up after the limit with an injected clock) and pipeline::make::tests::a_pipeline_a_presented_image_waits_for_goes_first (order, once, not when taken or made). They pass under Wine.

  • clippy -D warnings for x86_64-pc-windows-msvc, with and without --all-features: clean; cargo xtask policy ok.

  • In game: two 8-minute runs of the same build with the driver's and vkd3d-proton's shader caches off (__GL_SHADER_DISK_CACHE=0 VKD3D_SHADER_CACHE_PATH=0), so the first world frame starts with the backlog every time:

    without this change with it
    pipelines being made at the peak 2,474 2,474
    black frames presented after a non-black one 52 (every other frame, 1280–1382) 3 (frame 1 and two scene cuts, as in warm runs)
    made first — 1 (vertex 0309a446…, pixel 4f4ec7b1…)
    frames held — 1 (frame 1269, shown again at 1270)
    hold given up, Xid, device removed — 0

    Captures of frames 1300–1303 show the alternation without the change (dark, stale grey, dark, stale grey) and a steady image with it.

Not fixed here: after the upscale exists, the world stays dark (brightness 0–1) until a CS_RaytracingResolve compute pipeline is made, about 50 s and ~55 frames later in the cold run. That image is written, so holding is not the right tool; making the pipelines that feed the presented image earlier is a follow-up I'm looking at.

AI-assisted (Claude); measured on my machine, no game data shared.

**@⁠neonbyte1** on GitHub · 2026-11-26 19:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/3353) `neonbyte1:fix/hold-unwritten-frames` → `main` · +461 −6 · 6 files · 2 commits · open ### What is wrong A draw whose pipeline is still being made is dropped once the frame's wait budget is spent, and leaves its render targets as they were. When that draw is the one that writes a presented image, the image still holds what was drawn into it the last time. Titles present two back buffers in turn, so the window alternates between two old frames. In Grand Theft Auto VI's world start with a cold driver cache (seven runs, RTX 5090, Wine + vkd3d-proton), the first world frame first-binds ~1,900 pipelines. The final upscale (`VS_TAA2_SpatialUpscale` + `PS_TAA2_SpatialUpscaleWithDithering`) is one of them, queued behind the others: in one run it waited 41 s and then took 3.3 ms to make. Until then every other frame was black (the fade's last frame in one back buffer) and the others dim (the first fade-in frame in the other), 46 frames in a row. In every run the flicker stopped within one frame of that pipeline being made; runs whose cache was warm had it before the world started and never flickered. ### What changes - A draw (or indirect draw / mesh dispatch) dropped because its pipeline is being made, whose render target is an image the title has presented, puts that pipeline at the head of the workers' queue, once (`make::hurry`). - The next present of an image such a draw left unwritten is not shown; the window keeps the last frame it showed (`crate::shown`). The log says where a run of held frames starts and ends. - A run of held frames lasts at most 10 s (`HOLD_LIMIT`): the pipeline held for is the next one a worker takes, and the longest worker job in my cold-cache runs was 10.5 s (typically 4–6 s). Past it the frames are shown as they come and the log names the pipelines waited for, so a pipeline that never arrives (a dead worker, a hung driver compile) cannot freeze the window. - Pipelines that are refused or do not translate never count. - `VICTORY_SHOW_UNWRITTEN=1` shows those frames as before. - Diagnostics builds: the black-frame detector only sees frames that are shown, so held frames produce no black-frame warning; zero warnings is expected, not by itself proof. Trade-off: a first-use draw into the back buffer (a new HUD element) whose pipeline misses the budget now holds the frame until it is made, which is the next thing a worker makes, instead of showing a frame without it. Related: #2582/#2435 give full-screen passes their own workers (that would also shorten this if the upscale classifies as one, but never holds), #3025 orders graphics before compute; both edit the same queue in `pipeline/make.rs`, so whichever lands second needs a small rebase. I found no open PR that holds the present of an unwritten image. ### Tested - New tests: `shown::tests` (an unwritten image is held once, an image never presented is never held, old images are forgotten, a hold is given up after the limit with an injected clock) and `pipeline::make::tests::a_pipeline_a_presented_image_waits_for_goes_first` (order, once, not when taken or made). They pass under Wine. - clippy `-D warnings` for `x86_64-pc-windows-msvc`, with and without `--all-features`: clean; `cargo xtask policy` ok. - In game: two 8-minute runs of the same build with the driver's and vkd3d-proton's shader caches off (`__GL_SHADER_DISK_CACHE=0 VKD3D_SHADER_CACHE_PATH=0`), so the first world frame starts with the backlog every time: | | without this change | with it | |---|---|---| | pipelines being made at the peak | 2,474 | 2,474 | | black frames presented after a non-black one | 52 (every other frame, 1280–1382) | 3 (frame 1 and two scene cuts, as in warm runs) | | `made first` | — | 1 (`vertex 0309a446…, pixel 4f4ec7b1…`) | | frames held | — | 1 (frame 1269, shown again at 1270) | | hold given up, Xid, device removed | — | 0 | Captures of frames 1300–1303 show the alternation without the change (dark, stale grey, dark, stale grey) and a steady image with it. **Not fixed here:** after the upscale exists, the world stays dark (brightness 0–1) until a `CS_RaytracingResolve` compute pipeline is made, about 50 s and ~55 frames later in the cold run. That image *is* written, so holding is not the right tool; making the pipelines that feed the presented image earlier is a follow-up I'm looking at. _AI-assisted (Claude); measured on my machine, no game data shared._
A draw whose pipeline is still being made is dropped and leaves its
targets as they were. When it is the draw that writes a presented image
(Grand Theft Auto VI's final upscale, PS_TAA2_SpatialUpscaleWithDithering),
that back buffer still holds the frame drawn into it two presents ago, and
the window alternates between two old frames. On a cold driver cache the
world's first frame wants ~1,900 new pipelines; the upscale's was made 41 s
after its first use, and frames 1300-1346 alternated black and dim.

Such a draw now puts its pipeline at the head of the workers' queue
(make::hurry), and a present of an image it left unwritten is not shown:
the window keeps the last frame shown (crate::shown), for at most 10 s
(HOLD_LIMIT). Past that the frames are shown as they come, and the log
names the pipelines waited for, so a pipeline that never arrives (a dead
worker, a hung driver compile) cannot freeze the window. Refused pipelines
do not count at all. VICTORY_SHOW_UNWRITTEN=1 shows those frames as before.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:09:11 +00:00
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 20:07 UTC · original · approved these changes

LGTM — verified on RTX 5090 (Windows / D3D12) against origin/main (63bcca4).

  • Tracking whether a presented frame's image was left unwritten by a dropped draw/dispatch avoids flashing stale/unwritten frames while keeping normal presentation unaffected.
  • cargo test -p victory-gpu --lib shown:: -- --test-threads=1: all passed.
  • cargo test -p victory-gpu --lib pipeline::make:: -- --test-threads=1: all passed.
  • cargo test -p victory-gpu --lib draw:: -- --test-threads=1: 20 passed, 0 failed.
  • cargo test -p victory-gpu --lib queue:: -- --test-threads=1: 5 passed, 0 failed.
  • cargo clippy -p victory-gpu --all-targets -- -D warnings (default + --features diagnostics): clean.
  • cargo xtask policy: 192 files ok.

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

**@⁠Dukestar69** on GitHub · 2026-11-26 20:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/3353#pullrequestreview-6079965173) · **approved these changes** LGTM — verified on RTX 5090 (Windows / D3D12) against `origin/main` (`63bcca4`). - Tracking whether a presented frame's image was left unwritten by a dropped draw/dispatch avoids flashing stale/unwritten frames while keeping normal presentation unaffected. - `cargo test -p victory-gpu --lib shown:: -- --test-threads=1`: all passed. - `cargo test -p victory-gpu --lib pipeline::make:: -- --test-threads=1`: all passed. - `cargo test -p victory-gpu --lib draw:: -- --test-threads=1`: 20 passed, 0 failed. - `cargo test -p victory-gpu --lib queue:: -- --test-threads=1`: 5 passed, 0 failed. - `cargo clippy -p victory-gpu --all-targets -- -D warnings` (default + `--features diagnostics`): clean. - `cargo xtask policy`: 192 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-26 20:14 UTC · original

I resolved the pipeline/make.rs conflict between this head and #3025 in 4a59f2e, retaining both exact heads. A draw that holds presentation goes to the front of the graphics queue. Compute entries still take a compute slot, and a promoted entry already claimed by another worker does not take a second slot. Workers also wait for the final pool size to be published, so an early starter sees the same compute limit as the others.

The new regression takes both queues through the two-worker case with the compute slot occupied. The urgent draw goes first, ordinary graphics can follow, and compute resumes when a slot is available. The other queue and presentation tests passed too (11 with default features, 12 with diagnostics). Both strict all-target Clippy checks and the policy check passed. These were scheduler and presentation-state tests.

If this or #3025 lands first, the combined commit is available for the second PR’s rebase. Please preserve the Git author or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if you fold in the resolution or test.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-26 20:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/3353#issuecomment-7202441688) I resolved the `pipeline/make.rs` conflict between this head and #3025 in [`4a59f2e`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/4a59f2e12f3720f98f561e6013b72f2c31105b33), retaining both exact heads. A draw that holds presentation goes to the front of the graphics queue. Compute entries still take a compute slot, and a promoted entry already claimed by another worker does not take a second slot. Workers also wait for the final pool size to be published, so an early starter sees the same compute limit as the others. The new regression takes both queues through the two-worker case with the compute slot occupied. The urgent draw goes first, ordinary graphics can follow, and compute resumes when a slot is available. The other queue and presentation tests passed too (11 with default features, 12 with diagnostics). Both strict all-target Clippy checks and the policy check passed. These were scheduler and presentation-state tests. If this or #3025 lands first, the combined commit is available for the second PR’s rebase. Please preserve the Git author or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if you fold in the resolution or test.
Author
Owner

@⁠neonbyte1 on GitHub · 2026-11-26 20:16 UTC · original

@⁠andrewpozdnakov7-jpg thank you, that saves a careful rebase. I checked that 4a59f2e merges exactly this head (489ec500) and #3025's current head (018b56ac). Keeping urgency within the worker classes, so a held frame's draw goes first in the graphics queue and compute keeps its slot limit, is the right way to combine them. The pool-size wait for early starters is a good catch too.

If #3025 lands first, I'll rebase onto your resolution and keep you as the commit's author (or add the Co-authored-by line if it gets folded in).

One heads-up: I have a follow-up on top of this PR that also touches that queue. When the presented image is written but still dark, it walks back from the image and hurries the dropped passes that feed it. It's in testing now and not opened yet, and it uses the same "first" place, so it should fit your resolution as is; I'll check that when I rebase.

AI-assisted (Claude); no game data shared.

**@⁠neonbyte1** on GitHub · 2026-11-26 20:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/3353#issuecomment-7202483076) @⁠andrewpozdnakov7-jpg thank you, that saves a careful rebase. I checked that `4a59f2e` merges exactly this head (`489ec500`) and #3025's current head (`018b56ac`). Keeping urgency within the worker classes, so a held frame's draw goes first in the graphics queue and compute keeps its slot limit, is the right way to combine them. The pool-size wait for early starters is a good catch too. If #3025 lands first, I'll rebase onto your resolution and keep you as the commit's author (or add the `Co-authored-by` line if it gets folded in). One heads-up: I have a follow-up on top of this PR that also touches that queue. When the presented image is written but still dark, it walks back from the image and hurries the dropped passes that feed it. It's in testing now and not opened yet, and it uses the same "first" place, so it should fit your resolution as is; I'll check that when I rebase. _AI-assisted (Claude); no game data shared._
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 20:24 UTC · original · approved these changes

Verified locally merged onto origin/main (63bcca43) at PR head 489ec500 (Windows 11 x64, NVIDIA GeForce RTX 5090 + Microsoft WARP, VICTORY_D3D12_DEBUG=1):

  • crates/victory-gpu/src/{draw.rs, pipeline.rs, pipeline/make.rs, queue.rs, shown.rs}:
    • draw.rs (L539, L1736-L1738) and pipeline.rs (dropped_into, L259-L273) only flag a presented target and promote its pipeline via make::hurry when make::being_made(&p.host) is true, so refused/untranslated pipelines and compute indirect dispatches never trigger holds, and clear-only/copy-only frames without dropped draws always show normally.
    • pipeline/make.rs (Place::First, hurried, L232-L246, L292-L309): duplicate front insertion is safely deduplicated by p.taken.swap(true) in the worker loop without double-decrementing WAITING.
    • queue.rs (present, L538, holds, L589-L621): pump_held, frame accounting/budget reset, and diagnostics target dumps still run before holds(), so holding does not stall submission progress or wait budgets, and HOLD_LIMIT bounds any hold run to 10 s.
  • cargo xtask policy: 192 files ok.
  • cargo clippy --locked -p victory-gpu --all-targets -- -D warnings (default and --all-features): 0 warnings.
  • cargo test --locked -p victory-gpu --features diagnostics --lib -- shown:: pipeline::make:: draw:: queue::: 33/33 passed on both RTX 5090 (0.65s) and WARP (3.09s) with VICTORY_D3D12_DEBUG=1.
  • Extra synthetic probe (not committed): verified clear-only frames never hold, multi-plane [unwritten, new] registers both planes and clears unwritten via the non-short-circuiting fold.

Two small non-blocking follow-up notes:

  1. In shown.rs (unwritten, lines 104-106), when self.images.remove(0) evicts an old image at capacity IMAGES, removing that pointer from self.unwritten as well (self.unwritten.retain(|&s| s != evicted)) prevents a stale entry if a later allocation reuses the same address.
  2. In shown.rs (frame, lines 172-174), if *SHOW_ALL && matches!(frame, Frame::Hold { .. }) suppresses Hold but still returns ShowAgain { held } / GiveUp { held, waited_for } to queue.rs::holds(), which can log non-zero held counts even though VICTORY_SHOW_UNWRITTEN=1 showed every frame.

Solid fix overall; synthetic tests only, looks good to merge.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 20:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/3353#pullrequestreview-6080118714) · **approved these changes** Verified locally merged onto `origin/main` (`63bcca43`) at PR head `489ec500` (Windows 11 x64, NVIDIA GeForce RTX 5090 + Microsoft WARP, `VICTORY_D3D12_DEBUG=1`): - `crates/victory-gpu/src/{draw.rs, pipeline.rs, pipeline/make.rs, queue.rs, shown.rs}`: - `draw.rs` (`L539`, `L1736-L1738`) and `pipeline.rs` (`dropped_into`, `L259-L273`) only flag a presented target and promote its pipeline via `make::hurry` when `make::being_made(&p.host)` is true, so refused/untranslated pipelines and compute indirect dispatches never trigger holds, and clear-only/copy-only frames without dropped draws always show normally. - `pipeline/make.rs` (`Place::First`, `hurried`, `L232-L246`, `L292-L309`): duplicate front insertion is safely deduplicated by `p.taken.swap(true)` in the worker loop without double-decrementing `WAITING`. - `queue.rs` (`present`, `L538`, `holds`, `L589-L621`): `pump_held`, frame accounting/budget reset, and diagnostics target dumps still run before `holds()`, so holding does not stall submission progress or wait budgets, and `HOLD_LIMIT` bounds any hold run to 10 s. - `cargo xtask policy`: 192 files ok. - `cargo clippy --locked -p victory-gpu --all-targets -- -D warnings` (default and `--all-features`): 0 warnings. - `cargo test --locked -p victory-gpu --features diagnostics --lib -- shown:: pipeline::make:: draw:: queue::`: 33/33 passed on both RTX 5090 (0.65s) and WARP (3.09s) with `VICTORY_D3D12_DEBUG=1`. - Extra synthetic probe (not committed): verified clear-only frames never hold, multi-plane `[unwritten, new]` registers both planes and clears `unwritten` via the non-short-circuiting fold. Two small non-blocking follow-up notes: 1. In `shown.rs` (`unwritten`, lines 104-106), when `self.images.remove(0)` evicts an old image at capacity `IMAGES`, removing that pointer from `self.unwritten` as well (`self.unwritten.retain(|&s| s != evicted)`) prevents a stale entry if a later allocation reuses the same address. 2. In `shown.rs` (`frame`, lines 172-174), `if *SHOW_ALL && matches!(frame, Frame::Hold { .. })` suppresses `Hold` but still returns `ShowAgain { held }` / `GiveUp { held, waited_for }` to `queue.rs::holds()`, which can log non-zero `held` counts even though `VICTORY_SHOW_UNWRITTEN=1` showed every frame. Solid fix overall; synthetic tests only, looks good to merge.
Author
Owner

@⁠neonbyte1 on GitHub · 2026-11-26 20:30 UTC · original

@⁠fuzeofficlal thanks for the review and the synthetic probe. Both notes are fixed in df15a80, a follow-up commit that touches only shown.rs:

  1. Eviction: when an image is evicted at capacity, it's now also dropped from unwritten, so a later image at the same address doesn't inherit the stale mark. New test: an_evicted_image_is_not_left_unwritten presents IMAGES + 1 images with the first one unwritten, then the first address again, and expects a plain Show (without the fix it's a Hold).
  2. VICTORY_SHOW_UNWRITTEN=1: Shown::frame now takes the switch as a parameter. With it on, it returns Show and clears the held run, the give-up state and the waited-for list, so holds() never sees ShowAgain/GiveUp with counts. New test: show_all_holds_and_counts_nothing (only Show across unwritten frames, past the 10 s limit too; turning the switch off then starts a fresh Hold { first: true }). Presented images are still recorded with the switch on, so their pipelines are still moved to the front of the queue as before.

Tested: shown:: 6/6 and pipeline::make:: 3/3 under Wine, clippy -D warnings default and --all-features, cargo xtask policy, formatting.

AI-assisted (Claude); no game data shared.

**@⁠neonbyte1** on GitHub · 2026-11-26 20:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/3353#issuecomment-7202765326) @⁠fuzeofficlal thanks for the review and the synthetic probe. Both notes are fixed in `df15a80`, a follow-up commit that touches only `shown.rs`: 1. **Eviction:** when an image is evicted at capacity, it's now also dropped from `unwritten`, so a later image at the same address doesn't inherit the stale mark. New test: `an_evicted_image_is_not_left_unwritten` presents `IMAGES + 1` images with the first one unwritten, then the first address again, and expects a plain `Show` (without the fix it's a `Hold`). 2. **`VICTORY_SHOW_UNWRITTEN=1`:** `Shown::frame` now takes the switch as a parameter. With it on, it returns `Show` and clears the held run, the give-up state and the waited-for list, so `holds()` never sees `ShowAgain`/`GiveUp` with counts. New test: `show_all_holds_and_counts_nothing` (only `Show` across unwritten frames, past the 10 s limit too; turning the switch off then starts a fresh `Hold { first: true }`). Presented images are still recorded with the switch on, so their pipelines are still moved to the front of the queue as before. **Tested:** `shown::` 6/6 and `pipeline::make::` 3/3 under Wine, clippy `-D warnings` default and `--all-features`, `cargo xtask policy`, formatting. _AI-assisted (Claude); no game data shared._
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-26 20:47 UTC · original

I retested the new eviction and show-all cases at df15a80 together with #3025. Both passed, including with a compute slot occupied and an urgent draw waiting. I also found a separate path into the #2223 queue-count race. If the first registration is paused before the count, hurry can promote that pipeline before it is counted.

Combined commit 335eb7b keeps the graphics priority and compute cap and waits for completed registration before hurry can promote. The new regression fails on the two-PR control and passes with #2223 integrated. All 15 default and 16 diagnostics queue and presentation tests passed, along with strict Clippy in both configurations and the asset policy check. Details in #2223.

@⁠neonbyte1, if your follow-up uses the same hurry path, it can use this resolution too. If you fold it into another commit, please keep the Git author or use Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-26 20:47 UTC · [original](https://github.com/Marvisak/VIctory/pull/3353#issuecomment-7203082673) I retested the new eviction and show-all cases at `df15a80` together with #3025. Both passed, including with a compute slot occupied and an urgent draw waiting. I also found a separate path into the #2223 queue-count race. If the first registration is paused before the count, `hurry` can promote that pipeline before it is counted. [Combined commit `335eb7b`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/335eb7baf2f1adc596e30eb641490205fed2fded) keeps the graphics priority and compute cap and waits for completed registration before `hurry` can promote. The new regression fails on the two-PR control and passes with #2223 integrated. All 15 default and 16 diagnostics queue and presentation tests passed, along with strict Clippy in both configurations and the asset policy check. [Details in #2223](https://git.gtahub.st/github/Marvisak--VIctory/pulls/2223). @⁠neonbyte1, if your follow-up uses the same `hurry` path, it can use this resolution too. If you fold it into another commit, please keep the Git author or use `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`.
Author
Owner

@⁠neonbyte1 on GitHub · 2026-11-26 20:49 UTC · original

@⁠andrewpozdnakov7-jpg thanks again, and good catch. I read it in make.rs: enqueue sets queued and only then counts the pipeline in WAITING, so a hurry from another thread in between can let a worker build it and decrement WAITING before the increment. The counter wraps for a moment, and the drained() check can misfire.

main's existing promotion for a waiting draw has the same window, so #2223 is the right fix for both paths. I'd rather not duplicate its "registration complete" flag in this PR. If this lands first, your 335eb7b is the resolution to carry forward, with your authorship kept. My follow-up (hurrying the dropped passes that feed the presented image) goes through the same hurry, so it's covered by the same resolution; I'll rebase it onto whichever order the maintainers pick.

AI-assisted (Claude); no game data shared.

**@⁠neonbyte1** on GitHub · 2026-11-26 20:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/3353#issuecomment-7203114802) @⁠andrewpozdnakov7-jpg thanks again, and good catch. I read it in `make.rs`: `enqueue` sets `queued` and only then counts the pipeline in `WAITING`, so a `hurry` from another thread in between can let a worker build it and decrement `WAITING` before the increment. The counter wraps for a moment, and the `drained()` check can misfire. `main`'s existing promotion for a waiting draw has the same window, so #2223 is the right fix for both paths. I'd rather not duplicate its "registration complete" flag in this PR. If this lands first, your `335eb7b` is the resolution to carry forward, with your authorship kept. My follow-up (hurrying the dropped passes that feed the presented image) goes through the same `hurry`, so it's covered by the same resolution; I'll rebase it onto whichever order the maintainers pick. _AI-assisted (Claude); no game data shared._
Author
Owner

@⁠neonbyte1 on GitHub · 2026-11-26 20:58 UTC · original

Follow-up for the dark phase mentioned above: #3378, stacked on this PR. It hurries the dropped passes the presented image reads (at most 8 per present) and remembers them for the next cold start. In the same cold-cache runs, the lighting resolve went from 47–54 s waiting in the queue to being made ~6 s after its first bind, and the next run makes the final upscale before it's needed.

AI-assisted (Claude); measured on my machine, no game data shared.

**@⁠neonbyte1** on GitHub · 2026-11-26 20:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/3353#issuecomment-7203262873) Follow-up for the dark phase mentioned above: #3378, stacked on this PR. It hurries the dropped passes the presented image reads (at most 8 per present) and remembers them for the next cold start. In the same cold-cache runs, the lighting resolve went from 47–54 s waiting in the queue to being made ~6 s after its first bind, and the next run makes the final upscale before it's needed. _AI-assisted (Claude); measured on my machine, no game data shared._
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3353/head:github-bot/gh-3353'
git switch 'github-bot/gh-3353'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3353'
git switch 'github-bot/gh-3353'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3353'
git switch 'github-bot/gh-3353'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3353'
git switch 'main'
git merge --squash 'github-bot/gh-3353'
git switch 'main'
git merge --ff-only 'github-bot/gh-3353'
git switch 'main'
git merge 'github-bot/gh-3353'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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!3353
No description provided.