GPU: async background worker for heap-indexed texture uploads (VICTORY_HEAP_WORKER=1) #1005

Closed
TG0000 wants to merge 3 commits from upstream-pr/1007 into main
TG0000 commented 2026-11-25 15:55:05 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by TG0000 on 2026-11-25T15:55:05Z.


Summary

Moves heap-indexed texture creation and upload work off the recording/submission critical path onto a dedicated background worker thread (heap_worker.rs), gated behind VICTORY_HEAP_WORKER=1 (off by default).

Also includes two small hygiene commits on top of 0b0074e0 so Windows clippy and unit tests pass cleanly:

  • 55862100: fixes four existing Windows clippy warnings on main.
  • d3627f4f: fixes a flaky indirect-budget test ordering assertion.
    (Happy to split those two commits out if you prefer.)

Measured Results (AMD Radeon RX 6800 16 GB, Adrenalin 26.11.2, Windows 11, Series X 1440p, full texture budget, 420 s warm runs)

Measured in ABBA order on a single build (worker ON vs OFF):

  • Heap pass on recording thread: 62-65 ms -> 16 ms (-62.9 +-24.1 ms paired within a single launch, n=13 pairs; passes cut short by budget: 0.73 -> 0.03).
  • Textures uploaded by first world bakes: 12,213 -> 26,787 (textures arrive earlier, not later).
  • Frame time / FPS: 4.54 / 4.72 FPS OFF (~212-220 ms mean) -> 4.96 / 5.47 FPS ON (~183-202 ms mean, ~162-202 ms median; +13% vs OFF, +17% vs 4.47 FPS baseline).
  • Stability: 0 device removals across all 420 s runs.

Verification

  • Windows clippy (both CI commands): 0 warnings.
  • Unit tests (victory-gpu 171 passed, victory-shader 215 passed, 0 failed).
  • AI-assisted implementation and testing.
