Startup star animation flashes and jumps back and forth (upstream VIctory is smooth) #39

Open
opened 2026-11-26 03:35:01 +00:00 by github-bot · 9 comments
Owner

@⁠arminkhaleghirod on GitHub · 2026-11-24 20:47 UTC · original

The first zoom-in animation at boot (the star, before the loading art) flickers on this fork: it zooms in and out and flashes. On upstream VIctory main (ffe310e) with the same game files and machine it plays smoothly.

Setup: Windows 11, RTX 4080, Series X profile, default settings. Seen on 578d459 and on current main (90228a7).

Measured: I saved every frame from 550 to 1000 with VICTORY_CAPTURE_FRAMES and compared each frame with the next two. In smooth motion a frame is closer to the next one than to the one after. Here, about one frame in three is the odd one out: frame n and n+2 match, n+1 doesn't.

Build Moving frames Frames that jump back
upstream ffe310e 23 0
fork 90228a7 25 13

Ruled out: these don't change it (each run on 90228a7):

  • VICTORY_QUEUE_WAIT=0: 15 of 27
  • VICTORY_CARD_BUFFERS=0: 13 of 30
  • VICTORY_ASK_ONCE=0: 4 of 9 (short run, but still there)

So it isn't the queue holds or the card copies. Happy to run other switches if you have a guess.

