Selective texture refresh using existing dirty-page tracking #3266

Open
opened 2026-11-29 21:10:06 +00:00 by github-bot · 10 comments
Owner

@⁠AwkGrep256 on GitHub · 2026-11-29 21:09 UTC · original

🚀 [Performance] Selective texture refresh using dirty-page tracking

💡 The idea

Currently, when a texture changes, VIctory can end up copying, detiling and uploading the entire texture, even if only a tiny portion of its memory was modified.

We already have dirty-page tracking in watch.rs, so why not use that information to update only the parts that actually changed?

For example:

  • Texture size: 64 MiB
  • Modified data: 256 KiB
  • Unchanged data: 63.75 MiB

Instead of processing all 64 MiB, ideally we should only process the affected regions.

🔍 Where this happens

Relevant files:

File Purpose
crates/victory-gpu/src/watch.rs Tracks memory writes at 4 KiB granularity
crates/victory-gpu/src/texture.rs Texture refresh, copying and detiling
crates/victory-gpu/src/gpudetile.rs GPU-assisted detiling
docs/unified-memory-audit.md Existing performance measurements

In particular, Staging::refresh_timed() in texture.rs detects changes, but the current refresh path can still process the entire texture.

The interesting part is that watch.rs already has more detailed information about which memory portions were modified (parts_written).

We're potentially not using all the information we already collect.

⚙️ Proposed approach

Instead of refreshing the entire texture:

  1. 🔎 Identify changed 4 KiB memory regions using existing dirty-page tracking.
  2. 🧮 Translate changed memory addresses into affected texture regions.
  3. 🎨 Detile only the affected regions.
  4. 📦 Preserve unchanged staging-buffer contents.
  5. 🚀 Upload only the affected regions using partial D3D12 texture copies.

Current vs proposed

Current Proposed
Memory read Entire texture Changed regions
Detiling Entire texture Affected regions
GPU upload Entire subresource Affected regions
Unchanged data Processed again Reused

📊 Potential data reduction


\boxed{
\text{Savings} =
\left(1-\frac{\text{Changed Bytes}}{\text{Total Texture Size}}\right)
\times 100%
}

🚀 Example: If only 4% of a texture changes, we could potentially avoid processing 96% of its data.

This is an idealized estimate, not a guaranteed performance improvement.

⚠️ Things to investigate

This isn't as simple as copying a few dirty pages.

We need to account for:

  • Console texture tiling and address translation.
  • BC1 / BC7 compressed formats and RGBA.
  • Mipmaps and array slices.
  • Compression-block alignment.
  • Multiple memory views and alias writes.
  • Partial GPU uploads and staging-buffer preservation.

A 4 KiB dirty memory page doesn't necessarily correspond to one contiguous rectangle in the final texture.

Unsupported or dense updates should fall back to the existing full-refresh path.

📊 Benchmark plan

Before implementing the optimization, let's establish whether it's actually worthwhile.

We should be able to benchmark most of this without launching a game.

Parameter Test cases
Texture sizes 1, 4, 16, 64 MiB
Formats BC1, BC7, RGBA
Dirty data 1%, 4%, 16%, 50%, 100%
Write patterns Random and clustered

Measure:

  • CPU processing time
  • GPU detiling time
  • Bytes copied and uploaded
  • Memory allocations
  • p50 / p95 / p99 latency

Also compare the resulting texture data byte-for-byte against the existing full-refresh implementation.

🎮 In-game validation

If the synthetic benchmarks look promising, compare both implementations in the same gameplay scenarios.

Track:

  • Average FPS
  • 1% lows
  • Frame-time spikes
  • CPU texture-refresh time
  • GPU utilization
  • Texture streaming delays

The biggest potential benefit is reduced CPU overhead and fewer streaming-related stutters. Average FPS gains are not guaranteed, particularly when GPU-bound.

✅ Acceptance criteria

  • Correct texture output with no missing or stale updates.
  • Measurable improvement for sparse texture modifications.
  • No significant regression for dense updates.
  • Safe fallback for unsupported layouts and uncertain memory writes.
  • Demonstrable improvement in actual gameplay before enabling it by default.

🎯 Initial scope

Start with investigation, instrumentation and a standalone benchmark.

No need to introduce Merkle trees, replace the existing hash algorithm or redesign memory tracking.

The goal is simple:

Stop processing and uploading megabytes of texture data when only a few kilobytes actually changed.

If the measurements justify it, implement selective refresh incrementally, starting with the simplest supported texture layouts.

Are you working on a fix?

No

