Test report + measurements: world runs with TEXTURE_NO_WAIT; a structural pipeline-wait bottleneck remains (with an external GUI monitor) #470

Open
opened 2026-11-26 03:44:05 +00:00 by github-bot · 10 comments
Owner

@⁠KretliJ on GitHub · 2026-11-25 01:19 UTC · original

AI-Assisted (GLM 5.3, Hermes Agent). Measured on my own machine.

Hi — I've been running the fork on a retail 1.0.2.1 dump and built a small external tool around its stdout to chase the frame-time bottlenecks. Sharing the measurements and one structural finding.

The tool: https://github.com/KretliJ/victory-monitor (MIT, stdlib-only Python/tkinter; reads only the fork's stdout — no emulator or game code involved). It launches victory.exe with a ticked set of VICTORY_* switches, parses the per-frame statistics lines live (preparing/copies/textures/GPU/copy-back/dropped/being-made/indirect, card busy %, remap hold-still, texture queue), renders a stacked frame-time chart with a bottleneck verdict per frame, has a stall watchdog (alert + what the log was doing when frames stopped landing), process commit memory, and an A/B compare of run summaries. 25 switches from this fork are pre-wired with tooltips.

Measurements (NVIDIA RTX 4060 Ti 8 GB, Series X profile, main at 2119b0e):

run switches world slow-frame median top bottleneck
1 none 3.7 s texture refresh blocked on the remap lock; card idle behind submit
2 RELAY=2 LATE_WAIT=3 WIDE_BACK=1 CARD_BUFFERS_MIN_MB=1 CARD_BUFFERS_MB=1024 1.6 s remap lock (hold-still ~400 ms median)
3 + TEXTURE_NO_WAIT=1 1.4 s moved: GPU ~1.1 s + copy-back ~1.1 s, card busy 13→62%
4 run 3, parked in one world area for 10 min 830 ms structural, not warm-up — details below

TEXTURE_NO_WAIT did exactly what its doc comment promises: remap-lock hold-still went from ~400 ms median (max 4.5 s) to 0, with 0 textures deferred — a clean win.

The structural finding

Parked in one world area for 10+ minutes, once first-use translation decays (first-binds 231/min → 2/min), the frame stabilizes at ~830 ms with dropped ~2,550 and being made ~300 constant:

minutes in world ms/frame dropped being made
0–2 1158 5221 330
2–4 758 2576 307
4–6 833 2600 312
6–8 853 2568 297
8–10 827 2552 302

The workers aren't behind (2–8 threads, first-binds at zero); the ~300 pipelines "being made" never drain, ~2,550 draws/frame stay dropped, and the frame is GPU ~740 ms + copy-back ~780 ms at 98% card busy. It looks like the title keeps re-requesting pipelines that don't stick, or the shared 500 ms VICTORY_PIPELINE_WAIT_MS budget is spent waiting on pipelines for draws that were already dropped that same frame. I haven't gone deeper than reading the wait-budget logic in pipeline/make.rs.

This seems adjacent to #458 (a worker holding a pipeline for a minute — there it's one endless driver compile; here it's ~300 simultaneous and permanent). Happy to test hypotheses, log extra counters, or run specific switch combinations — the tool makes A/B runs cheap.

Otherwise: boot/menus/saves/cutscene fine, world renders, no device loss across ~6 runs (~40 min total). Thanks for the work on this fork.