**@⁠arminkhaleghirod** on GitHub · 2026-11-24 20:47 UTC · [original](https://github.com/fxceless/victory-fork/issues/39) The first zoom-in animation at boot (the star, before the loading art) flickers on this fork: it zooms in and out and flashes. On upstream VIctory main (ffe310e) with the same game files and machine it plays smoothly. **Setup:** Windows 11, RTX 4080, Series X profile, default settings. Seen on 578d459 and on current main (90228a7). **Measured:** I saved every frame from 550 to 1000 with `VICTORY_CAPTURE_FRAMES` and compared each frame with the next two. In smooth motion a frame is closer to the next one than to the one after. Here, about one frame in three is the odd one out: frame n and n+2 match, n+1 doesn't. | Build | Moving frames | Frames that jump back | |---|---|---| | upstream ffe310e | 23 | 0 | | fork 90228a7 | 25 | 13 | **Ruled out:** these don't change it (each run on 90228a7): - `VICTORY_QUEUE_WAIT=0`: 15 of 27 - `VICTORY_CARD_BUFFERS=0`: 13 of 30 - `VICTORY_ASK_ONCE=0`: 4 of 9 (short run, but still there) So it isn't the queue holds or the card copies. Happy to run other switches if you have a guess.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:35:01 +00:00
Author
Owner

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

Same here on a third card: RTX 5070 12 GB (Blackwell, driver 32.0.16.2114), Ryzen 5 5600X, Windows 11, Series X profile, diag build, default settings. Seen on both 578d459 and 90228a7, in every run (four so far, scripted input).

On the same machine and game files, upstream VIctory (ffe310e plus a few open PRs) plays the same animation smoothly. I haven't captured frames of it, so no counts, only that it is visible every time.

**@⁠maplerouteadmin-dev** on GitHub · 2026-11-24 20:55 UTC · [original](https://github.com/fxceless/victory-fork/issues/39#issuecomment-7144235119) Same here on a third card: **RTX 5070 12 GB** (Blackwell, driver 32.0.16.2114), Ryzen 5 5600X, Windows 11, Series X profile, diag build, default settings. Seen on both **578d459** and **90228a7**, in every run (four so far, scripted input). On the same machine and game files, upstream VIctory (`ffe310e` plus a few open PRs) plays the same animation smoothly. I haven't captured frames of it, so no counts, only that it is visible every time.
Author
Owner

@⁠lyranie on GitHub · 2026-11-24 21:00 UTC · original

same issue aswell, same thing on another fork; similar specs as @⁠maplerouteadmin-dev but on linux using wine instead; gonna try with WARP to see if this one is an nvidia issue

**@⁠lyranie** on GitHub · 2026-11-24 21:00 UTC · [original](https://github.com/fxceless/victory-fork/issues/39#issuecomment-7144355020) same issue aswell, same thing on another fork; similar specs as @⁠maplerouteadmin-dev but on linux using wine instead; gonna try with WARP to see if this one is an nvidia issue
Author
Owner

@⁠arminkhaleghirod on GitHub · 2026-11-24 21:21 UTC · original

Found it: the texture guard. With VICTORY_TEXTURE_GUARD=0 it's gone (0 of 29 jump back). The guard skips a texture unless it saw a write, so the animation's frames, written through another view, were only refreshed every 8th frame and shown out of order.

Fix is in #63. Until then, VICTORY_TEXTURE_GUARD=0 works around it.

@⁠lyranie it's not NVIDIA-specific. It's this guard, so WARP should show it too.

**@⁠arminkhaleghirod** on GitHub · 2026-11-24 21:21 UTC · [original](https://github.com/fxceless/victory-fork/issues/39#issuecomment-7144824465) Found it: the texture guard. With `VICTORY_TEXTURE_GUARD=0` it's gone (0 of 29 jump back). The guard skips a texture unless it saw a write, so the animation's frames, written through another view, were only refreshed every 8th frame and shown out of order. Fix is in #63. Until then, `VICTORY_TEXTURE_GUARD=0` works around it. @⁠lyranie it's not NVIDIA-specific. It's this guard, so WARP should show it too.
Author
Owner

@⁠arminkhaleghirod on GitHub · 2026-11-24 21:37 UTC · original

Update: #58 fixes this too (tested on the 4080, numbers there). I closed my #63 as a duplicate of it.

**@⁠arminkhaleghirod** on GitHub · 2026-11-24 21:37 UTC · [original](https://github.com/fxceless/victory-fork/issues/39#issuecomment-7145172801) Update: #58 fixes this too (tested on the 4080, numbers there). I closed my #63 as a duplicate of it.
Author
Owner

@⁠lucaseddd on GitHub · 2026-11-24 22:09 UTC · original

I applied SlopComp's #58 to Xeltax/VIcky's fx-heapmap at 5b241f3. The source-only backport preserves the original author. With the local Agility SDK exports, it builds on Windows 10 for an RTX 3060 Laptop 6 GB.

The startup animation stopped visibly jumping back on this setup. With a warm shader cache and capture disabled, three successive five-second samples averaged 30.0, 30.1 and 30.0 FPS; texture work averaged 4.5?5.0 ms/frame. This is the startup animation, and those averages cannot rule out isolated long frames. Relay and late submission waits were off in that run.

**@⁠lucaseddd** on GitHub · 2026-11-24 22:09 UTC · [original](https://github.com/fxceless/victory-fork/issues/39#issuecomment-7145878521) I applied SlopComp's #58 to Xeltax/VIcky's fx-heapmap at 5b241f3. The [source-only backport](https://github.com/lucaseddd/VIctory/commit/23d69d1925ba36092745a43b26be57e5d0236b33) preserves the original author. With the local Agility SDK exports, it builds on Windows 10 for an RTX 3060 Laptop 6 GB. The startup animation stopped visibly jumping back on this setup. With a warm shader cache and capture disabled, three successive five-second samples averaged 30.0, 30.1 and 30.0 FPS; texture work averaged 4.5?5.0 ms/frame. This is the startup animation, and those averages cannot rule out isolated long frames. Relay and late submission waits were off in that run.
Author
Owner

@⁠ArturoWolff on GitHub · 2026-11-24 22:35 UTC · original

RTX 4060 / Linux / Proton: the backward frames and the later hitch were two different problems. On the final replay the person watching and listening described the intro as “smooth as butter and with audio.” This is an intro result, not a claim about world rendering or gameplay.

Reproduction: Ryzen 5 5600, RTX 4060 8 GB, NVIDIA 620.73.04, KDE Wayland, GE-Proton11-14, Series X profile, title build 1.0.2.1. Release build with --features diagnostics, target x86_64-pc-windows-gnullvm. Tested #20 merge 0e507b4a608a90d429f6eac5da16bd83e8d07a90, not stock main. We reproduced the Wine compiler's E5005 on RWByteAddressBuffer.InterlockedMax, used #20's DXC fallback with dxcompiler.dll and dxil.dll beside the executable, and saw the fallback execute. Credit to #6 and #20 for that work.

  1. Backward jumps: VICTORY_TEXTURE_GUARD=0 alone stopped the visible reversals, confirming the workaround already found here. #58/#63 and #159 are related; we tested the setting, not those patches.
  2. Uneven pacing after the stars: keeping the guard off, set VICTORY_TEXTURE_NO_WAIT=1 inside the game environment (our bubblewrap launcher clears inherited variables). This lets the texture refresh use a kernel read instead of waiting for a title-memory remap. Diagnostics showed fallback reads and 0.0 ms reported remap wait. The most obvious long holds were in the illustrated sequence, not the initial zoom.
Configuration First 6 s of scored motion: picture changes 95th percentile / longest interval Next 6 s: changes
Guard off, default wait 145 106 / 227 ms 180
Guard off, no-wait 174 51 / 169 ms 180
Final replay: both switches, no launcher CPU/RAM/swap quotas 173 42 / 183 ms 180

These are intervals between changed images in a sampled screen crop, not GPU timestamps. Windows start 1 s and 7 s after first detected motion; the same persistent caches were reused, not reset between runs. The settings improved early pacing, but the accepted replay still contained one long interval. Removing the launcher's quotas did not demonstrate that memory pressure caused that hold.

Local launcher fixes, separate from Victory changes:

  • Xbox A at profile selection: the sandbox had hidden the controller. Resolve /dev/input/by-id/*-event-joystick on each launch; require a real evdev character node, the expected Microsoft vendor/product (045e:0b12 here), and ID_INPUT_JOYSTICK=1; device-bind only that node. Victory then saw XInput slot 0 and a physical A press advanced the profile prompt. No GameInput patch, synthetic Enter, or whole-directory input bind was needed for that check.
  • Display and desktop launch: the nested Xwayland server was actually 640×480. Target DP-2 and set/check its nested output at 1920×1080; don't change the host display mode or confuse the nested resolution with Victory's logged 3840×2160 presenter. An unrelated Wine process also blocked the desktop shortcut: keep the single-instance lock, but check for a live same-user game executable, not every Wine process.
  • Audio: the sandbox uses a private Pulse sink; only tagged game streams are relayed to the selected host output. A trial forcing PULSE_LATENCY_MSEC=120 was silent (all 789 sampled game PCM blocks zero). We removed the override; on the accepted replay 429/817 blocks contained signal and the listener confirmed audible playback. This is not evidence for a codec fix or a universal Pulse buffer recommendation.

Game files were mounted read-only and game networking was disabled. No assets, recordings or footage attached. The furthest separately verified local milestone was the story-loading screen, not a visible world responding to player input.

AI-assisted: Hermes ran the tests and prepared this report at the operator’s request; controller, perceived motion and audibility were also checked by the operator.

**@⁠ArturoWolff** on GitHub · 2026-11-24 22:35 UTC · [original](https://github.com/fxceless/victory-fork/issues/39#issuecomment-7146418552) **RTX 4060 / Linux / Proton: the backward frames and the later hitch were two different problems.** On the final replay the person watching and listening described the intro as “smooth as butter and with audio.” This is an intro result, not a claim about world rendering or gameplay. **Reproduction:** Ryzen 5 5600, RTX 4060 8 GB, NVIDIA 620.73.04, KDE Wayland, GE-Proton11-14, Series X profile, title build 1.0.2.1. Release build with `--features diagnostics`, target `x86_64-pc-windows-gnullvm`. Tested #20 merge `0e507b4a608a90d429f6eac5da16bd83e8d07a90`, not stock main. We reproduced the Wine compiler's `E5005` on `RWByteAddressBuffer.InterlockedMax`, used #20's DXC fallback with `dxcompiler.dll` and `dxil.dll` beside the executable, and saw the fallback execute. Credit to #6 and #20 for that work. 1. **Backward jumps:** `VICTORY_TEXTURE_GUARD=0` alone stopped the visible reversals, confirming the workaround already found here. #58/#63 and #159 are related; we tested the setting, not those patches. 2. **Uneven pacing after the stars:** keeping the guard off, set `VICTORY_TEXTURE_NO_WAIT=1` **inside** the game environment (our bubblewrap launcher clears inherited variables). This lets the texture refresh use a kernel read instead of waiting for a title-memory remap. Diagnostics showed fallback reads and 0.0 ms reported remap wait. The most obvious long holds were in the illustrated sequence, not the initial zoom. | Configuration | First 6 s of scored motion: picture changes | 95th percentile / longest interval | Next 6 s: changes | |---|---:|---:|---:| | Guard off, default wait | 145 | 106 / 227 ms | 180 | | Guard off, no-wait | 174 | 51 / 169 ms | 180 | | Final replay: both switches, no launcher CPU/RAM/swap quotas | 173 | 42 / 183 ms | 180 | These are intervals between changed images in a sampled screen crop, not GPU timestamps. Windows start 1 s and 7 s after first detected motion; the same persistent caches were reused, not reset between runs. The settings improved early pacing, but the accepted replay still contained one long interval. Removing the launcher's quotas did **not** demonstrate that memory pressure caused that hold. **Local launcher fixes, separate from Victory changes:** - **Xbox A at profile selection:** the sandbox had hidden the controller. Resolve `/dev/input/by-id/*-event-joystick` on each launch; require a real evdev character node, the expected Microsoft vendor/product (`045e:0b12` here), and `ID_INPUT_JOYSTICK=1`; device-bind **only that node**. Victory then saw XInput slot 0 and a physical A press advanced the profile prompt. No GameInput patch, synthetic Enter, or whole-directory input bind was needed for that check. - **Display and desktop launch:** the nested Xwayland server was actually 640×480. Target DP-2 and set/check its nested output at 1920×1080; don't change the host display mode or confuse the nested resolution with Victory's logged 3840×2160 presenter. An unrelated Wine process also blocked the desktop shortcut: keep the single-instance lock, but check for a live same-user game executable, not every Wine process. - **Audio:** the sandbox uses a private Pulse sink; only tagged game streams are relayed to the selected host output. A trial forcing `PULSE_LATENCY_MSEC=120` was silent (all 789 sampled game PCM blocks zero). We removed the override; on the accepted replay 429/817 blocks contained signal and the listener confirmed audible playback. This is not evidence for a codec fix or a universal Pulse buffer recommendation. Game files were mounted read-only and game networking was disabled. No assets, recordings or footage attached. The furthest separately verified local milestone was the story-loading screen, not a visible world responding to player input. *AI-assisted: Hermes ran the tests and prepared this report at the operator’s request; controller, perceived motion and audibility were also checked by the operator.*
Author
Owner

@⁠xunbreakablex on GitHub · 2026-11-24 22:53 UTC · original

Independent reproduction + a cost data point for the texture-guard fix (#39 / #58 / #159).

Setup: Ryzen 5 5600, RTX 4070 12 GB, NVIDIA 621.01, Windows 11 26300, 1080p, diag build of main 7b0f736 (+ VICTORY_RELAY=2), gamepad input scripted with VICTORY_KEYS.

Reproduction: the intro video (the poster zoom/blur sequence, not only the star animation) jumps between three older pictures. I measured it from VICTORY_CAPTURE frames: mean difference between consecutive frames divided by the mean difference of frames three apart. Smooth scene: 0.36. With the bug: 7.5 (15 runs, 6.5-7.9). The three-frame period matches a ring of three textures, each sampled and checked only every third frame. VICTORY_TEXTURE_GUARD=0 brings it to 0.62.

Cost point: my first attempt was the same idea as #58/#159: after the hash finds a change behind the guard, hash that texture at every check for N frames (I used 120). In the world that raised the texture preparation from 13 ms to 160 ms per frame (median frame 394 -> 607 ms in one run each), because streaming textures change once and then get hashed every frame for N frames.

What worked, and is cheap: the texture is hashed once more at its next check (not the next frame: a ring texture is checked every third frame, so "next frame" never sees a second change and my second attempt brought the flicker back). Only if that second hash also finds a change is it "hot" and hashed at every check while it keeps changing (24 frames after the last change). A texture that streams in changes once and is not hashed on.

// Last { hot_until, changed_at, verify }
fn changed(&mut self, frame: u64) {
    if (self.verify && frame <= self.changed_at + VERIFY_FRAMES) || frame < self.hot_until {
        self.hot_until = frame + HOT_FRAMES;           // 24
    }
    self.changed_at = frame;
    self.verify = true;
}
fn unchanged(&mut self) { self.verify = false; }
fn hash_due(&self, frame: u64) -> bool {
    frame < self.hot_until || (self.verify && frame > self.changed_at && frame <= self.changed_at + VERIFY_FRAMES)
}
// refresh_timed: `turn = every_8th_frame || last.hash_due(frame)`;
// call last.changed(frame) where the hash differs, last.unchanged() where it matches.

Result: intro ratio 0.57 with this version (2 runs; 0.64-0.65 with the earlier 120-frame variant, also smooth). World, no capture, warm shader cache: median 336-343 ms/frame (3 runs), texture preparation 13-21 ms, which is where it was before the fix (13 ms in an older run), same number of dropped draws; 3 unit tests for the state machine. Starting every texture hot for 64 frames (as #58 does) may cost more in the world than this; I have not measured #58 itself.

Happy to open this as a PR against whichever of #58/#159 you prefer to keep, or to leave it as a suggestion.

(Prepared with AI assistance; all numbers are from real runs on the machine above.)

**@⁠xunbreakablex** on GitHub · 2026-11-24 22:53 UTC · [original](https://github.com/fxceless/victory-fork/issues/39#issuecomment-7146760375) Independent reproduction + a cost data point for the texture-guard fix (#39 / #58 / #159). **Setup:** Ryzen 5 5600, RTX 4070 12 GB, NVIDIA 621.01, Windows 11 26300, 1080p, diag build of `main` `7b0f736` (+ `VICTORY_RELAY=2`), gamepad input scripted with `VICTORY_KEYS`. **Reproduction:** the intro video (the poster zoom/blur sequence, not only the star animation) jumps between three older pictures. I measured it from `VICTORY_CAPTURE` frames: mean difference between consecutive frames divided by the mean difference of frames three apart. Smooth scene: 0.36. With the bug: 7.5 (15 runs, 6.5-7.9). The three-frame period matches a ring of three textures, each sampled and checked only every third frame. `VICTORY_TEXTURE_GUARD=0` brings it to 0.62. **Cost point:** my first attempt was the same idea as #58/#159: after the hash finds a change behind the guard, hash that texture at every check for N frames (I used 120). In the world that raised the texture preparation from 13 ms to 160 ms per frame (median frame 394 -> 607 ms in one run each), because streaming textures change once and then get hashed every frame for N frames. **What worked, and is cheap:** the texture is hashed once more at its *next check* (not the next frame: a ring texture is checked every third frame, so "next frame" never sees a second change and my second attempt brought the flicker back). Only if that second hash also finds a change is it "hot" and hashed at every check while it keeps changing (24 frames after the last change). A texture that streams in changes once and is not hashed on. ```rust // Last { hot_until, changed_at, verify } fn changed(&mut self, frame: u64) { if (self.verify && frame <= self.changed_at + VERIFY_FRAMES) || frame < self.hot_until { self.hot_until = frame + HOT_FRAMES; // 24 } self.changed_at = frame; self.verify = true; } fn unchanged(&mut self) { self.verify = false; } fn hash_due(&self, frame: u64) -> bool { frame < self.hot_until || (self.verify && frame > self.changed_at && frame <= self.changed_at + VERIFY_FRAMES) } // refresh_timed: `turn = every_8th_frame || last.hash_due(frame)`; // call last.changed(frame) where the hash differs, last.unchanged() where it matches. ``` **Result:** intro ratio 0.57 with this version (2 runs; 0.64-0.65 with the earlier 120-frame variant, also smooth). World, no capture, warm shader cache: median 336-343 ms/frame (3 runs), texture preparation 13-21 ms, which is where it was before the fix (13 ms in an older run), same number of dropped draws; 3 unit tests for the state machine. Starting every texture hot for 64 frames (as #58 does) may cost more in the world than this; I have not measured #58 itself. Happy to open this as a PR against whichever of #58/#159 you prefer to keep, or to leave it as a suggestion. (Prepared with AI assistance; all numbers are from real runs on the machine above.)
Author
Owner

@⁠brunofgmag on GitHub · 2026-11-24 22:57 UTC · original

Same flicker on Linux (RTX 4080, Proton Experimental). The texture guard from this issue is the main cause, but #63 alone leaves a smaller one: about one frame in 16 to 20 still jumps back. That one comes from the record-time upload skip in texture::upload, and #80 fixes it. With #63 and #80 together my count drops to 0. The numbers and the mechanism are in #80.

Thanks to @⁠arminkhaleghirod for finding the guard, and to @⁠adritoyalser for #80.

**@⁠brunofgmag** on GitHub · 2026-11-24 22:57 UTC · [original](https://github.com/fxceless/victory-fork/issues/39#issuecomment-7146841436) Same flicker on Linux (RTX 4080, Proton Experimental). The texture guard from this issue is the main cause, but #63 alone leaves a smaller one: about one frame in 16 to 20 still jumps back. That one comes from the record-time upload skip in `texture::upload`, and #80 fixes it. With #63 and #80 together my count drops to 0. The numbers and the mechanism are in https://git.gtahub.st/github/fxceless--victory-fork/pulls/80. Thanks to @⁠arminkhaleghirod for finding the guard, and to @⁠adritoyalser for #80.
Author
Owner

@⁠Revens2 on GitHub · 2026-11-25 02:05 UTC · original

Ran PR #115 (merged on main c96b4f2) next to main alone, 3 runs of 240 s each, RTX 5070, two sessions in parallel (a confound). Stability results are in my comment on #115: no difference between the two at n=3 (both hit a host out-of-memory failure, 0x8007000E, in 2 of 3 runs). Whether the glitch itself is fixed: not verified (not looked at in these runs).

**@⁠Revens2** on GitHub · 2026-11-25 02:05 UTC · [original](https://github.com/fxceless/victory-fork/issues/39#issuecomment-7150297691) Ran PR #115 (merged on main c96b4f2) next to main alone, 3 runs of 240 s each, RTX 5070, two sessions in parallel (a confound). Stability results are in my comment on #115: no difference between the two at n=3 (both hit a host out-of-memory failure, 0x8007000E, in 2 of 3 runs). Whether the glitch itself is fixed: not verified (not looked at in these runs).
This discussion has been locked. Commenting is limited to contributors.
No description provided.