**@⁠AwkGrep256** on GitHub · 2026-11-29 21:09 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3266) # 🚀 [Performance] Selective texture refresh using dirty-page tracking ## 💡 The idea Currently, when a texture changes, VIctory can end up copying, detiling and uploading the **entire texture**, even if only a tiny portion of its memory was modified. We already have dirty-page tracking in `watch.rs`, so why not use that information to update only the parts that actually changed? For example: - Texture size: 64 MiB - Modified data: 256 KiB - Unchanged data: 63.75 MiB Instead of processing all 64 MiB, ideally we should only process the affected regions. ## 🔍 Where this happens Relevant files: | File | Purpose | |---|---| | `crates/victory-gpu/src/watch.rs` | Tracks memory writes at 4 KiB granularity | | `crates/victory-gpu/src/texture.rs` | Texture refresh, copying and detiling | | `crates/victory-gpu/src/gpudetile.rs` | GPU-assisted detiling | | `docs/unified-memory-audit.md` | Existing performance measurements | In particular, `Staging::refresh_timed()` in `texture.rs` detects changes, but the current refresh path can still process the entire texture. The interesting part is that `watch.rs` already has more detailed information about which memory portions were modified (`parts_written`). We're potentially not using all the information we already collect. ## ⚙️ Proposed approach Instead of refreshing the entire texture: 1. 🔎 Identify changed 4 KiB memory regions using existing dirty-page tracking. 2. 🧮 Translate changed memory addresses into affected texture regions. 3. 🎨 Detile only the affected regions. 4. 📦 Preserve unchanged staging-buffer contents. 5. 🚀 Upload only the affected regions using partial D3D12 texture copies. ### Current vs proposed | | Current | Proposed | |---|---|---| | Memory read | Entire texture | Changed regions | | Detiling | Entire texture | Affected regions | | GPU upload | Entire subresource | Affected regions | | Unchanged data | Processed again | Reused | ### 📊 Potential data reduction $$ \boxed{ \text{Savings} = \left(1-\frac{\text{Changed Bytes}}{\text{Total Texture Size}}\right) \times 100\% } $$ > 🚀 **Example:** If only 4% of a texture changes, we could potentially avoid processing **96% of its data**. This is an idealized estimate, not a guaranteed performance improvement. ## ⚠️ Things to investigate This isn't as simple as copying a few dirty pages. We need to account for: - Console texture tiling and address translation. - BC1 / BC7 compressed formats and RGBA. - Mipmaps and array slices. - Compression-block alignment. - Multiple memory views and alias writes. - Partial GPU uploads and staging-buffer preservation. A 4 KiB dirty memory page doesn't necessarily correspond to one contiguous rectangle in the final texture. Unsupported or dense updates should fall back to the existing full-refresh path. ## 📊 Benchmark plan Before implementing the optimization, let's establish whether it's actually worthwhile. We should be able to benchmark most of this without launching a game. | Parameter | Test cases | |---|---| | Texture sizes | 1, 4, 16, 64 MiB | | Formats | BC1, BC7, RGBA | | Dirty data | 1%, 4%, 16%, 50%, 100% | | Write patterns | Random and clustered | Measure: - CPU processing time - GPU detiling time - Bytes copied and uploaded - Memory allocations - p50 / p95 / p99 latency Also compare the resulting texture data byte-for-byte against the existing full-refresh implementation. ### 🎮 In-game validation If the synthetic benchmarks look promising, compare both implementations in the same gameplay scenarios. Track: - Average FPS - 1% lows - Frame-time spikes - CPU texture-refresh time - GPU utilization - Texture streaming delays The biggest potential benefit is reduced CPU overhead and fewer streaming-related stutters. Average FPS gains are not guaranteed, particularly when GPU-bound. ## ✅ Acceptance criteria - Correct texture output with no missing or stale updates. - Measurable improvement for sparse texture modifications. - No significant regression for dense updates. - Safe fallback for unsupported layouts and uncertain memory writes. - Demonstrable improvement in actual gameplay before enabling it by default. ## 🎯 Initial scope Start with investigation, instrumentation and a standalone benchmark. No need to introduce Merkle trees, replace the existing hash algorithm or redesign memory tracking. The goal is simple: **Stop processing and uploading megabytes of texture data when only a few kilobytes actually changed.** If the measurements justify it, implement selective refresh incrementally, starting with the simplest supported texture layouts. ### Are you working on a fix? No
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 21:10:06 +00:00
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-29 21:09 UTC · original

Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

**@⁠github-actions[bot]** on GitHub · 2026-11-29 21:09 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3266#issuecomment-7262654709) Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
Author
Owner

@⁠AJNXKJ on GitHub · 2026-11-30 05:52 UTC · original

Real-world numbers for this proposal, from a card that is not the bottleneck.

Environment: RTX 5090 Laptop 24,463 MiB, driver 621.24, Windows 11 26200, build v2026.11.29.05 (release), Series X, 2560x1440 output with DLSS Performance (1280x720 scene), frame generation 4x. Pipeline library pre-warmed, so no pipeline is built during the run.

Steady play in the city (draws/frame 9,096 median):

frame       61 ms median
preparing   40-50 ms
copies      26 ms / 73 MB per frame   (p90 37 ms / 103 MB)
textures     2-4 ms / 30-40 MB
on the GPU   1.2 ms median            (p90 4.1 ms)

The card has 60 ms of idle time a frame, so this frame is CPU-side: the
submitting thread plus those copies. If a texture refresh only touched the
dirty pages instead of the whole texture, copies is the number that should
move, and it is also the number that decides whether this frame gets faster
at all on this machine.

Light scenes for contrast (on the water, draws/frame ~4,000): copies drop to
roughly half and the frame goes to about 25 fps, which matches the copies
scaling with what changed rather than with the card.

Happy to run an A/B on any build that implements this and report the same
figures (median of ten-second lines, same save, same area).

**@⁠AJNXKJ** on GitHub · 2026-11-30 05:52 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3266#issuecomment-7270091773) **Real-world numbers for this proposal, from a card that is not the bottleneck.** Environment: RTX 5090 Laptop 24,463 MiB, driver 621.24, Windows 11 26200, build v2026.11.29.05 (release), Series X, 2560x1440 output with DLSS Performance (1280x720 scene), frame generation 4x. Pipeline library pre-warmed, so no pipeline is built during the run. Steady play in the city (draws/frame 9,096 median): ``` frame 61 ms median preparing 40-50 ms copies 26 ms / 73 MB per frame (p90 37 ms / 103 MB) textures 2-4 ms / 30-40 MB on the GPU 1.2 ms median (p90 4.1 ms) ``` The card has 60 ms of idle time a frame, so this frame is CPU-side: the submitting thread plus those copies. If a texture refresh only touched the dirty pages instead of the whole texture, `copies` is the number that should move, and it is also the number that decides whether this frame gets faster at all on this machine. Light scenes for contrast (on the water, draws/frame ~4,000): copies drop to roughly half and the frame goes to about 25 fps, which matches the copies scaling with what changed rather than with the card. Happy to run an A/B on any build that implements this and report the same figures (median of ten-second lines, same save, same area).
Author
Owner