**@⁠KretliJ** on GitHub · 2026-11-25 01:19 UTC · [original](https://github.com/fxceless/victory-fork/issues/470) **AI-Assisted (GLM 5.3, Hermes Agent). Measured on my own machine.** Hi — I've been running the fork on a retail 1.0.2.1 dump and built a small external tool around its stdout to chase the frame-time bottlenecks. Sharing the measurements and one structural finding. **The tool:** https://github.com/KretliJ/victory-monitor (MIT, stdlib-only Python/tkinter; reads only the fork's stdout — no emulator or game code involved). It launches `victory.exe` with a ticked set of `VICTORY_*` switches, parses the per-frame statistics lines live (preparing/copies/textures/GPU/copy-back/dropped/being-made/indirect, card busy %, remap hold-still, texture queue), renders a stacked frame-time chart with a bottleneck verdict per frame, has a stall watchdog (alert + what the log was doing when frames stopped landing), process commit memory, and an A/B compare of run summaries. 25 switches from this fork are pre-wired with tooltips. **Measurements** (NVIDIA RTX 4060 Ti 8 GB, Series X profile, `main` at `2119b0e`): | run | switches | world slow-frame median | top bottleneck | |---|---|---|---| | 1 | none | 3.7 s | texture refresh blocked on the remap lock; card idle behind submit | | 2 | `RELAY=2 LATE_WAIT=3 WIDE_BACK=1 CARD_BUFFERS_MIN_MB=1 CARD_BUFFERS_MB=1024` | 1.6 s | remap lock (hold-still ~400 ms median) | | 3 | + `TEXTURE_NO_WAIT=1` | 1.4 s | moved: GPU ~1.1 s + copy-back ~1.1 s, card busy 13→62% | | 4 | run 3, parked in one world area for 10 min | 830 ms | structural, not warm-up — details below | `TEXTURE_NO_WAIT` did exactly what its doc comment promises: remap-lock hold-still went from ~400 ms median (max 4.5 s) to 0, with 0 textures deferred — a clean win. ## The structural finding Parked in one world area for 10+ minutes, once first-use translation decays (first-binds 231/min → 2/min), the frame stabilizes at ~830 ms with **`dropped ~2,550` and `being made ~300` constant**: | minutes in world | ms/frame | dropped | being made | |---|---|---|---| | 0–2 | 1158 | 5221 | 330 | | 2–4 | 758 | 2576 | 307 | | 4–6 | 833 | 2600 | 312 | | 6–8 | 853 | 2568 | 297 | | 8–10 | 827 | 2552 | 302 | The workers aren't behind (2–8 threads, first-binds at zero); the ~300 pipelines "being made" never drain, ~2,550 draws/frame stay dropped, and the frame is GPU ~740 ms + copy-back ~780 ms at 98% card busy. It looks like the title keeps re-requesting pipelines that don't stick, or the shared 500 ms `VICTORY_PIPELINE_WAIT_MS` budget is spent waiting on pipelines for draws that were already dropped that same frame. I haven't gone deeper than reading the wait-budget logic in `pipeline/make.rs`. This seems adjacent to #458 (a worker holding a pipeline for a minute — there it's one endless driver compile; here it's ~300 simultaneous and permanent). Happy to test hypotheses, log extra counters, or run specific switch combinations — the tool makes A/B runs cheap. Otherwise: boot/menus/saves/cutscene fine, world renders, no device loss across ~6 runs (~40 min total). Thanks for the work on this fork.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:44:05 +00:00
Author
Owner

@⁠akimfomin on GitHub · 2026-11-25 01:42 UTC · original

KretliJ, PortBridge traced one way separate guest handles can repeat the same host pipeline work. On both your 2119b0e and the checked c96b4f2, the lock for a pipeline name ends after the cache lookup. Two workers can miss the same name and both create it before either stores the result.

In a deterministic CPU-only run with the exact admission code and a fake D3D12 library, four identical cold requests went from four creates to one create and three cache hits. An unrelated name in the old mutex bucket still completed while the first create was held. Warm loads, descriptor mismatches and failure retry passed. The patch adds one key allocation per warm hit. We have not measured this mechanism's effect on the reported backlog.

For the instrumentation you offered, an aggregate counter at the original create() entry could show how often a second create starts for a name already being created. Compare overlapping creates, total creates, hits and successful stores in an early window and a later stable window. The names can stay in process. Pinned patch, fixture and limitations

AI assistance: OpenAI Codex (GPT-6 family) assisted with source review, fixture, patch and verification.

**@⁠akimfomin** on GitHub · 2026-11-25 01:42 UTC · [original](https://github.com/fxceless/victory-fork/issues/470#issuecomment-7149854468) KretliJ, [PortBridge](https://github.com/akimfomin/PortBridge) traced one way separate guest handles can repeat the same host pipeline work. On both your `2119b0e` and the checked `c96b4f2`, the lock for a pipeline name ends after the cache lookup. Two workers can miss the same name and both create it before either stores the result. In a deterministic CPU-only run with the exact admission code and a fake D3D12 library, four identical cold requests went from four creates to one create and three cache hits. An unrelated name in the old mutex bucket still completed while the first create was held. Warm loads, descriptor mismatches and failure retry passed. The patch adds one key allocation per warm hit. We have not measured this mechanism's effect on the reported backlog. For the instrumentation you offered, an aggregate counter at the original `create()` entry could show how often a second create starts for a name already being created. Compare overlapping creates, total creates, hits and successful stores in an early window and a later stable window. The names can stay in process. [Pinned patch, fixture and limitations](https://github.com/akimfomin/PortBridge/blob/58474368a295cd6a1c59441c1a4dd702c5606e4b/research/rendering-night/victory-fork-duplicate-pso/REPORT.md) AI assistance: OpenAI Codex (GPT-6 family) assisted with source review, fixture, patch and verification.
Author
Owner

@⁠akimfomin on GitHub · 2026-11-25 02:30 UTC · original

One new hardware datapoint for the duplicate-work question above. PortBridge ran the exact extracted admission code against a real empty D3D12 pipeline library on an RTX 4070 Ti SUPER, using one identical synthetic compute shader in both arms.

Two same-name requests intentionally overlapped before the first store. The original path made two successful CreateComputePipelineState calls and one redundant store returned E_INVALIDARG. With the proposed admission change there was one create, one store and a successful library load for the second request. Both requests succeeded in both arms, and the later warm control hit the library. Exact input, source and native API log

This measures actual D3D12 API calls. How often those requests overlap in your workload and their effect on frame time are open.

**@⁠akimfomin** on GitHub · 2026-11-25 02:30 UTC · [original](https://github.com/fxceless/victory-fork/issues/470#issuecomment-7150809773) One new hardware datapoint for the duplicate-work question above. [PortBridge](https://github.com/akimfomin/PortBridge) ran the exact extracted admission code against a real empty D3D12 pipeline library on an RTX 4070 Ti SUPER, using one identical synthetic compute shader in both arms. Two same-name requests intentionally overlapped before the first store. The original path made two successful `CreateComputePipelineState` calls and one redundant store returned `E_INVALIDARG`. With the proposed admission change there was one create, one store and a successful library load for the second request. Both requests succeeded in both arms, and the later warm control hit the library. [Exact input, source and native API log](https://github.com/akimfomin/PortBridge/blob/f5cd8d918bc4fbe91999d4bf115ce70cc41d731c/research/rendering-night/victory-fork-duplicate-pso/REPORT.md#native-d3d12-ab) This measures actual D3D12 API calls. How often those requests overlap in your workload and their effect on frame time are open.
Author
Owner

@⁠KretliJ on GitHub · 2026-11-25 02:46 UTC · original

@⁠akimfomin implemented the instrumentation you asked for, on top of 2119b0e (patch commit 738ff2d, not pushed anywhere - happy to format it however you prefer, or you can fold it into PortBridge).

What it adds (crates/victory-gpu/src/pipeline/library.rs):

  • A MAKING set of names whose create is running right now, and four counters since the last frame-rate line: creates started, creates whose name another worker was already creating (your overlap case), creates done, stores refused (E_INVALIDARG, the redundant-store signal from your native-API test).
  • The frame-rate line now carries them: ... ({making} being made, {creating_now} creating now) ... creates: N started, N overlapping, N done, N stores refused; ...

creating now is the direct measure of the backlog your report implies: if our ~300 "being made" are mostly overlapping creates, that number stays high while throughput stays low; if overlap is rare, the backlog lives elsewhere.

Our numbers so far (same machine, VICTORY_TEXTURE_NO_WAIT=1, PIPELINE_WAIT_MS=0, 60 min parked in one world area): being made held at 300-470 the whole hour while first-binds decayed to near zero - consistent with your race (each re-request re-enters create for a name whose original create is still held by the driver), though being made counts the make-queue, not MAKING, so I can't separate them yet. That's what the new counters will do.

Next: run 10 min with these counters (early window vs stable window as you suggested), then apply your admission patch and re-measure the same windows. I'll post both tables here.

Made with the help of an AI (GLM 5.3 via Hermes Agent).

**@⁠KretliJ** on GitHub · 2026-11-25 02:46 UTC · [original](https://github.com/fxceless/victory-fork/issues/470#issuecomment-7151163950) @⁠akimfomin implemented the instrumentation you asked for, on top of `2119b0e` (patch commit `738ff2d`, not pushed anywhere - happy to format it however you prefer, or you can fold it into PortBridge). **What it adds** (`crates/victory-gpu/src/pipeline/library.rs`): - A `MAKING` set of names whose `create` is running right now, and four counters since the last frame-rate line: **creates started**, **creates whose name another worker was already creating** (your overlap case), **creates done**, **stores refused** (`E_INVALIDARG`, the redundant-store signal from your native-API test). - The frame-rate line now carries them: `... ({making} being made, {creating_now} creating now) ... creates: N started, N overlapping, N done, N stores refused; ...` `creating now` is the direct measure of the backlog your report implies: if our ~300 "being made" are mostly overlapping creates, that number stays high while throughput stays low; if overlap is rare, the backlog lives elsewhere. **Our numbers so far** (same machine, `VICTORY_TEXTURE_NO_WAIT=1`, `PIPELINE_WAIT_MS=0`, 60 min parked in one world area): `being made` held at 300-470 the whole hour while first-binds decayed to near zero - consistent with your race (each re-request re-enters `create` for a name whose original create is still held by the driver), though `being made` counts the make-queue, not `MAKING`, so I can't separate them yet. That's what the new counters will do. **Next**: run 10 min with these counters (early window vs stable window as you suggested), then apply your admission patch and re-measure the same windows. I'll post both tables here. Made with the help of an AI (GLM 5.3 via Hermes Agent).
Author
Owner

@⁠akimfomin on GitHub · 2026-11-25 03:04 UTC · original

KretliJ, thanks for implementing the counters and running the long control. Posting the two windows in this thread works. If you're willing to share the source-only instrumentation later, PortBridge can link it with your attribution.

If MAKING removes a name when any one create finishes, two overlapping creates on that name will look idle while the other is still running. It would help to keep an in-flight count per name until the last attempt returns. Then each window can show distinct active names, total active attempts, overlap starts, successful creates and duplicate-store E_INVALIDARG separately. The large pending count is useful on its own. Your upcoming counters will tell us how much of it is actually duplicate creation.

The native control is available if you want to check exactly how the start, completion and store events were counted. An aggregate table is enough to compare the runs.

**@⁠akimfomin** on GitHub · 2026-11-25 03:04 UTC · [original](https://github.com/fxceless/victory-fork/issues/470#issuecomment-7151559644) KretliJ, thanks for implementing the counters and running the long control. Posting the two windows in this thread works. If you're willing to share the source-only instrumentation later, [PortBridge](https://github.com/akimfomin/PortBridge) can link it with your attribution. If `MAKING` removes a name when any one create finishes, two overlapping creates on that name will look idle while the other is still running. It would help to keep an in-flight count per name until the last attempt returns. Then each window can show distinct active names, total active attempts, overlap starts, successful creates and duplicate-store `E_INVALIDARG` separately. The large pending count is useful on its own. Your upcoming counters will tell us how much of it is actually duplicate creation. The [native control](https://github.com/akimfomin/PortBridge/blob/f5cd8d918bc4fbe91999d4bf115ce70cc41d731c/research/rendering-night/victory-fork-duplicate-pso/REPORT.md#native-d3d12-ab) is available if you want to check exactly how the start, completion and store events were counted. An aggregate table is enough to compare the runs.
Author
Owner

@⁠KretliJ on GitHub · 2026-11-25 03:10 UTC · original

@⁠akimfomin good catch on the removal semantics — you're right that a set removed on first completion hides overlapping attempts. Fixed (commit fcbbf4a, amends my instrumentation patch):

  • MAKING is now an in-flight count per name (HashMap<String, u64>). Each create entry increments, each return decrements, and the name leaves the map only when the count reaches zero.
  • The frame line now reports N names, M attempts creating now — distinct active names and total active attempts separately, so a window with 2 names × 3 attempts each reads 2 names, 6 attempts.
  • The overlap counter already incremented per-start, unchanged.

So each window now shows: distinct active names, total active attempts, overlap starts, creates done, and refused stores — the five numbers your native control counts, aggregated. Naming the per-shader hashes comes free later from the existing call() log if we need to name a held pipeline (your #458 shape).

Cache note that reframes our numbers: our previous runs (being made ~300) were cold-cache first visits of that world area. We just verified it — with the warm 320 MB library the same area shows being made 0, creating now 0, overlap 0, drops 550/frame (from 2,552). The backlog was cold-start compilation volume, not a permanent state. We've now emptied the pipeline library (backup kept) and are running the cold windows with the fixed counters — early vs stable tables will land here, then your admission patch goes on top for the re-measure.

Made with the help of an AI (GLM 5.3 via Hermes Agent).

**@⁠KretliJ** on GitHub · 2026-11-25 03:10 UTC · [original](https://github.com/fxceless/victory-fork/issues/470#issuecomment-7151658341) @⁠akimfomin good catch on the removal semantics — you're right that a set removed on first completion hides overlapping attempts. Fixed (commit `fcbbf4a`, amends my instrumentation patch): - `MAKING` is now an in-flight **count per name** (`HashMap<String, u64>`). Each `create` entry increments, each return decrements, and the name leaves the map only when the count reaches zero. - The frame line now reports **`N names, M attempts creating now`** — distinct active names and total active attempts separately, so a window with 2 names × 3 attempts each reads `2 names, 6 attempts`. - The overlap counter already incremented per-start, unchanged. So each window now shows: distinct active names, total active attempts, overlap starts, creates done, and refused stores — the five numbers your native control counts, aggregated. Naming the per-shader hashes comes free later from the existing `call()` log if we need to name a held pipeline (your #458 shape). Cache note that reframes our numbers: our previous runs (`being made` ~300) were **cold-cache first visits** of that world area. We just verified it — with the warm 320 MB library the same area shows `being made 0`, `creating now 0`, overlap 0, drops 550/frame (from 2,552). The backlog was cold-start compilation volume, not a permanent state. We've now emptied the pipeline library (backup kept) and are running the cold windows with the fixed counters — early vs stable tables will land here, then your admission patch goes on top for the re-measure. Made with the help of an AI (GLM 5.3 via Hermes Agent).
Author
Owner

@⁠KretliJ on GitHub · 2026-11-25 03:47 UTC · original

@⁠akimfomin the two windows are in, and they answer your admission question with a negative — the race isn't the dominant mechanism here.

Setup: pipeline library emptied (320 MB backup kept), cold start, Series X profile, VICTORY_TEXTURE_NO_WAIT=1, VICTORY_PIPELINE_WAIT_MS=0, parked in one world area. Counters as committed in my instrumentation patch, with your correction: MAKING is an in-flight count per name, and the frame line reports distinct names / total attempts.

EARLY window (0-10 min, 107 bursts):

metric value
ms/frame median 454
dropped/frame median 646
being made median 722, peak 1,293
creating now 7 names / 7 attempts
creates started 1,742
overlap starts 10 (0.6%)
creates done 1,737
stores refused 11
draws/frame (effective) 3,952

STABLE window (10-16 min, 53 bursts):

metric value
ms/frame median 570 (oscillating 350-1,600)
dropped/frame median 343
being made 0 — fully drained
creating now 0/0
overlap 0 / 4 creates
draws/frame (effective) 4,780
GPU / copy-back 464 / 482 ms

Conclusions:

  1. The ~300 being made from my earlier report was cold-start compilation volume, not a permanent state: left parked, it drains to zero. The permanent-looking backlog in the first report was the area still streaming in.
  2. Your race is real but rare here: 0.6% overlap across 1,742 creates with 8 workers at full load. The admission fix is correct as a matter of correctness (and the 11 refused stores are its direct fingerprints), but eliminating it wouldn't have moved our frame time — the queue drains regardless.
  3. With pipelines out of the picture, the frame settles at GPU + copy-back ~460/480 ms median for ~4,800 effective draws — that's the fundamental emulator overhead wall, not a pipeline issue.

Thank you for the review — your removal-semantics catch made the counters honest, and the native-API control settled what the counters could only suggest.

Made with the help of an AI (GLM 5.3 via Hermes Agent).

**@⁠KretliJ** on GitHub · 2026-11-25 03:47 UTC · [original](https://github.com/fxceless/victory-fork/issues/470#issuecomment-7152241891) @⁠akimfomin the two windows are in, and they answer your admission question with a negative — the race isn't the dominant mechanism here. **Setup**: pipeline library emptied (320 MB backup kept), cold start, Series X profile, `VICTORY_TEXTURE_NO_WAIT=1`, `VICTORY_PIPELINE_WAIT_MS=0`, parked in one world area. Counters as committed in my instrumentation patch, with your correction: `MAKING` is an in-flight count per name, and the frame line reports distinct names / total attempts. **EARLY window (0-10 min, 107 bursts):** | metric | value | |---|---| | ms/frame median | 454 | | dropped/frame median | 646 | | being made | median 722, peak 1,293 | | creating now | 7 names / 7 attempts | | creates started | 1,742 | | **overlap starts** | **10 (0.6%)** | | creates done | 1,737 | | stores refused | 11 | | draws/frame (effective) | 3,952 | **STABLE window (10-16 min, 53 bursts):** | metric | value | |---|---| | ms/frame median | 570 (oscillating 350-1,600) | | dropped/frame median | **343** | | being made | **0 — fully drained** | | creating now | 0/0 | | overlap | 0 / 4 creates | | draws/frame (effective) | **4,780** | | GPU / copy-back | 464 / 482 ms | **Conclusions:** 1. The ~300 `being made` from my earlier report was **cold-start compilation volume, not a permanent state**: left parked, it drains to zero. The permanent-looking backlog in the first report was the area still streaming in. 2. **Your race is real but rare here**: 0.6% overlap across 1,742 creates with 8 workers at full load. The admission fix is correct as a matter of correctness (and the 11 refused stores are its direct fingerprints), but eliminating it wouldn't have moved our frame time — the queue drains regardless. 3. With pipelines out of the picture, the frame settles at GPU + copy-back ~460/480 ms median for ~4,800 effective draws — that's the fundamental emulator overhead wall, not a pipeline issue. Thank you for the review — your removal-semantics catch made the counters honest, and the native-API control settled what the counters could only suggest. Made with the help of an AI (GLM 5.3 via Hermes Agent).
Author
Owner

@⁠KretliJ on GitHub · 2026-11-25 03:50 UTC · original

@⁠akimfomin yes — please do link it with attribution. Here it is as a standalone patch file (source-only, applies to 2119b0e with the fixed in-flight semantics from my previous comment):

https://gist.github.com/KretliJ/14f6d8988467df07cba62f29890ee0ae

Contents: create-overlap-counters-victory-fork-470.patch — the four counters (started / overlapping / done / stores refused per frame window), the per-name in-flight map with count-based removal, and both frame-line fields (N names, M attempts creating now). Author KretliJ, AI-assisted (GLM 5.3 via Hermes Agent), same license as the fork (GPL-3.0-or-later applies to anything derived from it).

One caveat for whoever applies it: the frame-line field labels assume the issue-470 fork layout (victory_gpu::pipeline paths); on upstream VIctory the module paths differ, so it will need a light touch. The counters themselves are self-contained in library.rs.

The raw data behind the tables in my previous comment is in the gist history if useful (I can push the two run logs there too — say the word).

Made with the help of an AI (GLM 5.3 via Hermes Agent).

**@⁠KretliJ** on GitHub · 2026-11-25 03:50 UTC · [original](https://github.com/fxceless/victory-fork/issues/470#issuecomment-7152294339) @⁠akimfomin yes — please do link it with attribution. Here it is as a standalone patch file (source-only, applies to `2119b0e` with the fixed in-flight semantics from my previous comment): **https://gist.github.com/KretliJ/14f6d8988467df07cba62f29890ee0ae** Contents: `create-overlap-counters-victory-fork-470.patch` — the four counters (started / overlapping / done / stores refused per frame window), the per-name in-flight map with count-based removal, and both frame-line fields (`N names, M attempts creating now`). Author KretliJ, AI-assisted (GLM 5.3 via Hermes Agent), same license as the fork (GPL-3.0-or-later applies to anything derived from it). One caveat for whoever applies it: the frame-line field labels assume the issue-470 fork layout (`victory_gpu::pipeline` paths); on upstream VIctory the module paths differ, so it will need a light touch. The counters themselves are self-contained in `library.rs`. The raw data behind the tables in my previous comment is in the gist history if useful (I can push the two run logs there too — say the word). Made with the help of an AI (GLM 5.3 via Hermes Agent).
Author
Owner

@⁠akimfomin on GitHub · 2026-11-25 04:08 UTC · original · edited 2026-11-25 04:35 UTC

KretliJ, thanks for doing the cold and settled windows and publishing the counters. I linked your original patch with your attribution in the PortBridge #470 research record.

Your observed 10 overlaps in 1,742 starts and the later empty queue settle which direction to prioritize for this run. The synthetic native test established that duplicate creation is possible. Your measurements put its frequency in context, so I have no frame-time claim for the admission patch. AI-assisted PortBridge follow-up (OpenAI Codex).

A separate follow-up tested record-time range packing on the existing DIRECT queue. Two opposed-order RTX workers checked 54 full windows each. Dense 16×64 KiB requests became one 1 MiB copy and CPU recording dropped from 4.20 to 0.30 µs. The paired median GPU difference was only 0.608 µs. Sparse requests kept the original command count and CPU time. Source, exact range controls and raw results. This isolates the recording step from planning, queue contention and merging. It would complement #71 only where the live fetch ranges are often adjacent.

**@⁠akimfomin** on GitHub · 2026-11-25 04:08 UTC · [original](https://github.com/fxceless/victory-fork/issues/470#issuecomment-7152559442) · edited 2026-11-25 04:35 UTC KretliJ, thanks for doing the cold and settled windows and publishing the counters. I linked [your original patch](https://gist.github.com/KretliJ/14f6d8988467df07cba62f29890ee0ae) with your attribution in the [PortBridge #470 research record](https://github.com/akimfomin/PortBridge/blob/a4adfd1aca932ffcd7cdf98b71f1e42aac91b97e/research/rendering-night/victory-fork-duplicate-pso/LOCK-AND-WARM-REVIEW.md#independent-cold-and-settled-measurements). Your observed 10 overlaps in 1,742 starts and the later empty queue settle which direction to prioritize for this run. The synthetic native test established that duplicate creation is possible. Your measurements put its frequency in context, so I have no frame-time claim for the admission patch. AI-assisted PortBridge follow-up (OpenAI Codex). A separate follow-up tested record-time range packing on the existing DIRECT queue. Two opposed-order RTX workers checked 54 full windows each. Dense 16×64 KiB requests became one 1 MiB copy and CPU recording dropped from 4.20 to 0.30 µs. The paired median GPU difference was only 0.608 µs. Sparse requests kept the original command count and CPU time. [Source, exact range controls and raw results](https://github.com/akimfomin/PortBridge/blob/d8951ea361805da14f6cc870178ba4d08f66b772/research/rendering-night/victory-fork-copyback-native/README.md). This isolates the recording step from planning, queue contention and merging. It would complement #71 only where the live fetch ranges are often adjacent.
Author
Owner

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

Needs human attention: single machine, power-limited, one run per arm, no visual comparison, so this is a second data point for TEXTURE_NO_WAIT, not a case for changing its default.

AI-assisted (Claude); runs done on my machine. RTX 4070 (100 W power limit, core at most ~2300 MHz), Ryzen 5 5600 held at 3.95 GHz, Windows 11, driver 621.01, main at 9376fd6 built from source, default settings of that commit (relay stage 2, card buffers), pipeline library and shader cache warm, Series X profile. Two world runs of 5 minutes each, the same binary, only the switch differs.

default VICTORY_TEXTURE_NO_WAIT=1
texture refresh over the whole world run (sum of the frame lines) 23,746 ms 2,810 ms
of it waiting for title memory to hold still 19,261 ms (81%) 0 ms
frame lines with "textures" over 300 ms / worst 9 / 996 ms 0 / 76 ms
steady frame (mean ± sd, 26 lines) 294.4 ± 23.3 ms 291.9 ± 16.1 ms
world start to steady 131 s 124 s
  • Same as in your table: the hold-still wait goes to 0 and the long texture lines disappear. What I do not see is a faster frame: on this CPU-bound machine the steady frame is the same within the spread, and the 7 s shorter warm-up is one run each, so it is not a result.
  • The cost is as the doc comment says: about 70 textures per frame (at most 621) are read through the kernel, and about 20 per frame (at most 188) wait one frame.
  • The wait is not constant from run to run: in my first, cold run the same sum of hold-still waits was 68,994 ms, in the default run above 19,261 ms. So I would not quote one ratio for it.
  • On your structural finding: in both runs being made is 0 in 55 of 56 frame lines (one line shows 8) and dropped stays at about 346-349 per frame once steady, not ~2,550 with ~300 being made. Different commit (yours 2119b0e), GPU and, I assume, a colder pipeline library, so I do not claim it explains yours; it only says the plateau is not there in this setup.

Not measured: whether any texture looks different with the switch on.

**@⁠xunbreakablex** on GitHub · 2026-11-25 10:24 UTC · [original](https://github.com/fxceless/victory-fork/issues/470#issuecomment-7159643009) **Needs human attention:** single machine, power-limited, one run per arm, no visual comparison, so this is a second data point for `TEXTURE_NO_WAIT`, not a case for changing its default. AI-assisted (Claude); runs done on my machine. RTX 4070 (100 W power limit, core at most ~2300 MHz), Ryzen 5 5600 held at 3.95 GHz, Windows 11, driver 621.01, `main` at `9376fd6` built from source, default settings of that commit (relay stage 2, card buffers), pipeline library and shader cache warm, Series X profile. Two world runs of 5 minutes each, the same binary, only the switch differs. | | default | `VICTORY_TEXTURE_NO_WAIT=1` | |---|---|---| | texture refresh over the whole world run (sum of the frame lines) | 23,746 ms | 2,810 ms | | of it waiting for title memory to hold still | 19,261 ms (81%) | 0 ms | | frame lines with "textures" over 300 ms / worst | 9 / 996 ms | 0 / 76 ms | | steady frame (mean ± sd, 26 lines) | 294.4 ± 23.3 ms | 291.9 ± 16.1 ms | | world start to steady | 131 s | 124 s | - Same as in your table: the hold-still wait goes to 0 and the long texture lines disappear. What I do not see is a faster frame: on this CPU-bound machine the steady frame is the same within the spread, and the 7 s shorter warm-up is one run each, so it is not a result. - The cost is as the doc comment says: about 70 textures per frame (at most 621) are read through the kernel, and about 20 per frame (at most 188) wait one frame. - The wait is not constant from run to run: in my first, cold run the same sum of hold-still waits was 68,994 ms, in the default run above 19,261 ms. So I would not quote one ratio for it. - On your structural finding: in both runs `being made` is 0 in 55 of 56 frame lines (one line shows 8) and `dropped` stays at about 346-349 per frame once steady, not ~2,550 with ~300 being made. Different commit (yours `2119b0e`), GPU and, I assume, a colder pipeline library, so I do not claim it explains yours; it only says the plateau is not there in this setup. Not measured: whether any texture looks different with the switch on.
Author
Owner

@⁠KretliJ on GitHub · 2026-11-26 00:33 UTC · original

Follow-up on both open points here, from the playable-status report (4060 Ti 8GB, Series X dump, dd8791b + the #470 counters):

1. The plateau: you were right. Runs H through K2 (tree with INDIRECT_WINDOW) all show being made = 0 in steady state, matching your observation (55/56 lines) and not our original plateau (made ~300, dropped ~2,550 on 2119b0e). The backlog we reported was a pre-INDIRECT_WINDOW artifact: with VICTORY_INDIRECT_WINDOW=1 the steady made drops to 0 (or single digits during streaming bursts) and dropped settles near 340-350 — same ballpark as your setup. Measured across 5 independent runs.

2. TEXTURE_NO_WAIT on a 4060 Ti behaves as on your 4070: the hold-still wait goes to 0 and the long texture lines disappear, but the steady frame time doesn't follow. Our runs kept it on throughout (it is in every run's set), so we don't have an A/B like yours — but the pattern agrees: on bottlenecked machines the wait removal shows up as reduced worst-case texture lines (ours: 996 ms-class outliers gone; yours: 996 → 76 ms worst), not as a faster median frame.

3. New: the VRAM ceiling discovery — the part nobody had documented, and the reason the report exists:

  • On this 8 GB card, CARD_BUFFERS_MB=1024 (the default) starves buffers ≥1 MiB so hard that gameplay content never loads: character camera/look-at scripts, additional model packs, ~4,700 draws/frame ceiling. The title runs a partial world and it looks like a performance problem.
  • CARD_BUFFERS_MB=1536 unlocked that content: draws +30-85% (up to 8,873/frame), texture residency 7.2 GB, gameplay scripts running — a visibly more complete game.
  • The cost: the card's own budget (6,684 MB) was exceeded by ~375 MB spilling into shared system memory (slow PCIe path). So on midrange VRAM, the buffer-pool knob is not a performance tweak — it is a content gate, and past the gate the next limit is the shared-memory spill.
  • KEEP_SNAPSHOTS measured +1,246 ms stable here (the author's win was on 12 GB) — same ceiling, different symptom: every MB reserved is taken from the pool the title needs to load.

Net for midrange 8 GB: default settings leave the title half-loaded; the 1536 pool loads the full world and pays for it in shared-memory spill; the next experiment (VICTORY_TEXTURE_BUDGET_MB) is whether trading texture residency for within-budget operation wins or blocks the content. Full table, switches, and methodology in #1207.

AI-assisted (GLM 5.3 via Hermes Agent). Measured on my own machine.

**@⁠KretliJ** on GitHub · 2026-11-26 00:33 UTC · [original](https://github.com/fxceless/victory-fork/issues/470#issuecomment-7178886890) Follow-up on both open points here, from [the playable-status report](https://git.gtahub.st/github/fxceless--victory-fork/issues/1207) (4060 Ti 8GB, Series X dump, `dd8791b` + the #470 counters): **1. The plateau: you were right.** Runs H through K2 (tree with INDIRECT_WINDOW) all show `being made` = 0 in steady state, matching your observation (55/56 lines) and not our original plateau (made ~300, dropped ~2,550 on `2119b0e`). The backlog we reported was a pre-INDIRECT_WINDOW artifact: with `VICTORY_INDIRECT_WINDOW=1` the steady `made` drops to 0 (or single digits during streaming bursts) and `dropped` settles near 340-350 — same ballpark as your setup. Measured across 5 independent runs. **2. TEXTURE_NO_WAIT on a 4060 Ti** behaves as on your 4070: the hold-still wait goes to 0 and the long texture lines disappear, but the steady frame time doesn't follow. Our runs kept it on throughout (it is in every run's set), so we don't have an A/B like yours — but the pattern agrees: on bottlenecked machines the wait removal shows up as reduced worst-case texture lines (ours: 996 ms-class outliers gone; yours: 996 → 76 ms worst), not as a faster median frame. **3. New: the VRAM ceiling discovery** — the part nobody had documented, and the reason the report exists: - On this 8 GB card, `CARD_BUFFERS_MB=1024` (the default) **starves buffers ≥1 MiB so hard that gameplay content never loads**: character camera/look-at scripts, additional model packs, ~4,700 draws/frame ceiling. The title runs a partial world and it *looks* like a performance problem. - `CARD_BUFFERS_MB=1536` **unlocked that content**: draws +30-85% (up to 8,873/frame), texture residency 7.2 GB, gameplay scripts running — a visibly more complete game. - **The cost**: the card's own budget (6,684 MB) was exceeded by ~375 MB spilling into shared system memory (slow PCIe path). So on midrange VRAM, the buffer-pool knob is not a performance tweak — it is a **content gate**, and past the gate the next limit is the shared-memory spill. - `KEEP_SNAPSHOTS` measured +1,246 ms stable here (the author's win was on 12 GB) — same ceiling, different symptom: every MB reserved is taken from the pool the title needs to load. **Net for midrange 8 GB**: default settings leave the title half-loaded; the 1536 pool loads the full world and pays for it in shared-memory spill; the next experiment (`VICTORY_TEXTURE_BUDGET_MB`) is whether trading texture residency for within-budget operation wins or blocks the content. Full table, switches, and methodology in #1207. AI-assisted (GLM 5.3 via Hermes Agent). Measured on my own machine.
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/fxceless--victory-fork#470
No description provided.