<!-- greyfinch-sync:fxceless/victory-fork:issue:5494665656 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1007). Originally posted by [TG0000](https://github.com/TG0000) on 2026-11-25T15:55:05Z. --- ## Summary Moves heap-indexed texture creation and upload work off the recording/submission critical path onto a dedicated background worker thread (heap_worker.rs), gated behind VICTORY_HEAP_WORKER=1 (off by default). Also includes two small hygiene commits on top of 0b0074e0 so Windows clippy and unit tests pass cleanly: - 55862100: fixes four existing Windows clippy warnings on main. - d3627f4f: fixes a flaky indirect-budget test ordering assertion. (Happy to split those two commits out if you prefer.) ## Measured Results (AMD Radeon RX 6800 16 GB, Adrenalin 26.11.2, Windows 11, Series X 1440p, full texture budget, 420 s warm runs) Measured in ABBA order on a single build (worker ON vs OFF): - Heap pass on recording thread: 62-65 ms -> 16 ms (-62.9 +-24.1 ms paired within a single launch, n=13 pairs; passes cut short by budget: 0.73 -> 0.03). - Textures uploaded by first world bakes: 12,213 -> 26,787 (textures arrive earlier, not later). - Frame time / FPS: 4.54 / 4.72 FPS OFF (~212-220 ms mean) -> 4.96 / 5.47 FPS ON (~183-202 ms mean, ~162-202 ms median; +13% vs OFF, +17% vs 4.47 FPS baseline). - Stability: 0 device removals across all 420 s runs. ## Verification - Windows clippy (both CI commands): 0 warnings. - Unit tests (victory-gpu 171 passed, victory-shader 215 passed, 0 failed). - AI-assisted implementation and testing.
UwUCammie commented 2026-11-25 18:05:11 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by UwUCammie on 2026-11-25T17:12:29Z.


Tested the worker commit (233a65f) on RX 7900 XT (CachyOS Linux, Wine 11.22 + vkd3d-proton + RADV) with VICTORY_HEAP_WORKER=1 alongside VICTORY_RELAY=2 + VICTORY_LATE_WAIT=3 + VICTORY_INDIRECT_GATHER=1. Ran a full 480 s gameplay pass to frame 5100 with 0 device removals, 0 GPUVM faults, and the recording thread's heap-textures pass dropped down to 0.0 ms/frame (steady 8.5 fps / 116–117 ms median, 97 ms shortest).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7169165068 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1007#issuecomment-7169165068). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-25T17:12:29Z. --- Tested the worker commit (`233a65f`) on RX 7900 XT (CachyOS Linux, Wine 11.22 + vkd3d-proton + RADV) with `VICTORY_HEAP_WORKER=1` alongside `VICTORY_RELAY=2` + `VICTORY_LATE_WAIT=3` + `VICTORY_INDIRECT_GATHER=1`. Ran a full 480 s gameplay pass to frame 5100 with 0 device removals, 0 GPUVM faults, and the recording thread's heap-textures pass dropped down to `0.0 ms/frame` (steady 8.5 fps / 116–117 ms median, 97 ms shortest).
tippythetaidum commented 2026-11-25 18:05:15 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by tippythetaidum on 2026-11-25T18:05:00Z.


Tested on an RTX 5080 16 GB (driver 621.14, Windows 11, Ryzen 7 9800X3D with 8 threads, Series X profile), in the prison opening.

Build: release build of main ca8829f with #24, #927, #823, #606, #1002, #907 and #834, plus this PR's 233a65f (it picked cleanly).

Two 600-second runs, one each, same switches (VICTORY_INDIRECT_WINDOW, COPY_PLAIN, JOIN_PARTS, BACK_OWN_VIEW, INDIRECT_GATHER and CARD_REHASH_RUNS, all =1), without and with VICTORY_HEAP_WORKER=1. Frame-rate lines from the first world frame on, about 92 per run:

median 25th percentile max
without 5.3 fps 2.3 fps 8.1 fps
with 5.6 fps 4.4 fps 7.0 fps

Most of the gain here is in the slow stretches: the slowest quarter of the frame lines went from 2.3 to 4.4 fps. No errors and no device loss in either run.

I haven't checked the picture with it yet, because these release builds didn't save frames. My next runs with it do save frames, and I'll add what they show.

AI-assisted (Claude Code, Claude Opus 5.5). Counts only, nothing from the game attached.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7170413647 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1007#issuecomment-7170413647). Originally posted by [tippythetaidum](https://github.com/tippythetaidum) on 2026-11-25T18:05:00Z. --- Tested on an RTX 5080 16 GB (driver 621.14, Windows 11, Ryzen 7 9800X3D with 8 threads, Series X profile), in the prison opening. **Build:** release build of `main` `ca8829f` with #24, #927, #823, #606, #1002, #907 and #834, plus this PR's `233a65f` (it picked cleanly). **Two 600-second runs, one each, same switches** (`VICTORY_INDIRECT_WINDOW`, `COPY_PLAIN`, `JOIN_PARTS`, `BACK_OWN_VIEW`, `INDIRECT_GATHER` and `CARD_REHASH_RUNS`, all `=1`), without and with `VICTORY_HEAP_WORKER=1`. Frame-rate lines from the first world frame on, about 92 per run: | | median | 25th percentile | max | |---|---|---|---| | without | 5.3 fps | 2.3 fps | 8.1 fps | | with | 5.6 fps | 4.4 fps | 7.0 fps | Most of the gain here is in the slow stretches: the slowest quarter of the frame lines went from 2.3 to 4.4 fps. No errors and no device loss in either run. I haven't checked the picture with it yet, because these release builds didn't save frames. My next runs with it do save frames, and I'll add what they show. AI-assisted (Claude Code, Claude Opus 5.5). Counts only, nothing from the game attached.
tippythetaidum commented 2026-11-25 19:09:45 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by tippythetaidum on 2026-11-25T18:31:45Z.


Picture follow-up to my numbers above: with VICTORY_HEAP_WORKER=1, the multicoloured square noise I'd been seeing on the escort guard's forearm in the prison corridor didn't show.

In an earlier run without it (a diagnostics build of a similar tree), the noise was on his forearm in three saved frames of the corridor walk (world frames +768, +864 and +960). In two release runs with it today, 60 saved frames from the yard through the counselor's office, his arms and hands are clean in every frame where they're in view, including the corridor (+960, +1056, +1632, +1824). That fits "a slot shows a texture only once its upload is submitted": the noise looked like a fresh texture in memory another one had used, shown before its upload.

The runs differ in more than this switch: release against diagnostics, and both of today's runs also have #1031, one of them with VICTORY_LEVELS_ON_DEMAND=1. So it's a consistent observation, not an A/B.

AI-assisted (Claude Code, Claude Opus 5.5). Descriptions only, nothing from the game attached.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7171030833 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1007#issuecomment-7171030833). Originally posted by [tippythetaidum](https://github.com/tippythetaidum) on 2026-11-25T18:31:45Z. --- Picture follow-up to my numbers above: with `VICTORY_HEAP_WORKER=1`, the multicoloured square noise I'd been seeing on the escort guard's forearm in the prison corridor didn't show. In an earlier run without it (a diagnostics build of a similar tree), the noise was on his forearm in three saved frames of the corridor walk (world frames +768, +864 and +960). In two release runs with it today, 60 saved frames from the yard through the counselor's office, his arms and hands are clean in every frame where they're in view, including the corridor (+960, +1056, +1632, +1824). That fits "a slot shows a texture only once its upload is submitted": the noise looked like a fresh texture in memory another one had used, shown before its upload. The runs differ in more than this switch: release against diagnostics, and both of today's runs also have #1031, one of them with `VICTORY_LEVELS_ON_DEMAND=1`. So it's a consistent observation, not an A/B. AI-assisted (Claude Code, Claude Opus 5.5). Descriptions only, nothing from the game attached.
Exopus-0x65f7ad0 commented 2026-11-26 02:08:44 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Exopus-0x65f7ad0 on 2026-11-26T01:53:39Z.


Data from a profile, plus a small change that helped here. Setup: RTX 5060 Ti 8 GB, 16 GB RAM, Series S profile, opening cutscene.

What the profile showed: the victory-heap thread was idle about half of each frame (112 of 220 ms, in Condvar::wait inside worker). Over the same seconds, 20,000+ texture slots were due. The worker runs one pass per kick, and a kick comes once per frame. At 4 fps that is about 4 passes per second, and each pass stops at its time limit with slots left over.

Change (local tree, about 15 lines): when the pass leaves slots due, meaning it stopped on bytes or time or was handed a full 4,096, the worker puts the same heap back in job.heap (if no newer heap was handed meanwhile) and runs another pass straight away instead of waiting. The flag is set where the pass ends. VICTORY_HEAP_WORKER_CHAIN=0 turns it off.

// worker(), after the pass and the make_way loop
if chain_on() && crate::draw::BACKLOG_LEFT.load(Relaxed) {
    let mut next = lock(&job.heap);
    if next.is_none() {
        *next = Some(heap);
    }
}

Result:

  • Passes now run back to back during the backlog (7 × 750 ms per 5 s), and the worker no longer idles while slots wait.
  • Together with #1246 (looked-at and fresh slots served in turns, slower re-looks), the queue drains mid-scene instead of staying at 20,000–30,000.
  • Lucia's bar close-up, black in 3 runs out of 3 before, is now textured.
  • Frame rate unchanged within noise, since the worker has its own thread.

Happy to open it as a PR stacked on this one if that is useful.

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:comment:7180251183 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1007#issuecomment-7180251183). Originally posted by [Exopus-0x65f7ad0](https://github.com/Exopus-0x65f7ad0) on 2026-11-26T01:53:39Z. --- Data from a profile, plus a small change that helped here. Setup: RTX 5060 Ti 8 GB, 16 GB RAM, Series S profile, opening cutscene. **What the profile showed:** the `victory-heap` thread was idle about half of each frame (112 of 220 ms, in `Condvar::wait` inside `worker`). Over the same seconds, 20,000+ texture slots were due. The worker runs one pass per `kick`, and a kick comes once per frame. At 4 fps that is about 4 passes per second, and each pass stops at its time limit with slots left over. **Change** (local tree, about 15 lines): when the pass leaves slots due, meaning it stopped on bytes or time or was handed a full 4,096, the worker puts the same heap back in `job.heap` (if no newer heap was handed meanwhile) and runs another pass straight away instead of waiting. The flag is set where the pass ends. `VICTORY_HEAP_WORKER_CHAIN=0` turns it off. ```rust // worker(), after the pass and the make_way loop if chain_on() && crate::draw::BACKLOG_LEFT.load(Relaxed) { let mut next = lock(&job.heap); if next.is_none() { *next = Some(heap); } } ``` **Result:** - Passes now run back to back during the backlog (7 × 750 ms per 5 s), and the worker no longer idles while slots wait. - Together with #1246 (looked-at and fresh slots served in turns, slower re-looks), the queue drains mid-scene instead of staying at 20,000–30,000. - Lucia's bar close-up, black in 3 runs out of 3 before, is now textured. - Frame rate unchanged within noise, since the worker has its own thread. Happy to open it as a PR stacked on this one if that is useful. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Exopus-0x65f7ad0 commented 2026-11-26 09:08:06 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Exopus-0x65f7ad0 on 2026-11-26T09:03:41Z.


Follow-up to my profile above. Same setup: RTX 5060 Ti 8 GB, 16 GB of RAM, Series S profile, opening cutscene.

After chaining the passes, the worker's largest remaining cost was refresh_textures_ahead: 233 of its 470 ms per frame. That function reads each texture's bytes into staging one texture at a time on the worker thread. With 16 GB, most of those pages are out of memory, so each read waits on the disk, and at a change of shot thousands of slots were still due.

I tried reading those textures on more threads. Every run below shows all faces checked in the cutscene close-ups:

Variant Queue at shot changes Faces in the close-ups fps
One thread (as now) up to ~9,000 due black or red in some runs 2.3
Kept victory-wide threads ~0 due all lit 1.7 (the submitting thread waits behind these reads in the shared queue)
Two threads of their own, always ~0 due all lit 2.3
Two threads of their own, only while the last pass left slots due near 0 all lit 2.5

The last variant is about 25 lines in refresh_textures_ahead, using std::thread::scope and the pass's "slots left due" flag. VICTORY_REFRESH_WIDE=0 turns it off.

Two things that also mattered for faces here:

  • VICTORY_PLACED_TEX=1 (#903): texture creation at 30–75 µs instead of a kernel allocation. More details on #903.
  • VICTORY_TEXTURE_NO_WAIT=0: the race @HLVM04 describes on #923 (a refresh that meets a remap leaves an index-picked texture at zeros for the rest of the run). Lucia's profile at the prison window was black with it on and lit with it off, with no measurable cost (one run).

The fps above is lower than earlier today in every variant, including the baseline. This machine has 16 GB of RAM and paging dominates, so treat the comparison between rows as the result, not the absolute numbers.

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:comment:7187363003 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1007#issuecomment-7187363003). Originally posted by [Exopus-0x65f7ad0](https://github.com/Exopus-0x65f7ad0) on 2026-11-26T09:03:41Z. --- Follow-up to my profile above. Same setup: RTX 5060 Ti 8 GB, 16 GB of RAM, Series S profile, opening cutscene. After chaining the passes, the worker's largest remaining cost was `refresh_textures_ahead`: 233 of its 470 ms per frame. That function reads each texture's bytes into staging one texture at a time on the worker thread. With 16 GB, most of those pages are out of memory, so each read waits on the disk, and at a change of shot thousands of slots were still due. I tried reading those textures on more threads. Every run below shows all faces checked in the cutscene close-ups: | Variant | Queue at shot changes | Faces in the close-ups | fps | |---|---|---|---| | One thread (as now) | up to ~9,000 due | black or red in some runs | 2.3 | | Kept `victory-wide` threads | ~0 due | all lit | **1.7** (the submitting thread waits behind these reads in the shared queue) | | Two threads of their own, always | ~0 due | all lit | 2.3 | | Two threads of their own, **only while the last pass left slots due** | near 0 | all lit | 2.5 | The last variant is about 25 lines in `refresh_textures_ahead`, using `std::thread::scope` and the pass's "slots left due" flag. `VICTORY_REFRESH_WIDE=0` turns it off. Two things that also mattered for faces here: - `VICTORY_PLACED_TEX=1` (#903): texture creation at 30–75 µs instead of a kernel allocation. More details on #903. - `VICTORY_TEXTURE_NO_WAIT=0`: the race @HLVM04 describes on #923 (a refresh that meets a remap leaves an index-picked texture at zeros for the rest of the run). Lucia's profile at the prison window was black with it on and lit with it off, with no measurable cost (one run). The fps above is lower than earlier today in every variant, including the baseline. This machine has 16 GB of RAM and paging dominates, so treat the comparison between rows as the result, not the absolute numbers. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jtrudeau1530 commented 2026-11-26 10:06:46 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by jtrudeau1530 on 2026-11-26T09:28:17Z.


AMD/Linux data point for the worker (ported onto avatarmanz/VIctory-7900XTX main 0ce46d5 + its #162, so on a different host.rs/draw.rs than here; port branch available on request).

Setup: RX 7900 XT, RADV, Wine 11.18 with the tree-index wineserver, vkd3d-proton, 32 GB, Series X profile. VICTORY_LATE_WAIT unset, so with RELAY on it runs at stage 3. Same build both ways; only VICTORY_HEAP_WORKER differs.

scene worker off worker on
standing in the prologue cell (textures 0.3 ms a frame) 15.1-16.7 fps 15.0-16.8 fps (no change)
walking script, 540 s run, last 60 meter lines mean 17.0 fps, peaks ~20 mean 17.8 fps (+5%), peaks 22-23

No device removal or exceptions in either. The worker logged 0.8-1.4 ms a frame at work while standing. So on this card the gain shows only when there are textures to pass; it's smaller than your +40% at the boat, probably because "preparing" (~40 ms of copies/refresh) dominates our frame. No regressions seen.

(AI-assisted with Claude Code; runs on my machine.)

<!-- greyfinch-sync:fxceless/victory-fork:comment:7188034435 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1007#issuecomment-7188034435). Originally posted by [jtrudeau1530](https://github.com/jtrudeau1530) on 2026-11-26T09:28:17Z. --- **AMD/Linux data point for the worker** (ported onto avatarmanz/VIctory-7900XTX main `0ce46d5` + its #162, so on a different host.rs/draw.rs than here; port branch available on request). Setup: RX 7900 XT, RADV, Wine 11.18 with the tree-index wineserver, vkd3d-proton, 32 GB, Series X profile. `VICTORY_LATE_WAIT` unset, so with RELAY on it runs at stage 3. Same build both ways; only `VICTORY_HEAP_WORKER` differs. | scene | worker off | worker on | |---|---:|---:| | standing in the prologue cell (textures 0.3 ms a frame) | 15.1-16.7 fps | 15.0-16.8 fps (no change) | | walking script, 540 s run, last 60 meter lines | mean **17.0** fps, peaks ~20 | mean **17.8** fps (+5%), peaks 22-23 | No device removal or exceptions in either. The worker logged 0.8-1.4 ms a frame at work while standing. So on this card the gain shows only when there are textures to pass; it's smaller than your +40% at the boat, probably because "preparing" (~40 ms of copies/refresh) dominates our frame. No regressions seen. (AI-assisted with Claude Code; runs on my machine.)
CuteBooty commented 2026-11-26 11:05:31 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by CuteBooty on 2026-11-26T10:18:41Z.


A port report from an RTX 3070 8 GB, and one case where a slot seems never to get its view with the worker on

I hand-ported this worker (as it is on main, d4a528ba) to CuteBooty/victory-8gb and ran it once, briefly: Series S, in town, VICTORY_HEAP_WORKER=1 with VICTORY_LATE_WAIT=2. About 75 ms a frame of texture-pass work left the recording threads (22.9 ms of it detiling), 2.6 lists a frame went to submissions, recording threads waited 0.02 ms for the worker to make way. No errors. I have no clean before-and-after frame time yet.

While porting, one path looked wrong to me, read at f6a09d3b. It is from reading the code, not from a picture I can show:

  • In State::heap_textures the recording-thread path (Into::List) calls mirror(index, handle, true) at the top of the per-slot block, before the checks, so every slot it handles gets its host view.
  • With the worker (Into::Ahead) mirror is not called there; the view is made later, when the list is taken and publish runs.
  • For a placed view whose texture the host writes itself (render-target, depth or unordered-access flags, so title_written is false), the block calls texture_slot_done and continues without an upload, so no publish follows for that slot. Since writing a placed view leaves the host slot null until something makes it (later, null_for), the slot appears to stay null, or keep an older view, until a draw reaches it through a table. A rewrite queues it again and it ends the same way.
  • The no-resource arm leaves the slot alone in the same way, but there the recording-thread path would also end in a null descriptor, so I do not think that half matters.

If that reading is right, a texture picked by index that is placed render-target or depth memory would sample as zero with the worker on. I could not establish whether this title does that, so it may never show.

What I did in the port: before texture_slot_done in those two arms, when running ahead, make the slot at once with host.mirror(index, handle, true), as the Into::List path does. I also added a stop-and-join path for the thread on device removal. Both are in the tree above, in crates/victory-gpu/src/heap_worker.rs and draw.rs, if useful.

One run, one machine. AI-assisted (Claude Code); the code path was read twice independently before posting.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7189194966 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1007#issuecomment-7189194966). Originally posted by [CuteBooty](https://github.com/CuteBooty) on 2026-11-26T10:18:41Z. --- **A port report from an RTX 3070 8 GB, and one case where a slot seems never to get its view with the worker on** I hand-ported this worker (as it is on main, `d4a528ba`) to CuteBooty/victory-8gb and ran it once, briefly: Series S, in town, `VICTORY_HEAP_WORKER=1` with `VICTORY_LATE_WAIT=2`. About 75 ms a frame of texture-pass work left the recording threads (22.9 ms of it detiling), 2.6 lists a frame went to submissions, recording threads waited 0.02 ms for the worker to make way. No errors. I have no clean before-and-after frame time yet. While porting, one path looked wrong to me, read at `f6a09d3b`. It is from reading the code, not from a picture I can show: - In `State::heap_textures` the recording-thread path (`Into::List`) calls `mirror(index, handle, true)` at the top of the per-slot block, before the checks, so every slot it handles gets its host view. - With the worker (`Into::Ahead`) `mirror` is not called there; the view is made later, when the list is taken and `publish` runs. - For a placed view whose texture the host writes itself (render-target, depth or unordered-access flags, so `title_written` is false), the block calls `texture_slot_done` and continues without an upload, so no `publish` follows for that slot. Since writing a placed view leaves the host slot null until something makes it (`later`, `null_for`), the slot appears to stay null, or keep an older view, until a draw reaches it through a table. A rewrite queues it again and it ends the same way. - The no-resource arm leaves the slot alone in the same way, but there the recording-thread path would also end in a null descriptor, so I do not think that half matters. If that reading is right, a texture picked by index that is placed render-target or depth memory would sample as zero with the worker on. I could not establish whether this title does that, so it may never show. What I did in the port: before `texture_slot_done` in those two arms, when running ahead, make the slot at once with `host.mirror(index, handle, true)`, as the `Into::List` path does. I also added a stop-and-join path for the thread on device removal. Both are in the tree above, in `crates/victory-gpu/src/heap_worker.rs` and `draw.rs`, if useful. One run, one machine. AI-assisted (Claude Code); the code path was read twice independently before posting.
MrEjecutor commented 2026-11-26 13:05:53 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MrEjecutor on 2026-11-26T12:26:31Z.


Another data point, on a different scene from the boat: RTX 5060 Ti 16 GB, Core Ultra 5 225F (6 P + 4 E cores), 32 GB, Windows 11. Fork main at ceb9e1f (and one pair at f6a09d3) plus a local patch that only feeds scripted keys to the pad. Series X profile, the run 279 switch set without MERGE_GAP and with VICTORY_BVH_NO_HIT=1, a scripted walk through the prologue's cell block, 600 s runs.

runs (median world fps each) mean of medians
VICTORY_HEAP_WORKER unset 4.4, 4.1 4.25
VICTORY_HEAP_WORKER=1 4.7, 4.2, 4.9 4.6

About +8 % here, with the preparing thread's median at 76-82 ms with the worker against 82-88 without. Much smaller than the +40 % at the boat, which fits a scene with far fewer heap-indexed textures to refresh. No device removal in any run.

Two method notes for anyone repeating this: after building a commit that changes the translator, this walk needed two discarded runs before the cache was warm (the first two came out at 1.7-1.8 fps whatever the switch), and the off and on runs were alternated.

On @tippythetaidum's picture note: we see the same multicoloured noise on the escort guard's forearm in that corridor on our builds, but our scripted camera rarely frames his arms, so I cannot confirm from these runs whether the worker removes it.

Not tested: the boat mission, Series S, more than three runs per side.

AI use: runs, numbers and this text were done with Claude Code.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7192005360 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1007#issuecomment-7192005360). Originally posted by [MrEjecutor](https://github.com/MrEjecutor) on 2026-11-26T12:26:31Z. --- Another data point, on a different scene from the boat: RTX 5060 Ti **16 GB**, Core Ultra 5 225F (6 P + 4 E cores), 32 GB, Windows 11. Fork `main` at `ceb9e1f` (and one pair at `f6a09d3`) plus a local patch that only feeds scripted keys to the pad. Series X profile, the run 279 switch set without `MERGE_GAP` and with `VICTORY_BVH_NO_HIT=1`, a scripted walk through the prologue's cell block, 600 s runs. | | runs (median world fps each) | mean of medians | |---|---|---:| | `VICTORY_HEAP_WORKER` unset | 4.4, 4.1 | 4.25 | | `VICTORY_HEAP_WORKER=1` | 4.7, 4.2, 4.9 | 4.6 | About +8 % here, with the preparing thread's median at 76-82 ms with the worker against 82-88 without. Much smaller than the +40 % at the boat, which fits a scene with far fewer heap-indexed textures to refresh. No device removal in any run. Two method notes for anyone repeating this: after building a commit that changes the translator, this walk needed **two** discarded runs before the cache was warm (the first two came out at 1.7-1.8 fps whatever the switch), and the off and on runs were alternated. On @tippythetaidum's picture note: we see the same multicoloured noise on the escort guard's forearm in that corridor on our builds, but our scripted camera rarely frames his arms, so I cannot confirm from these runs whether the worker removes it. Not tested: the boat mission, Series S, more than three runs per side. AI use: runs, numbers and this text were done with Claude Code.
alpz1000 commented 2026-11-26 19:53:19 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by alpz1000 on 2026-11-26T19:53:19Z.


Measured the texture worker on Windows 11 with an i5-8400, RTX 3060 12 GB, driver 610.88, and 32 GB RAM. I backported the upstream worker commit d4a528b onto a local 988aa41-based Series S test build, then ran the same binary with VICTORY_HEAP_WORKER=0 and =1. Both runs started from separate copies of the same save and cache.

Stationary checkpoint Off On
Frames sampled 528 482
FPS 5.17 4.99
90th-percentile frame time 231 ms 240 ms
Mean draws per frame 4,524 4,616
Mean submission preparation per frame 155.1 ms 163.1 ms

The sampled windows were within the first 100 seconds of 4,250–4,750 draws and less than 1 ms of pipeline waiting. FPS includes the long frames in those windows. The worker logged actual uploads when enabled. This single pair showed no FPS gain at this stationary checkpoint. The modest draw-count difference and the older backport limit the comparison. I did not test sustained movement or a streaming-heavy scene.

AI-assisted test and write-up.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7202065096 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1007#issuecomment-7202065096). Originally posted by [alpz1000](https://github.com/alpz1000) on 2026-11-26T19:53:19Z. --- Measured the texture worker on Windows 11 with an i5-8400, RTX 3060 12 GB, driver 610.88, and 32 GB RAM. I backported the upstream worker commit d4a528b onto a local 988aa41-based Series S test build, then ran the same binary with VICTORY_HEAP_WORKER=0 and =1. Both runs started from separate copies of the same save and cache. | Stationary checkpoint | Off | On | |---|---:|---:| | Frames sampled | 528 | 482 | | FPS | 5.17 | 4.99 | | 90th-percentile frame time | 231 ms | 240 ms | | Mean draws per frame | 4,524 | 4,616 | | Mean submission preparation per frame | 155.1 ms | 163.1 ms | The sampled windows were within the first 100 seconds of 4,250–4,750 draws and less than 1 ms of pipeline waiting. FPS includes the long frames in those windows. The worker logged actual uploads when enabled. This single pair showed no FPS gain at this stationary checkpoint. The modest draw-count difference and the older backport limit the comparison. I did not test sustained movement or a streaming-heavy scene. AI-assisted test and write-up.
TG0000 commented 2026-11-28 01:14:42 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by TG0000 on 2026-11-28T01:14:42Z.


Closing: this targets the earlier line, where its worker commit was already taken in (d4a528ba) before main moved to the new tree. The branch no longer merges, and a port to the new tree would be a new change to measure. Thanks for all the testing. (AI-assisted comment.)

<!-- greyfinch-sync:fxceless/victory-fork:comment:7231526259 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1007#issuecomment-7231526259). Originally posted by [TG0000](https://github.com/TG0000) on 2026-11-28T01:14:42Z. --- Closing: this targets the earlier line, where its worker commit was already taken in (d4a528ba) before `main` moved to the new tree. The branch no longer merges, and a port to the new tree would be a new change to measure. Thanks for all the testing. (AI-assisted comment.)

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!1005
No description provided.