@⁠AJNXKJ on GitHub · 2026-11-30 09:00 UTC · original

Follow-up: the same machine in a light scene, plus the scaling that seems to matter here.

Disclosure: this comment was written by an AI assistant from the play logs, at the reporter's
instruction. Every number below is measured on the hardware, not estimated; the raw logs are
available if anyone wants them.

Same RTX 5090 Laptop, same build (v2026.11.29.05), same save, two areas:

Scene draws/frame copies frame fps on the GPU
city street 9,096 (median) 26 ms / 73 MB 61 ms 15 1.2 ms
on the water ~4,000 ~half ~40 ms ~25 ~1 ms

So copies tracks the volume of what changed, roughly linearly, while the card keeps
60 ms of idle time in the heavy scene. That is the argument for this proposal: if a
refresh only covered the dirty pages, the heavy row is where the frame would move,
and the light row would barely change.

Two more observations that may be useful:

  1. Throughput. 73 MB in 26 ms is about 2.8 GB/s on this machine. The RTX 5080 entry
    in docs/findings.md reports 37 MB in 10 ms, about 3.7 GB/s. Same order, so the gap
    between the two machines is the volume and the single-thread cost, not a pathological
    slowdown on the laptop.

  2. Aliasing is related but separate. Turning VICTORY_ALIAS_TARGETS=0 on this machine
    costs almost nothing in fps (15.1 against 14.1 median) but raises on the GPU from
    1.2 ms to 6.7 ms, and the run later died on a host command list (reported in #1976).
    Whatever the dirty-page path does, it probably has to stay correct with alias targets
    left on.

I will keep posting the same figures for any build that changes the copy path, as long as
it helps.

**@⁠AJNXKJ** on GitHub · 2026-11-30 09:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3266#issuecomment-7273613070) **Follow-up: the same machine in a light scene, plus the scaling that seems to matter here.** > Disclosure: this comment was written by an AI assistant from the play logs, at the reporter's > instruction. Every number below is measured on the hardware, not estimated; the raw logs are > available if anyone wants them. Same RTX 5090 Laptop, same build (v2026.11.29.05), same save, two areas: | Scene | draws/frame | copies | frame | fps | on the GPU | |---|---|---|---|---|---| | city street | 9,096 (median) | 26 ms / 73 MB | 61 ms | 15 | 1.2 ms | | on the water | ~4,000 | ~half | ~40 ms | ~25 | ~1 ms | So `copies` tracks the volume of what changed, roughly linearly, while the card keeps 60 ms of idle time in the heavy scene. That is the argument for this proposal: if a refresh only covered the dirty pages, the heavy row is where the frame would move, and the light row would barely change. Two more observations that may be useful: 1. **Throughput.** 73 MB in 26 ms is about 2.8 GB/s on this machine. The RTX 5080 entry in `docs/findings.md` reports 37 MB in 10 ms, about 3.7 GB/s. Same order, so the gap between the two machines is the volume and the single-thread cost, not a pathological slowdown on the laptop. 2. **Aliasing is related but separate.** Turning `VICTORY_ALIAS_TARGETS=0` on this machine costs almost nothing in fps (15.1 against 14.1 median) but raises `on the GPU` from 1.2 ms to 6.7 ms, and the run later died on a host command list (reported in #1976). Whatever the dirty-page path does, it probably has to stay correct with alias targets left on. I will keep posting the same figures for any build that changes the copy path, as long as it helps.
Author
Owner

@⁠AJNXKJ on GitHub · 2026-11-30 09:03 UTC · original

RTX 5090 Laptop — a measured profile, and the two defects found on the way.

Disclosure: written by an AI assistant from the play logs, at the reporter's instruction.
Every figure is measured on the hardware, not estimated. Chinese and Russian versions of
this report exist; ask and I will post them.

Environment: RTX 5090 Laptop 24,463 MiB, driver 621.24; Core Ultra 9 290HX Plus / 128 GB;
Windows 11 26200; build v2026.11.29.05 (release); GTA VI Xbox 1.0.2.1, Series X;
2560x1440 output, DLSS Performance (1280x720 scene), frame generation 4x;
VICTORY_NAN_SCRUB=1 only; pipeline library pre-warmed, nothing built during play.

Heavy scene (street) Median p10 / p90
fps 19.4 14.5 / 26.8
copies 18.9 ms p90 25.8 ms
draws/frame 9,096 9,895
v2026.11.29.05 only (175 samples, 14 min) Median
fps 15.1
copies 26.8 ms / 72 MB
on the GPU 1.2 ms (p90 4.1)
frames dropped 0

Light scene (on the water): about 25 fps with roughly half the copy volume.

The point: 60 ms of idle card per frame in the heavy scene. preparing is 40-50 ms,
copies 20-27 ms for 65-80 MB, about 2.8 GB/s. The RTX 5080 entry in docs/findings.md
reports 37 MB in 10 ms (3.7 GB/s) on a scene of comparable shape, so the difference here is
volume plus single-thread cost, not a pathological slowdown on the laptop.
Lowering the picture or the internal resolution changes nothing measurable, as that file says.

Two defects found

  1. Blue foliage at night near water (#1976), present with frame generation off.
  2. With VICTORY_ALIAS_TARGETS=0 the run died during a jetski stunt:
    a host command list did not close (0x80070057 E_INVALIDARG) -> host GPU failure.
    Two sessions without the switch, same binary and save, had no crash. Log in #1976.

Reproduce

set VICTORY_CACHE_DIR=<cache outside the repo>
set VICTORY_DATA_DIR=<data outside the repo>
set VICTORY_NAN_SCRUB=1
victory.exe play <game folder> --console series-x

If a build changes the copy path, I will run the same profile and post the same table.

**@⁠AJNXKJ** on GitHub · 2026-11-30 09:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3266#issuecomment-7273682678) **RTX 5090 Laptop — a measured profile, and the two defects found on the way.** > Disclosure: written by an AI assistant from the play logs, at the reporter's instruction. > Every figure is measured on the hardware, not estimated. Chinese and Russian versions of > this report exist; ask and I will post them. **Environment**: RTX 5090 Laptop 24,463 MiB, driver 621.24; Core Ultra 9 290HX Plus / 128 GB; Windows 11 26200; build v2026.11.29.05 (release); GTA VI Xbox 1.0.2.1, Series X; 2560x1440 output, DLSS Performance (1280x720 scene), frame generation 4x; `VICTORY_NAN_SCRUB=1` only; pipeline library pre-warmed, nothing built during play. | Heavy scene (street) | Median | p10 / p90 | |---|---|---| | fps | 19.4 | 14.5 / 26.8 | | copies | 18.9 ms | p90 25.8 ms | | draws/frame | 9,096 | 9,895 | | v2026.11.29.05 only (175 samples, 14 min) | Median | |---|---| | fps | 15.1 | | copies | 26.8 ms / 72 MB | | on the GPU | 1.2 ms (p90 4.1) | | frames dropped | 0 | Light scene (on the water): about 25 fps with roughly half the copy volume. **The point**: 60 ms of idle card per frame in the heavy scene. `preparing` is 40-50 ms, `copies` 20-27 ms for 65-80 MB, about 2.8 GB/s. The RTX 5080 entry in `docs/findings.md` reports 37 MB in 10 ms (3.7 GB/s) on a scene of comparable shape, so the difference here is volume plus single-thread cost, not a pathological slowdown on the laptop. Lowering the picture or the internal resolution changes nothing measurable, as that file says. **Two defects found** 1. Blue foliage at night near water (#1976), present with frame generation off. 2. With `VICTORY_ALIAS_TARGETS=0` the run died during a jetski stunt: `a host command list did not close (0x80070057 E_INVALIDARG)` -> `host GPU failure`. Two sessions without the switch, same binary and save, had no crash. Log in #1976. **Reproduce** ``` set VICTORY_CACHE_DIR=<cache outside the repo> set VICTORY_DATA_DIR=<data outside the repo> set VICTORY_NAN_SCRUB=1 victory.exe play <game folder> --console series-x ``` If a build changes the copy path, I will run the same profile and post the same table.
Author
Owner

@⁠AwkGrep256 on GitHub · 2026-11-30 12:32 UTC · original

Real-world numbers for this proposal, from a card that is not the bottleneck.

Environment: RTX 5090 Laptop 24,463 MiB, driver 621.24, Windows 11 26200, build v2026.11.29.05 (release), Series X, 2560x1440 output with DLSS Performance (1280x720 scene), frame generation 4x. Pipeline library pre-warmed, so no pipeline is built during the run.

Steady play in the city (draws/frame 9,096 median):

frame       61 ms median
preparing   40-50 ms
copies      26 ms / 73 MB per frame   (p90 37 ms / 103 MB)
textures     2-4 ms / 30-40 MB
on the GPU   1.2 ms median            (p90 4.1 ms)

The card has 60 ms of idle time a frame, so this frame is CPU-side: the submitting thread plus those copies. If a texture refresh only touched the dirty pages instead of the whole texture, copies is the number that should move, and it is also the number that decides whether this frame gets faster at all on this machine.

Light scenes for contrast (on the water, draws/frame ~4,000): copies drop to roughly half and the frame goes to about 25 fps, which matches the copies scaling with what changed rather than with the card.

Happy to run an A/B on any build that implements this and report the same figures (median of ten-second lines, same save, same area).

Thanks, this confirms the game is CPU and copy-bound in the heavy scene. Texture work is about 2–4 ms inside 20–27 ms of total copying, so selective texture refresh is a good first target but will not remove all copy time.

Could we split the remaining copy time into textures, buffers, readbacks, descriptors, staging, and waits?

For the A/B test, please keep alias targets enabled and compare total copy time, texture copy time, copied bytes, p95/p99 frame time, and 1% lows using the same save and scene.

If dirty pages are usually sparse, we can copy only changed texture regions and fall back to the existing full copy when many pages changed.

**@⁠AwkGrep256** on GitHub · 2026-11-30 12:32 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3266#issuecomment-7278592874) > **Real-world numbers for this proposal, from a card that is not the bottleneck.** > > Environment: RTX 5090 Laptop 24,463 MiB, driver 621.24, Windows 11 26200, build v2026.11.29.05 (release), Series X, 2560x1440 output with DLSS Performance (1280x720 scene), frame generation 4x. Pipeline library pre-warmed, so no pipeline is built during the run. > > Steady play in the city (draws/frame 9,096 median): > > ``` > frame 61 ms median > preparing 40-50 ms > copies 26 ms / 73 MB per frame (p90 37 ms / 103 MB) > textures 2-4 ms / 30-40 MB > on the GPU 1.2 ms median (p90 4.1 ms) > ``` > > The card has 60 ms of idle time a frame, so this frame is CPU-side: the submitting thread plus those copies. If a texture refresh only touched the dirty pages instead of the whole texture, `copies` is the number that should move, and it is also the number that decides whether this frame gets faster at all on this machine. > > Light scenes for contrast (on the water, draws/frame ~4,000): copies drop to roughly half and the frame goes to about 25 fps, which matches the copies scaling with what changed rather than with the card. > > Happy to run an A/B on any build that implements this and report the same figures (median of ten-second lines, same save, same area). Thanks, this confirms the game is CPU and copy-bound in the heavy scene. Texture work is about 2–4 ms inside 20–27 ms of total copying, so selective texture refresh is a good first target but will not remove all copy time. Could we split the remaining copy time into textures, buffers, readbacks, descriptors, staging, and waits? For the A/B test, please keep alias targets enabled and compare total copy time, texture copy time, copied bytes, p95/p99 frame time, and 1% lows using the same save and scene. If dirty pages are usually sparse, we can copy only changed texture regions and fall back to the existing full copy when many pages changed.
Author
Owner

@⁠AJNXKJ on GitHub · 2026-11-30 12:37 UTC · original

Bucket split from the same session, as far as the default log line lets me go.

Disclosure: written by an AI assistant from the play logs, at the reporter's instruction.
All figures measured; 110 ten-second samples over 14 minutes, mixed scenes, medians.

Bucket (from the frame line) median p90
preparing (whole) 54.8 ms 70.7 ms
copies (buffers) 25.9 ms / 72 MB 37.2 ms / 103 MB
textures 2.8 ms / 33 MB 4.5 ms
heap buffers passes 2.5 ms 9.4 ms
copying back 0.0 ms 0.0 ms

Frame time over the same samples: median 70.5 ms, p95 91.3 ms, p99 133.2 ms,
1% low 7.5 fps, max 723 ms (that one is a load, not gameplay).

So of the 54.8 ms of preparing, about 31 ms is named by the buckets above and
about 24 ms is not attributed by the default line — which is presumably the
descriptors, staging and waits you are asking about. copying back is 0 here
because this run used the default relay settings; I can turn the copy-back path on
if you want readbacks in the table.

Question: is VICTORY_PROFILE=<from>,<to>,<ms>,<file> sampling the intended way
to attribute those 24 ms, or is there a diagnostics build that prints named buckets
(descriptors / staging / waits) per frame? I would rather report your buckets than
my guesses.

A/B protocol accepted exactly as you wrote it: alias targets left on, same save
and same scene, and I will report total copy time, texture copy time, copied bytes,
p95/p99 frame time and 1% low. Tell me which build to download when it exists.

**@⁠AJNXKJ** on GitHub · 2026-11-30 12:37 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3266#issuecomment-7278700785) **Bucket split from the same session, as far as the default log line lets me go.** > Disclosure: written by an AI assistant from the play logs, at the reporter's instruction. > All figures measured; 110 ten-second samples over 14 minutes, mixed scenes, medians. | Bucket (from the frame line) | median | p90 | |---|---|---| | `preparing` (whole) | 54.8 ms | 70.7 ms | | `copies` (buffers) | 25.9 ms / 72 MB | 37.2 ms / 103 MB | | `textures` | 2.8 ms / 33 MB | 4.5 ms | | `heap buffers` passes | 2.5 ms | 9.4 ms | | `copying back` | 0.0 ms | 0.0 ms | Frame time over the same samples: median 70.5 ms, p95 91.3 ms, p99 133.2 ms, 1% low 7.5 fps, max 723 ms (that one is a load, not gameplay). So of the 54.8 ms of `preparing`, about 31 ms is named by the buckets above and **about 24 ms is not attributed** by the default line — which is presumably the descriptors, staging and waits you are asking about. `copying back` is 0 here because this run used the default relay settings; I can turn the copy-back path on if you want readbacks in the table. **Question:** is `VICTORY_PROFILE=<from>,<to>,<ms>,<file>` sampling the intended way to attribute those 24 ms, or is there a diagnostics build that prints named buckets (descriptors / staging / waits) per frame? I would rather report your buckets than my guesses. **A/B protocol accepted** exactly as you wrote it: alias targets left **on**, same save and same scene, and I will report total copy time, texture copy time, copied bytes, p95/p99 frame time and 1% low. Tell me which build to download when it exists.
Author
Owner

@⁠AwkGrep256 on GitHub · 2026-11-30 12:59 UTC · original

Bucket split from the same session, as far as the default log line lets me go.

Disclosure: written by an AI assistant from the play logs, at the reporter's instruction.
All figures measured; 110 ten-second samples over 14 minutes, mixed scenes, medians.

Bucket (from the frame line) median p90
preparing (whole) 54.8 ms 70.7 ms
copies (buffers) 25.9 ms / 72 MB 37.2 ms / 103 MB
textures 2.8 ms / 33 MB 4.5 ms
heap buffers passes 2.5 ms 9.4 ms
copying back 0.0 ms 0.0 ms

Frame time over the same samples: median 70.5 ms, p95 91.3 ms, p99 133.2 ms, 1% low 7.5 fps, max 723 ms (that one is a load, not gameplay).

So of the 54.8 ms of preparing, about 31 ms is named by the buckets above and about 24 ms is not attributed by the default line — which is presumably the descriptors, staging and waits you are asking about. copying back is 0 here because this run used the default relay settings; I can turn the copy-back path on if you want readbacks in the table.

Question: is VICTORY_PROFILE=<from>,<to>,<ms>,<file> sampling the intended way to attribute those 24 ms, or is there a diagnostics build that prints named buckets (descriptors / staging / waits) per frame? I would rather report your buckets than my guesses.

A/B protocol accepted exactly as you wrote it: alias targets left on, same save and same scene, and I will report total copy time, texture copy time, copied bytes, p95/p99 frame time and 1% low. Tell me which build to download when it exists.

This bucket split is exactly what we needed. The 2.8 ms texture cost confirms that selective texture refresh is worthwhile, but the larger opportunity is the remaining buffer, descriptor, staging, and wait time.

VICTORY_PROFILE looks appropriate for finding the missing CPU time because it samples call stacks by phase.

Please run it during the same heavy scene with alias targets left enabled. The profile output should tell us whether the missing time is mainly descriptor setup, staging allocation, range planning, or waits.

The current main branch also has GPU detiling, copy queues, GPU upload heaps, parallel copy workers, and an opt-in prelude upload path.

I think the first A/B should test the existing prelude upload path, then selective texture detiling, while measuring total copies separately from texture copies.

The important measurements are total frame time, p95, p99, 1% low, texture milliseconds, buffer-copy milliseconds, copied bytes, and the number of upload ranges.

**@⁠AwkGrep256** on GitHub · 2026-11-30 12:59 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3266#issuecomment-7279204904) > **Bucket split from the same session, as far as the default log line lets me go.** > > > Disclosure: written by an AI assistant from the play logs, at the reporter's instruction. > > All figures measured; 110 ten-second samples over 14 minutes, mixed scenes, medians. > > Bucket (from the frame line) median p90 > `preparing` (whole) 54.8 ms 70.7 ms > `copies` (buffers) 25.9 ms / 72 MB 37.2 ms / 103 MB > `textures` 2.8 ms / 33 MB 4.5 ms > `heap buffers` passes 2.5 ms 9.4 ms > `copying back` 0.0 ms 0.0 ms > > Frame time over the same samples: median 70.5 ms, p95 91.3 ms, p99 133.2 ms, 1% low 7.5 fps, max 723 ms (that one is a load, not gameplay). > > So of the 54.8 ms of `preparing`, about 31 ms is named by the buckets above and **about 24 ms is not attributed** by the default line — which is presumably the descriptors, staging and waits you are asking about. `copying back` is 0 here because this run used the default relay settings; I can turn the copy-back path on if you want readbacks in the table. > > **Question:** is `VICTORY_PROFILE=<from>,<to>,<ms>,<file>` sampling the intended way to attribute those 24 ms, or is there a diagnostics build that prints named buckets (descriptors / staging / waits) per frame? I would rather report your buckets than my guesses. > > **A/B protocol accepted** exactly as you wrote it: alias targets left **on**, same save and same scene, and I will report total copy time, texture copy time, copied bytes, p95/p99 frame time and 1% low. Tell me which build to download when it exists. This bucket split is exactly what we needed. The 2.8 ms texture cost confirms that selective texture refresh is worthwhile, but the larger opportunity is the remaining buffer, descriptor, staging, and wait time. VICTORY_PROFILE looks appropriate for finding the missing CPU time because it samples call stacks by phase. Please run it during the same heavy scene with alias targets left enabled. The profile output should tell us whether the missing time is mainly descriptor setup, staging allocation, range planning, or waits. The current main branch also has GPU detiling, copy queues, GPU upload heaps, parallel copy workers, and an opt-in prelude upload path. I think the first A/B should test the existing prelude upload path, then selective texture detiling, while measuring total copies separately from texture copies. The important measurements are total frame time, p95, p99, 1% low, texture milliseconds, buffer-copy milliseconds, copied bytes, and the number of upload ranges.
Author
Owner

@⁠AJNXKJ on GitHub · 2026-12-01 02:04 UTC · original

A/B of the prelude upload path, as you asked — same build, same save, same area.

Disclosure: written by an AI assistant from the play logs, at the reporter's instruction.
All figures measured. Load frames (texture upload above 100 MB) and menu frames
(below 10 ms) are excluded from both sides.

Build v2026.11.30.03, RTX 5090 Laptop 24 GB / driver 621.24, Series X,
2560x1440 with DLSS Performance and frame generation 4x, borderless fullscreen,
pipeline library pre-warmed (14,972 pipelines), alias targets left at their default.

A: default B: VICTORY_PRELUDE_UPLOADS=1
samples (5 s lines) 53 102
fps median 17.8 17.5
fps p10 2.5 12.1
frame median 55.4 ms 57.0 ms
frame p95 457 ms 90 ms
frame p99 737 ms 344 ms
1% low 1.4 fps 2.9 fps
buffer copies 21.7 ms / 60 MB 22.3 ms / 72 MB
textures 1.7 ms 2.5 ms

Reading: the average is unchanged (17.8 against 17.5, inside the noise), the copy
volume grows a little (+12 MB a frame), and the tail collapses: p95 457 -> 90 ms,
p99 737 -> 344 ms, 1% low 1.4 -> 2.9 fps.
The player's own words mid-A/B were that it
"feels good once it settles". So on this machine the prelude path is a latency fix
rather than a throughput fix, which fits your point that texture work is only 1.7-2.5 ms
of the copy time.

What I could not measure: the number of upload ranges. The default frame line does
not print it here, and I did not want to guess — which switch or counter names it, so I
can add it to the next table? (I also have not run VICTORY_PROFILE yet; it needs the
heavy scene and I wanted your answer on the buckets first.)

Caveat: A ran 7 minutes and B 10 minutes, from the same save in the same street.
I can repeat either side longer if the sample count matters to you.

**@⁠AJNXKJ** on GitHub · 2026-12-01 02:04 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3266#issuecomment-7298208098) **A/B of the prelude upload path, as you asked — same build, same save, same area.** > Disclosure: written by an AI assistant from the play logs, at the reporter's instruction. > All figures measured. Load frames (texture upload above 100 MB) and menu frames > (below 10 ms) are excluded from both sides. **Build** v2026.11.30.03, RTX 5090 Laptop 24 GB / driver 621.24, Series X, 2560x1440 with DLSS Performance and frame generation 4x, borderless fullscreen, pipeline library pre-warmed (14,972 pipelines), alias targets **left at their default**. | | A: default | B: `VICTORY_PRELUDE_UPLOADS=1` | |---|---|---| | samples (5 s lines) | 53 | 102 | | fps median | 17.8 | 17.5 | | fps p10 | **2.5** | **12.1** | | frame median | 55.4 ms | 57.0 ms | | **frame p95** | **457 ms** | **90 ms** | | **frame p99** | **737 ms** | **344 ms** | | **1% low** | **1.4 fps** | **2.9 fps** | | buffer copies | 21.7 ms / 60 MB | 22.3 ms / 72 MB | | textures | 1.7 ms | 2.5 ms | **Reading:** the average is unchanged (17.8 against 17.5, inside the noise), the copy volume grows a little (+12 MB a frame), and **the tail collapses: p95 457 -> 90 ms, p99 737 -> 344 ms, 1% low 1.4 -> 2.9 fps.** The player's own words mid-A/B were that it "feels good once it settles". So on this machine the prelude path is a latency fix rather than a throughput fix, which fits your point that texture work is only 1.7-2.5 ms of the copy time. **What I could not measure:** the number of upload ranges. The default frame line does not print it here, and I did not want to guess — which switch or counter names it, so I can add it to the next table? (I also have not run `VICTORY_PROFILE` yet; it needs the heavy scene and I wanted your answer on the buckets first.) **Caveat:** A ran 7 minutes and B 10 minutes, from the same save in the same street. I can repeat either side longer if the sample count matters to you.
Author
Owner

@⁠AwkGrep256 on GitHub · 2026-12-01 12:37 UTC · original

A/B of the prelude upload path, as you asked — same build, same save, same area.

Disclosure: written by an AI assistant from the play logs, at the reporter's instruction.
All figures measured. Load frames (texture upload above 100 MB) and menu frames
(below 10 ms) are excluded from both sides.

Build v2026.11.30.03, RTX 5090 Laptop 24 GB / driver 621.24, Series X, 2560x1440 with DLSS Performance and frame generation 4x, borderless fullscreen, pipeline library pre-warmed (14,972 pipelines), alias targets left at their default.
A: default B: VICTORY_PRELUDE_UPLOADS=1
samples (5 s lines) 53 102
fps median 17.8 17.5
fps p10 2.5 12.1
frame median 55.4 ms 57.0 ms
frame p95 457 ms 90 ms
frame p99 737 ms 344 ms
1% low 1.4 fps 2.9 fps
buffer copies 21.7 ms / 60 MB 22.3 ms / 72 MB
textures 1.7 ms 2.5 ms

Reading: the average is unchanged (17.8 against 17.5, inside the noise), the copy volume grows a little (+12 MB a frame), and the tail collapses: p95 457 -> 90 ms, p99 737 -> 344 ms, 1% low 1.4 -> 2.9 fps. The player's own words mid-A/B were that it "feels good once it settles". So on this machine the prelude path is a latency fix rather than a throughput fix, which fits your point that texture work is only 1.7-2.5 ms of the copy time.

What I could not measure: the number of upload ranges. The default frame line does not print it here, and I did not want to guess — which switch or counter names it, so I can add it to the next table? (I also have not run VICTORY_PROFILE yet; it needs the heavy scene and I wanted your answer on the buckets first.)

Caveat: A ran 7 minutes and B 10 minutes, from the same save in the same street. I can repeat either side longer if the sample count matters to you.

This is excellent. The prelude path clearly improves frame-time consistency even though average FPS is unchanged. The 1% low roughly doubled, and the p95/p99 spikes dropped dramatically.

Please repeat the A/B with equal sample counts and alternating order so we can confirm the result. Keep alias targets at their default.

For the next run, please also use VICTORY_PROFILE during the heavy scene.

The next target is the remaining roughly 20 ms of buffer, descriptor, staging, and wait work. The texture-only optimization is still worthwhile, but this result shows that upload scheduling and synchronization are probably the largest source of 1% lows.

Please record upload-range count if possible. That will tell us whether range merging and selective texture uploads can reduce the remaining copy overhead.

**@⁠AwkGrep256** on GitHub · 2026-12-01 12:37 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3266#issuecomment-7311410016) > **A/B of the prelude upload path, as you asked — same build, same save, same area.** > > > Disclosure: written by an AI assistant from the play logs, at the reporter's instruction. > > All figures measured. Load frames (texture upload above 100 MB) and menu frames > > (below 10 ms) are excluded from both sides. > > **Build** v2026.11.30.03, RTX 5090 Laptop 24 GB / driver 621.24, Series X, 2560x1440 with DLSS Performance and frame generation 4x, borderless fullscreen, pipeline library pre-warmed (14,972 pipelines), alias targets **left at their default**. > A: default B: `VICTORY_PRELUDE_UPLOADS=1` > samples (5 s lines) 53 102 > fps median 17.8 17.5 > fps p10 **2.5** **12.1** > frame median 55.4 ms 57.0 ms > **frame p95** **457 ms** **90 ms** > **frame p99** **737 ms** **344 ms** > **1% low** **1.4 fps** **2.9 fps** > buffer copies 21.7 ms / 60 MB 22.3 ms / 72 MB > textures 1.7 ms 2.5 ms > > **Reading:** the average is unchanged (17.8 against 17.5, inside the noise), the copy volume grows a little (+12 MB a frame), and **the tail collapses: p95 457 -> 90 ms, p99 737 -> 344 ms, 1% low 1.4 -> 2.9 fps.** The player's own words mid-A/B were that it "feels good once it settles". So on this machine the prelude path is a latency fix rather than a throughput fix, which fits your point that texture work is only 1.7-2.5 ms of the copy time. > > **What I could not measure:** the number of upload ranges. The default frame line does not print it here, and I did not want to guess — which switch or counter names it, so I can add it to the next table? (I also have not run `VICTORY_PROFILE` yet; it needs the heavy scene and I wanted your answer on the buckets first.) > > **Caveat:** A ran 7 minutes and B 10 minutes, from the same save in the same street. I can repeat either side longer if the sample count matters to you. This is excellent. The prelude path clearly improves frame-time consistency even though average FPS is unchanged. The 1% low roughly doubled, and the p95/p99 spikes dropped dramatically. Please repeat the A/B with equal sample counts and alternating order so we can confirm the result. Keep alias targets at their default. For the next run, please also use VICTORY_PROFILE during the heavy scene. The next target is the remaining roughly 20 ms of buffer, descriptor, staging, and wait work. The texture-only optimization is still worthwhile, but this result shows that upload scheduling and synchronization are probably the largest source of 1% lows. Please record upload-range count if possible. That will tell us whether range merging and selective texture uploads can reduce the remaining copy overhead.
Author
Owner

@⁠AJNXKJ on GitHub · 2026-12-01 13:16 UTC · original

Thank you — and I have to take the A/B back: both sides had the switch on.

Written with the help of an AI assistant, at the reporter's instruction.

The README now documents VICTORY_PRELUDE_UPLOADS as defaulting to 1 in victory.exe, and the
A-side log confirms it: that run never set the variable, yet it carries nine
prelude upload left out lines. So what I compared was on against on, and the tail
difference I reported (p95 457 -> 90 ms) is session variance, not the switch. The same
applies to my "copy volume +12 MB" reading.

That was my error, not yours; I should have checked the default before designing the run.

Proper A/B, ready to run

A B
setting VICTORY_PRELUDE_UPLOADS=0 default (1)
length 10 min of play 10 min of play
order A, B, A, B (alternating, to cancel drift) same
area same save, same street, same route each side same
other switches alias targets at default same

One variable I have now removed: the pipeline library is freshly and fully built
(15,603 pipelines, 1.38 GB, preload --all), so no pipeline is being made during either
side, and no shader translation happens mid-run.

On VICTORY_PROFILE

I will run it on the heavy scene. One caveat from today: the profile is written at the
end of a run, and this build crashes in the dense city (issue #4733, host command list did not close). A crash loses the whole profile. So I will keep the profile
sessions to 10 minutes and exit them cleanly; if one dies, I will say so rather than
hand you an empty file.

On upload ranges

I cannot find a per-frame count of destination ranges in the default line — it gives
only copies <ms> <MB>. Do you mean the written-memory ranges (VICTORY_AHEAD_GAP_KB,
8 MB default, ranges closer than that asked about as one), or a count of the dst-copy
ranges themselves? If it is the second, tell me which counter or build names it and I
will add it to the table.

Agreed on the priority: with textures at 1.7-2.5 ms of a 22 ms copy, the remaining ~20 ms
of buffer, descriptor, staging and wait work is where the 1% low lives.

**@⁠AJNXKJ** on GitHub · 2026-12-01 13:16 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3266#issuecomment-7312374636) **Thank you — and I have to take the A/B back: both sides had the switch on.** > Written with the help of an AI assistant, at the reporter's instruction. The README now documents `VICTORY_PRELUDE_UPLOADS` as **defaulting to 1 in victory.exe**, and the A-side log confirms it: that run never set the variable, yet it carries nine `prelude upload left out` lines. So what I compared was **on against on**, and the tail difference I reported (p95 457 -> 90 ms) is session variance, not the switch. The same applies to my "copy volume +12 MB" reading. That was my error, not yours; I should have checked the default before designing the run. ## Proper A/B, ready to run | | A | B | |---|---|---| | setting | `VICTORY_PRELUDE_UPLOADS=0` | default (1) | | length | 10 min of play | 10 min of play | | order | A, B, A, B (alternating, to cancel drift) | same | | area | same save, same street, same route each side | same | | other switches | alias targets at default | same | One variable I have now removed: **the pipeline library is freshly and fully built** (15,603 pipelines, 1.38 GB, `preload --all`), so no pipeline is being made during either side, and no shader translation happens mid-run. ## On `VICTORY_PROFILE` I will run it on the heavy scene. One caveat from today: the profile is written at the **end** of a run, and this build crashes in the dense city (issue #4733, `host command list did not close`). A crash loses the whole profile. So I will keep the profile sessions to 10 minutes and exit them cleanly; if one dies, I will say so rather than hand you an empty file. ## On upload ranges I cannot find a per-frame count of destination ranges in the default line — it gives only `copies <ms> <MB>`. Do you mean the **written-memory ranges** (`VICTORY_AHEAD_GAP_KB`, 8 MB default, ranges closer than that asked about as one), or a count of the dst-copy ranges themselves? If it is the second, tell me which counter or build names it and I will add it to the table. Agreed on the priority: with textures at 1.7-2.5 ms of a 22 ms copy, the remaining ~20 ms of buffer, descriptor, staging and wait work is where the 1% low lives.
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/trustno1-coder--VIctory-NVIDIA#3266
No description provided.