d3d12: fewer hitches in dense city scenes (opt-in submission/copy switches + memory pressure), measured on an RTX 5080 #3380

Code

Clone this repository

Checkout

From your project repository, check out a new branch and test the changes.

git fetch -u  "perf/city-hitches-forgejo:Henriazz11-perf/city-hitches-forgejo"
git switch "Henriazz11-perf/city-hitches-forgejo"
Open
leonida/mandy
Henriazz11 wants to merge 1 commit from Henriazz11/mandy:perf/city-hitches-forgejo into main

This branch is out-of-date with the base branch

Conversation
Reviewers 0 approvals
  • No reviewers
Details
This pull request is blocked because it's outdated.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'perf/city-hitches-forgejo:Henriazz11-perf/city-hitches-forgejo'
git switch 'Henriazz11-perf/city-hitches-forgejo'
First-time contributor

Claimed in the coordination issue as: D3D12-SERIES-X-DLSS-WORLD (claimed on the GitHub coordination issue #2570 before the move here). This is its submission and memory part, split out of GitHub #3039 so that each pull request has one topic; it was open on GitHub as #3374 when the repository was taken down, and is reopened here on the new main unchanged.

What and why

In dense city scenes with -SeriesX -Dlss quality the frame rate drops and the game hitches: the submitting thread spends 30+ ms a frame outside preparing, and the process sits under 1 GB of free RAM with 6+ GB spilled into shared VRAM. This pull request cuts both. Every change is behind its own LEONIDA_* switch, off in code; only scripts/play-nvidia.ps1 turns them on, so leonida.exe alone behaves as on main.

Submission and copy switches (move work off the submitting thread; its time outside preparing goes from 32-38 ms to 19-21 ms a frame):

  • TEXTURE_FAST_QUEUE, COPIES_FILLS_FAST, WATCH_FAST_JOURNAL, FLUSH_FAST_NOOP(_V2);
  • UNIFIED_ALIAS_RANGE / UNIFIED_ALIAS_TRACK;
  • OFF_LINE, COPY_SUBRESOURCE_FIX, COPY_GUARD, ASK_FIRST, SNAP_BESIDE;
  • AHEAD_BUFFERS_ONLY, SEND_SKIP_LAND, UPSCALE_SYNC, PIPELINE_ASYNC_MESH.

Shader waits. The launcher's LEONIDA_PIPELINE_WAIT_MS goes from 10000 to 50. New mesh pipelines were waited for one by one: in a play session, frames up to 6.2 s and 72 frames over 1 s in 11 minutes.

Memory pressure

In the city the process runs with under 1 GB of free RAM and 6+ GB in shared VRAM. Every change is behind its own switch. play-nvidia.ps1 turns on only the ones that measured with no fps cost:

Switch In play-nvidia.ps1 What it does
LEONIDA_MEM_LINE_10S 1 One memory breakdown line every 10 s (shared/dedicated VRAM, pools, windows, textures).
LEONIDA_ALLOCATOR_TRIM 1 Already in main; turned on.
LEONIDA_SMALL_POOL_SPLIT 1 Splits the small shared buffer pool by size class. Holes in it dropped from about 1 GB to 250-290 MB.
LEONIDA_POOL_PACK 1 New allocations go to the fullest block first, so empty blocks can be released.
LEONIDA_WINDOW_REUSE_MB 128 Reuses retired PC-only loose windows.
LEONIDA_SHARED_VRAM_CAP_MB 5120 Above this much shared VRAM, drains empty small, staging and spare-window blocks and evicts idle textures. Textures are evicted only when local VRAM is also at 90 % or more.
LEONIDA_CARD_BUFFERS_SMALL_CAP_PCT 50 Buffers under 64 KiB may take up to this share of LEONIDA_CARD_BUFFERS_MB; the rest stays for large buffers.
LEONIDA_CARD_BUFFERS_REAL_LEN_KB off Opt-in. Its blanket cutoff sent hot small buffers over PCIe (heap buffers 4.3 -> 8.1 ms/frame).
LEONIDA_TAKE_BLOCK_BYTES off Opt-in. Sub-page block diffing in the shadow copies.

Measured in the city (-SeriesX -Dlss quality, LEONIDA_PIPELINE_WAIT_MS=50, log fps). After the world loads, LEONIDA_GAME_ACTIONS_RUN teleports the player into the city at 150 s and 200 s. Only the last 3 minutes of each 5-minute run count; one warm-up, then alternated runs:

Build Run fps median frame frames >100 ms per min frames >1 s longest frame shared VRAM private RAM
switches only 1 14.2 67 ms 57 0 489 ms 6.3 GB 32.7 GB
switches only 2 14.3 68 ms 61 0 292 ms 6.5 GB 33.0 GB
switches + memory 1 14.7 65 ms 25 0 170 ms 5.8 GB 32.2 GB
switches + memory 2 15.5 63 ms 20 0 242 ms 6.0 GB 32.3 GB

About 6 % more fps, a third of the frames over 100 ms, and about 0.5 GB less shared VRAM and private memory. In the starting area (low pressure, 3 runs each) the two are within noise: 13.5 / 13.8 / 12.4 fps without, 13.0 / 13.7 / 12.3 with, same memory.

An earlier version also turned on CARD_BUFFERS_REAL_LEN_KB=64, CARD_RESERVE_BUDGETS=1, CARD_WINDOWS_MB=1024 and a 4096 MB shared cap, and lost about 25 % fps: hot small buffers went to system RAM, unused budget was counted as used VRAM, and the cap sat below the normal shared floor (3.8-4.4 GB) and evicted textures every 1.5 s with 2.5 GB of dedicated VRAM free. Those are off here, and eviction is gated on local VRAM pressure.

Not tested: the player stands still in the city in every run (no fast driving); only one machine (32 GB RAM); these memory runs were on main a917c54d6; the A/B against current main below has everything.

Tested

Against main 3988be8f2 (the same tree as GitHub acb0657e2), #3039 before the split. Same method as above: -SeriesX -Dlss quality -NoFrameGen -NoSmoothMotion -NoPrecompile, LEONIDA_PIPELINE_WAIT_MS=50, each build with its own play-nvidia.ps1, teleport into the city once the world loads, last 120 s measured, builds alternated. Two rounds were run; the first main run of the first round is left out because the title sat in the pause menu while shaders compiled on a cold cache (59.8 fps, 2.9 GB shared VRAM), and the first run of this branch's new build had one 3.2 s frame on the same cold cache.

Build Run fps median frame p99 frames >100 ms per min frames >1 s longest frame shared VRAM private RAM
main 3988be8f2 1 13.2 76 ms 157 ms 83 0 487 ms 6.3 GB 32.8 GB
main 3988be8f2 2 14.0 70 ms 138 ms 63 0 189 ms 6.0 GB 32.8 GB
main 3988be8f2 3 13.9 71 ms 139 ms 66 0 310 ms 6.1 GB 32.8 GB
this branch (cold cache) 0 11.1 74 ms 298 ms 71 2 3212 ms 6.1 GB 32.6 GB
this branch 1 14.7 63 ms 114 ms 37 0 766 ms 6.2 GB 33.1 GB
this branch 2 15.3 62 ms 115 ms 25 0 452 ms 6.1 GB 32.7 GB
this branch 3 15.0 62 ms 191 ms 55 0 898 ms 6.2 GB 32.8 GB

Averages over the warm runs: 15.0 fps against 13.7 (+9.5 %), median frame 62 ms against 72 ms, and 39 frames over 100 ms a minute against 70. Every run of this branch beats every run of main. Memory is the same on both (about 6 GB shared VRAM, 33 GB private). No device loss and no unclosed list.

What #3039 had and this pull request leaves out: LEONIDA_FSR_MODE_FIX (the Series X FidelityFX quality-mode store; main already draws the world with DLSS without it) and the F4 menu item Teleport -> To waypoint. The mode fix was on in the runs above (the waypoint item does nothing unless used); this exact head was not re-run in the title.

On this head (main 0036195a7 + one commit f07c1c87d): the diag build finished. leonida-gpu: 822 passed, 60 ignored (--test-threads=1, with frame::tests::handles::a_failed_wait_still_takes_the_time aborting with 0xc0000008, same on origin/main). leonida-loader: 96 passed, 2 failed (dump_stacks_does_not_panic_when_stderr_pipe_is_closed, profile_writes_file_and_closes_handles_when_stderr_pipe_is_closed with 0xc0000008, same on origin/main). leonida-menu: 48 passed. leonida: 63 + 2 + 2 + 1 + 1 passed. cargo clippy --locked -p leonida-loader -p leonida-gpu -p leonida-menu -p leonida --all-targets --features dlss -- -D warnings: fails on two pre-existing clippy::collapsible_if in leonida-hle/src/modules/xmem.rs (same on origin/main). docs/switches.md is current; tests/test_d3d12_switches.py: 22 tests, OK.

GPUs tested: NVIDIA GeForce RTX 5080 16 GB, driver 616.92, Windows 11 (build 26300), Ryzen 9 5950X, 32 GB RAM.

AI-assisted: yes. Gemini wrote most of the change; Claude Code (Claude Opus 5.5) reviewed it, fixed compile errors, merged main, ran the checks and measured it in the title.

Checklist

  • Based on current main (0036195a7) and merges cleanly.
  • One topic: fewer hitches in dense scenes, through submission/copy work and memory pressure, all behind opt-in switches.
  • No game data, keys or decryption, including in logs or reports quoted here.
  • No new translator rule.

🤖 Generated with Claude Code

Claimed in the coordination issue as: D3D12-SERIES-X-DLSS-WORLD (claimed on the GitHub coordination issue #2570 before the move here). This is its submission and memory part, split out of GitHub #3039 so that each pull request has one topic; it was open on GitHub as #3374 when the repository was taken down, and is reopened here on the new `main` unchanged. ### What and why In dense city scenes with `-SeriesX -Dlss quality` the frame rate drops and the game hitches: the submitting thread spends 30+ ms a frame outside preparing, and the process sits under 1 GB of free RAM with 6+ GB spilled into shared VRAM. This pull request cuts both. Every change is behind its own `LEONIDA_*` switch, off in code; only `scripts/play-nvidia.ps1` turns them on, so `leonida.exe` alone behaves as on `main`. **Submission and copy switches** (move work off the submitting thread; its time outside preparing goes from 32-38 ms to 19-21 ms a frame): - `TEXTURE_FAST_QUEUE`, `COPIES_FILLS_FAST`, `WATCH_FAST_JOURNAL`, `FLUSH_FAST_NOOP(_V2)`; - `UNIFIED_ALIAS_RANGE` / `UNIFIED_ALIAS_TRACK`; - `OFF_LINE`, `COPY_SUBRESOURCE_FIX`, `COPY_GUARD`, `ASK_FIRST`, `SNAP_BESIDE`; - `AHEAD_BUFFERS_ONLY`, `SEND_SKIP_LAND`, `UPSCALE_SYNC`, `PIPELINE_ASYNC_MESH`. **Shader waits.** The launcher's `LEONIDA_PIPELINE_WAIT_MS` goes from 10000 to 50. New mesh pipelines were waited for one by one: in a play session, frames up to 6.2 s and 72 frames over 1 s in 11 minutes. ### Memory pressure In the city the process runs with under 1 GB of free RAM and 6+ GB in shared VRAM. Every change is behind its own switch. `play-nvidia.ps1` turns on only the ones that measured with no fps cost: | Switch | In `play-nvidia.ps1` | What it does | |---|---|---| | `LEONIDA_MEM_LINE_10S` | `1` | One memory breakdown line every 10 s (shared/dedicated VRAM, pools, windows, textures). | | `LEONIDA_ALLOCATOR_TRIM` | `1` | Already in main; turned on. | | `LEONIDA_SMALL_POOL_SPLIT` | `1` | Splits the small shared buffer pool by size class. Holes in it dropped from about 1 GB to 250-290 MB. | | `LEONIDA_POOL_PACK` | `1` | New allocations go to the fullest block first, so empty blocks can be released. | | `LEONIDA_WINDOW_REUSE_MB` | `128` | Reuses retired PC-only loose windows. | | `LEONIDA_SHARED_VRAM_CAP_MB` | `5120` | Above this much shared VRAM, drains empty small, staging and spare-window blocks and evicts idle textures. Textures are evicted only when local VRAM is also at 90 % or more. | | `LEONIDA_CARD_BUFFERS_SMALL_CAP_PCT` | `50` | Buffers under 64 KiB may take up to this share of `LEONIDA_CARD_BUFFERS_MB`; the rest stays for large buffers. | | `LEONIDA_CARD_BUFFERS_REAL_LEN_KB` | off | Opt-in. Its blanket cutoff sent hot small buffers over PCIe (`heap buffers` 4.3 -> 8.1 ms/frame). | | `LEONIDA_TAKE_BLOCK_BYTES` | off | Opt-in. Sub-page block diffing in the shadow copies. | **Measured in the city** (`-SeriesX -Dlss quality`, `LEONIDA_PIPELINE_WAIT_MS=50`, log fps). After the world loads, `LEONIDA_GAME_ACTIONS_RUN` teleports the player into the city at 150 s and 200 s. Only the last 3 minutes of each 5-minute run count; one warm-up, then alternated runs: | Build | Run | fps | median frame | frames >100 ms per min | frames >1 s | longest frame | shared VRAM | private RAM | |---|---|---|---|---|---|---|---|---| | switches only | 1 | 14.2 | 67 ms | 57 | 0 | 489 ms | 6.3 GB | 32.7 GB | | switches only | 2 | 14.3 | 68 ms | 61 | 0 | 292 ms | 6.5 GB | 33.0 GB | | **switches + memory** | 1 | **14.7** | **65 ms** | **25** | 0 | **170 ms** | **5.8 GB** | **32.2 GB** | | **switches + memory** | 2 | **15.5** | **63 ms** | **20** | 0 | **242 ms** | **6.0 GB** | **32.3 GB** | About 6 % more fps, a third of the frames over 100 ms, and about 0.5 GB less shared VRAM and private memory. In the starting area (low pressure, 3 runs each) the two are within noise: 13.5 / 13.8 / 12.4 fps without, 13.0 / 13.7 / 12.3 with, same memory. An earlier version also turned on `CARD_BUFFERS_REAL_LEN_KB=64`, `CARD_RESERVE_BUDGETS=1`, `CARD_WINDOWS_MB=1024` and a 4096 MB shared cap, and lost about 25 % fps: hot small buffers went to system RAM, unused budget was counted as used VRAM, and the cap sat below the normal shared floor (3.8-4.4 GB) and evicted textures every 1.5 s with 2.5 GB of dedicated VRAM free. Those are off here, and eviction is gated on local VRAM pressure. Not tested: the player stands still in the city in every run (no fast driving); only one machine (32 GB RAM); these memory runs were on main a917c54d6; the A/B against current main below has everything. ### Tested **Against `main` 3988be8f2 (the same tree as GitHub acb0657e2), #3039 before the split.** Same method as above: `-SeriesX -Dlss quality -NoFrameGen -NoSmoothMotion -NoPrecompile`, `LEONIDA_PIPELINE_WAIT_MS=50`, each build with its own `play-nvidia.ps1`, teleport into the city once the world loads, last 120 s measured, builds alternated. Two rounds were run; the first `main` run of the first round is left out because the title sat in the pause menu while shaders compiled on a cold cache (59.8 fps, 2.9 GB shared VRAM), and the first run of this branch's new build had one 3.2 s frame on the same cold cache. | Build | Run | fps | median frame | p99 | frames >100 ms per min | frames >1 s | longest frame | shared VRAM | private RAM | |---|---|---|---|---|---|---|---|---|---| | `main` 3988be8f2 | 1 | 13.2 | 76 ms | 157 ms | 83 | 0 | 487 ms | 6.3 GB | 32.8 GB | | `main` 3988be8f2 | 2 | 14.0 | 70 ms | 138 ms | 63 | 0 | 189 ms | 6.0 GB | 32.8 GB | | `main` 3988be8f2 | 3 | 13.9 | 71 ms | 139 ms | 66 | 0 | 310 ms | 6.1 GB | 32.8 GB | | this branch (cold cache) | 0 | 11.1 | 74 ms | 298 ms | 71 | 2 | 3212 ms | 6.1 GB | 32.6 GB | | **this branch** | 1 | **14.7** | **63 ms** | **114 ms** | **37** | 0 | 766 ms | 6.2 GB | 33.1 GB | | **this branch** | 2 | **15.3** | **62 ms** | **115 ms** | **25** | 0 | 452 ms | 6.1 GB | 32.7 GB | | **this branch** | 3 | **15.0** | **62 ms** | 191 ms | **55** | 0 | 898 ms | 6.2 GB | 32.8 GB | Averages over the warm runs: 15.0 fps against 13.7 (+9.5 %), median frame 62 ms against 72 ms, and 39 frames over 100 ms a minute against 70. Every run of this branch beats every run of `main`. Memory is the same on both (about 6 GB shared VRAM, 33 GB private). No device loss and no unclosed list. What #3039 had and this pull request leaves out: `LEONIDA_FSR_MODE_FIX` (the Series X FidelityFX quality-mode store; `main` already draws the world with DLSS without it) and the F4 menu item *Teleport -> To waypoint*. The mode fix was on in the runs above (the waypoint item does nothing unless used); this exact head was not re-run in the title. On this head (`main` 0036195a7 + one commit f07c1c87d): the `diag` build finished. leonida-gpu: 822 passed, 60 ignored (`--test-threads=1`, with `frame::tests::handles::a_failed_wait_still_takes_the_time` aborting with `0xc0000008`, same on `origin/main`). leonida-loader: 96 passed, 2 failed (`dump_stacks_does_not_panic_when_stderr_pipe_is_closed`, `profile_writes_file_and_closes_handles_when_stderr_pipe_is_closed` with `0xc0000008`, same on `origin/main`). leonida-menu: 48 passed. leonida: 63 + 2 + 2 + 1 + 1 passed. `cargo clippy --locked -p leonida-loader -p leonida-gpu -p leonida-menu -p leonida --all-targets --features dlss -- -D warnings`: fails on two pre-existing `clippy::collapsible_if` in `leonida-hle/src/modules/xmem.rs` (same on `origin/main`). `docs/switches.md` is current; `tests/test_d3d12_switches.py`: 22 tests, OK. GPUs tested: NVIDIA GeForce RTX 5080 16 GB, driver 616.92, Windows 11 (build 26300), Ryzen 9 5950X, 32 GB RAM. AI-assisted: yes. Gemini wrote most of the change; Claude Code (Claude Opus 5.5) reviewed it, fixed compile errors, merged `main`, ran the checks and measured it in the title. ### Checklist - [x] Based on current `main` (0036195a7) and merges cleanly. - [x] One topic: fewer hitches in dense scenes, through submission/copy work and memory pressure, all behind opt-in switches. - [x] No game data, keys or decryption, including in logs or reports quoted here. - [x] No new translator rule. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Opt-in switches, each off in code and on by default in scripts/play-nvidia.ps1:

- submission and copy work moved off the submitting thread (TEXTURE_FAST_QUEUE,
  COPIES_FILLS_FAST, WATCH_FAST_JOURNAL, FLUSH_FAST_NOOP(_V2), UNIFIED_ALIAS_RANGE/TRACK,
  OFF_LINE, COPY_SUBRESOURCE_FIX, COPY_GUARD, ASK_FIRST, SNAP_BESIDE, AHEAD_BUFFERS_ONLY,
  SEND_SKIP_LAND, UPSCALE_SYNC, PIPELINE_ASYNC_MESH);
- memory pressure (MEM_LINE_10S, SMALL_POOL_SPLIT, WINDOW_REUSE_MB, POOL_PACK,
  SHARED_VRAM_CAP_MB, CARD_BUFFERS_SMALL_CAP_PCT; REAL_LEN_KB and TAKE_BLOCK_BYTES
  opt-in only), with ALLOCATOR_TRIM turned on;
- PIPELINE_WAIT_MS 10000 -> 50 in the launcher.

Squashed from #3039 without its Series X FidelityFX mode fix and the waypoint menu item.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
First-time contributor

Independent data for one of the switches this PR turns on in play-nvidia.ps1: LEONIDA_TEXTURE_STAGE_MS=8, measured on its own while walking. The runs here are standing in the city, and the switches are measured together, so this may help pin down what that one does.

Setup:

  • main b053a1813 (same tree as ff8b4965c3 here), without this PR
  • RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 32 GB RAM, Windows 11
  • Series S, DLSS to 1080p, frame generation off, full precompile

Walk: a 6-minute scripted walk from the testing spot, driven through LEONIDA_KEYS_FILE: off the balcony, then sprint loops and left/right turns, no camera tilt. Every walk sees slightly different scenery, so hitches are also counted in heavy views only (more than 8,000 draws), where nearly all of them are. A and B were alternated.

A = defaults. B = LEONIDA_TEXTURE_STAGE_MS=8 and LEONIDA_TEXTURE_CATCHUP=0.

Run >50 ms per min >100 ms per min heavy views >50 ms per min heavy p99 1% low
A1 11.6 0.2 19.3 49.8 ms 22.3 fps
B1 4.3 0.3 4.7 43.3 ms 25.5 fps
A2 10.0 0.2 20.5 52.5 ms 23.2 fps
B2 4.0 0.2 7.1 44.4 ms 25.0 fps
A3 10.7 0.2 19.1 50.4 ms 22.1 fps
B3 4.2 0.2 6.1 43.2 ms 26.7 fps
  • An earlier round agrees (heavy-view >50 ms per minute):
    • 8 ms: 3.1 and 3.3
    • 16 ms: 7.3 and 9.0
    • defaults: 11.5 and 19.4
  • Medians barely move: light views 23.3-23.6 ms with the defaults and 22.1-23.3 ms with the cap; heavy views 29.5-30.7 ms and 28.7-30.5 ms.
  • The texture queue at the end of the runs looked the same in A and B: 20-26k slots, 20-24k of them waiting for their memory. I have not checked for later pop-in by eye.
  • Frames over 100 ms (about 0.2 a minute, the longest 110-141 ms) are not touched by it. They look like a different cause: single list calls taking 13-35 ms.

On TEXTURE_CATCHUP: this PR leaves it at the default. Catch-up triples the span (and the bytes) while 1,024 or more slots are due in a pass. Walking here, that is rare. In the world, the queue line (one every 5 s, about 70 per run) showed 1,024 or more due 0-4 times per run, at 1,040-2,850. The median was about 300 due. The bigger bursts (2,400-9,000) came during loading, before the world. So with catch-up on, 8 ms becomes 24 ms only in those short moments, which may still be when a new area streams in. The runs above have it off; I haven't measured 8 ms with catch-up on.

Why this pass, and why AHEAD_BUFFERS_ONLY looks like the right fix:

  • LEONIDA_TIMELINE_STALL_MS=60, armed at 180 s, caught a 71.5 ms frame. 28.3 ms of its chain was "ahead of a frame: textures picked by index" on leonida-ahead-textures. That span took 45.7 ms; the median in the same capture was 9.2 ms. That textures half is what AHEAD_BUFFERS_ONLY stops the submission from waiting on.
  • A WPR profile with context switches, aligned to the frame log, shows the hitch as a wait chain. The list threads are parked in their main loop, the title's threads sit in the descriptor ring's Sleep(1) loop waiting for the previous frame, and the card idles for most of the frame.

I can run this PR's head on the same walk if that's useful:

  • with and without LEONIDA_AHEAD_BUFFERS_ONLY;
  • with TEXTURE_CATCHUP on and off.
Independent data for one of the switches this PR turns on in `play-nvidia.ps1`: `LEONIDA_TEXTURE_STAGE_MS=8`, measured on its own while **walking**. The runs here are standing in the city, and the switches are measured together, so this may help pin down what that one does. **Setup:** - main `b053a1813` (same tree as `ff8b4965c3` here), without this PR - RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 32 GB RAM, Windows 11 - Series S, DLSS to 1080p, frame generation off, full precompile **Walk:** a 6-minute scripted walk from the testing spot, driven through `LEONIDA_KEYS_FILE`: off the balcony, then sprint loops and left/right turns, no camera tilt. Every walk sees slightly different scenery, so hitches are also counted in heavy views only (more than 8,000 draws), where nearly all of them are. A and B were alternated. **A** = defaults. **B** = `LEONIDA_TEXTURE_STAGE_MS=8` and `LEONIDA_TEXTURE_CATCHUP=0`. | Run | >50 ms per min | >100 ms per min | heavy views >50 ms per min | heavy p99 | 1% low | |---|---|---|---|---|---| | A1 | 11.6 | 0.2 | 19.3 | 49.8 ms | 22.3 fps | | B1 | 4.3 | 0.3 | 4.7 | 43.3 ms | 25.5 fps | | A2 | 10.0 | 0.2 | 20.5 | 52.5 ms | 23.2 fps | | B2 | 4.0 | 0.2 | 7.1 | 44.4 ms | 25.0 fps | | A3 | 10.7 | 0.2 | 19.1 | 50.4 ms | 22.1 fps | | B3 | 4.2 | 0.2 | 6.1 | 43.2 ms | 26.7 fps | - An earlier round agrees (heavy-view >50 ms per minute): - 8 ms: 3.1 and 3.3 - 16 ms: 7.3 and 9.0 - defaults: 11.5 and 19.4 - Medians barely move: light views 23.3-23.6 ms with the defaults and 22.1-23.3 ms with the cap; heavy views 29.5-30.7 ms and 28.7-30.5 ms. - The texture queue at the end of the runs looked the same in A and B: 20-26k slots, 20-24k of them waiting for their memory. I have not checked for later pop-in by eye. - Frames over 100 ms (about 0.2 a minute, the longest 110-141 ms) are not touched by it. They look like a different cause: single list calls taking 13-35 ms. **On `TEXTURE_CATCHUP`:** this PR leaves it at the default. Catch-up triples the span (and the bytes) while 1,024 or more slots are due in a pass. Walking here, that is rare. In the world, the queue line (one every 5 s, about 70 per run) showed 1,024 or more due 0-4 times per run, at 1,040-2,850. The median was about 300 due. The bigger bursts (2,400-9,000) came during loading, before the world. So with catch-up on, 8 ms becomes 24 ms only in those short moments, which may still be when a new area streams in. The runs above have it off; I haven't measured 8 ms with catch-up on. **Why this pass, and why `AHEAD_BUFFERS_ONLY` looks like the right fix:** - `LEONIDA_TIMELINE_STALL_MS=60`, armed at 180 s, caught a 71.5 ms frame. 28.3 ms of its chain was "ahead of a frame: textures picked by index" on `leonida-ahead-textures`. That span took 45.7 ms; the median in the same capture was 9.2 ms. That textures half is what `AHEAD_BUFFERS_ONLY` stops the submission from waiting on. - A WPR profile with context switches, aligned to the frame log, shows the hitch as a wait chain. The list threads are parked in their main loop, the title's threads sit in the descriptor ring's `Sleep(1)` loop waiting for the previous frame, and the card idles for most of the frame. I can run this PR's head on the same walk if that's useful: - with and without `LEONIDA_AHEAD_BUFFERS_ONLY`; - with `TEXTURE_CATCHUP` on and off.
Author
First-time contributor

Thanks, this is very useful: walking data from a second machine is exactly what this PR is missing (all my runs stand still in the city, on one RTX 5080 / 5950X box).

Yes please, run this PR's head (426dce8d3) on the same walk:

  • with and without LEONIDA_AHEAD_BUFFERS_ONLY;
  • with LEONIDA_TEXTURE_CATCHUP on and off.

play-nvidia.ps1 on this branch already sets LEONIDA_TEXTURE_STAGE_MS=8 and leaves TEXTURE_CATCHUP at its default, so plain -More @{ LEONIDA_AHEAD_BUFFERS_ONLY = '0' } / @{ LEONIDA_TEXTURE_CATCHUP = '0' } should give the four cases. Your 71.5 ms frame with 28.3 ms on "textures picked by index" is the wait AHEAD_BUFFERS_ONLY was meant to take off the submitting thread, so it would be good to see whether it shows up in your walking numbers too.

If the 8 ms cap holds up with catch-up on as well, I can add your table to the description and credit you.

🤖 Generated with Claude Code

Thanks, this is very useful: walking data from a second machine is exactly what this PR is missing (all my runs stand still in the city, on one RTX 5080 / 5950X box). Yes please, run this PR's head (`426dce8d3`) on the same walk: - with and without `LEONIDA_AHEAD_BUFFERS_ONLY`; - with `LEONIDA_TEXTURE_CATCHUP` on and off. `play-nvidia.ps1` on this branch already sets `LEONIDA_TEXTURE_STAGE_MS=8` and leaves `TEXTURE_CATCHUP` at its default, so plain `-More @{ LEONIDA_AHEAD_BUFFERS_ONLY = '0' }` / `@{ LEONIDA_TEXTURE_CATCHUP = '0' }` should give the four cases. Your 71.5 ms frame with 28.3 ms on "textures picked by index" is the wait `AHEAD_BUFFERS_ONLY` was meant to take off the submitting thread, so it would be good to see whether it shows up in your walking numbers too. If the 8 ms cap holds up with catch-up on as well, I can add your table to the description and credit you. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
First-time contributor

tested: the crate grows by 33 assertions and the one red is the usual one. Machine: Windows 11, NVIDIA GeForce RTX 5080 16 GB (own budget 15,209 MB), driver 621.47, hardware-accelerated GPU scheduling on, page file 49,152 MB.

cargo test --workspace --exclude xtask --locked in d3d12/ at 426dce8d31 -> leonida-gpu 761 passed / 1 failed / 59 ignored; the single failure is the known descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in, which passes with LEONIDA_VIEW_COPY=0. node --test tests/test_*.cjs -> 113 tests, 113 pass, 0 fail. Eight files over its base, the largest being list.rs (+514) and host.rs (+452), with a new host/mem_line.rs.

The baseline this can be read against on this box, same tree family and same save: Series X at 2560x1440 with DLSS quality at render scale 0.6667 (present scene=(3840, 2160, 28)), 813 windows in 4,149 s, 120,099 frames, 28.9 fps shown, median of the window medians 35.8 ms, 331 frames over 100 ms, 5 over 1 s, the card's own pool 14,930 MB with a peak of 15,128 of the 15,209 budget, 0 device losses and 0 unhandled. The pool is the line to watch for the memory-pressure part of this change: it fills inside the first five minutes (1,788 / 2,332 / 13,899 MB at 78 / 108 / 317 s) and then only drifts, so a trim that helps should show as a lower peak rather than a higher frame count.

tested: the crate grows by 33 assertions and the one red is the usual one. Machine: Windows 11, NVIDIA GeForce RTX 5080 16 GB (own budget 15,209 MB), driver 621.47, hardware-accelerated GPU scheduling on, page file 49,152 MB. `cargo test --workspace --exclude xtask --locked` in `d3d12/` at `426dce8d31` -> `leonida-gpu` 761 passed / 1 failed / 59 ignored; the single failure is the known `descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in`, which passes with `LEONIDA_VIEW_COPY=0`. `node --test tests/test_*.cjs` -> 113 tests, 113 pass, 0 fail. Eight files over its base, the largest being `list.rs` (+514) and `host.rs` (+452), with a new `host/mem_line.rs`. The baseline this can be read against on this box, same tree family and same save: Series X at 2560x1440 with DLSS quality at render scale 0.6667 (present `scene=(3840, 2160, 28)`), 813 windows in 4,149 s, 120,099 frames, 28.9 fps shown, median of the window medians 35.8 ms, 331 frames over 100 ms, 5 over 1 s, the card's own pool 14,930 MB with a peak of 15,128 of the 15,209 budget, 0 device losses and 0 unhandled. The pool is the line to watch for the memory-pressure part of this change: it fills inside the first five minutes (1,788 / 2,332 / 13,899 MB at 78 / 108 / 317 s) and then only drifts, so a trim that helps should show as a lower peak rather than a higher frame count.
Henriazz11 force-pushed perf/city-hitches-forgejo from 426dce8d31 to ad887ed0e4 2026-12-04 01:03:32 +00:00 Compare
First-time contributor

P2 source correctness finding: COPY_GUARD rejects supported UINT/BC reinterpret copies

Reviewed current head ad887ed0e43bd55c896cedf476f085a632d0f412 independently after the RTX 3090 tester flagged the format predicate.

At list.rs:1907, differing families are rejected unless resource::same_block_layout succeeds. resource.rs:749 compares the entire (bytes, block extent) tuple, so it rejects BC1/R32G32_UINT (8,4) vs (8,1), and BC3/R32G32B32A32_UINT (16,4) vs (16,1) before checking any extents.

Microsoft's CopyTextureRegion reference links the allowed reinterpret-copy rules; the CopyResource reinterpret table explicitly allows these pairs with compressed width/height four times the uncompressed dimensions. A UINT 16x16 resource and corresponding BC 64x64 resource are a useful synthetic case. The predicate rejects the whole supported class regardless of valid dimensions.

Please add format-compatibility regressions for BC1/BC3 in both directions and validate the corresponding texel/block coordinate scaling, including partial boxes. Simply broadening to arbitrary equal-byte formats would not establish the required compatibility or fix copy_box_fits' same-coordinate-extent assumption. Keep negative tests for unsupported pairs and invalid bounds/pitches.

The live candidate log has at least 2,048 guard skips; sampled format pairs include these two classes. The log lacks the rejected operations' full extents, so this does not establish that all those operations were legal or that visible corruption occurred. The completed stock candidate stability gate is not visual-correctness approval. BC7 is excluded from this source finding until its compatibility rule is separately established.

Source/documentation review only; no code edited or new GPU test performed for this finding. Hardware testing is on NVIDIA RTX 3090 24 GiB, driver 610.88, Windows 11; the full baseline/candidate stability report follows after independent verification. AI-assisted: GPT-6.1 Sol (xhigh), tester and parent independent source review.

**P2 source correctness finding: `COPY_GUARD` rejects supported UINT/BC reinterpret copies** Reviewed current head `ad887ed0e43bd55c896cedf476f085a632d0f412` independently after the RTX 3090 tester flagged the format predicate. At [`list.rs:1907`](https://git.leonida.now/leonida/mandy/src/commit/ad887ed0e43bd55c896cedf476f085a632d0f412/d3d12/crates/leonida-gpu/src/list.rs#L1907), differing families are rejected unless `resource::same_block_layout` succeeds. [`resource.rs:749`](https://git.leonida.now/leonida/mandy/src/commit/ad887ed0e43bd55c896cedf476f085a632d0f412/d3d12/crates/leonida-gpu/src/resource.rs#L749) compares the entire `(bytes, block extent)` tuple, so it rejects BC1/R32G32_UINT `(8,4)` vs `(8,1)`, and BC3/R32G32B32A32_UINT `(16,4)` vs `(16,1)` before checking any extents. Microsoft's [CopyTextureRegion reference](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-copytextureregion) links the allowed reinterpret-copy rules; the [CopyResource reinterpret table](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-copyresource#reinterpret-copy) explicitly allows these pairs with compressed width/height four times the uncompressed dimensions. A UINT 16x16 resource and corresponding BC 64x64 resource are a useful synthetic case. The predicate rejects the whole supported class regardless of valid dimensions. Please add format-compatibility regressions for BC1/BC3 in both directions and validate the corresponding texel/block coordinate scaling, including partial boxes. Simply broadening to arbitrary equal-byte formats would not establish the required compatibility or fix `copy_box_fits`' same-coordinate-extent assumption. Keep negative tests for unsupported pairs and invalid bounds/pitches. The live candidate log has at least 2,048 guard skips; sampled format pairs include these two classes. The log lacks the rejected operations' full extents, so this does **not** establish that all those operations were legal or that visible corruption occurred. The completed stock candidate stability gate is not visual-correctness approval. BC7 is excluded from this source finding until its compatibility rule is separately established. Source/documentation review only; no code edited or new GPU test performed for this finding. Hardware testing is on NVIDIA RTX 3090 24 GiB, driver 610.88, Windows 11; the full baseline/candidate stability report follows after independent verification. AI-assisted: GPT-6.1 Sol (xhigh), tester and parent independent source review.
First-time contributor

Independent RTX 3090 compatibility result for PR head ad887ed0e43bd55c896cedf476f085a632d0f412, integrated without semantic edits onto pinned main c43bc64101e2c9ea5f3e965bdff11e0f25f80c64. Main advanced during preparation; both arms retain the same pinned base.

Hardware: NVIDIA RTX 3090 24 GiB, driver 610.88, Windows 11, Ryzen 9 5900X, 32 GiB RAM. Rust 1.98.1 MSVC; diag, diagnostics,dlss,mimalloc.

Preflight: full 19-file diff/build-script audit, tracked and new-file clean-room scans exit 0; candidate GPU diagnostics 844 passed/59 ignored/0 failed, baseline 811/59/0, including device-backed depth-bounds; candidate XMem 28 passed/1 ignored; synthetic replay 1 passed. Both optimized builds passed. These are green tests and a test-count difference, not independent red/green proof of every new mechanism.

Stock 300s gates, candidate then baseline: same freeroam template, idle driver, Series X, DLSS quality (runtime confirms 2560x1440 ->3840x2160), no FG/Smooth Motion/precompile, identical memory thresholds, independently hash-matched nested pipeline seeds. Both original per-arm launchers used: candidate enables its switches (including wait50, split pool, packing, shared cap5120); baseline uses its original profile (wait10000). Shader cache was shared/preserved. No external heavy builds/tests ran during either live leg.

Observation Baseline Candidate
Stock gate / actual exit PASS / 0 PASS / 0
World duration 305.139s 301.401s
World+60 median / p5 FPS 17.32 / 10.49 14.54 / 5.56
Frame p95 95.29ms 179.95ms
Longest in-world present gap 4.676s 2.370s
Median draws/frame 7135.5 6373.0
Peak private / shared VRAM 32386 / 7973 MiB 34148 / 10149 MiB
Lowest system commit headroom 293 MiB 292 MiB
VRAM peak / budget 11909 / 23558 MiB 11217 / 23558 MiB

Both stopped at target, saved cache, suspended, exited normally, and were never killed; zero logged ERROR/device-loss/crash. Native control and initial target placement confirmed in both. Candidate 22 marks stayed within 0.2m, spanning 212.650s from first mark to stop. Baseline 25 marks reached 4.0m drift, with 6 within1m, spanning 248.197s. Neither is300s of confirmed destination exposure.

These are descriptive stability observations. Warm timing, shared shader-cache warming, differing draw workload/placement, and one leg per arm prevent speedup or memory-effect attribution. No visual correctness inspection was performed.

Candidate guard diagnostics reported at least2048 rejected operations (23 rate-limited samples; sampled reasons were format mismatch). The independently reviewed BC1/BC3 reinterpret-copy rejection is recorded separately in the P2 review. This gate pass does not validate those rejections or their visual impact.

AI-assisted: GPT-6.1 Sol, xhigh, for audit/testing and parent independent numerical/source verification. No upstream source push or merge.

Independent RTX 3090 compatibility result for PR head `ad887ed0e43bd55c896cedf476f085a632d0f412`, integrated without semantic edits onto pinned main `c43bc64101e2c9ea5f3e965bdff11e0f25f80c64`. Main advanced during preparation; both arms retain the same pinned base. Hardware: NVIDIA RTX 3090 24 GiB, driver 610.88, Windows 11, Ryzen 9 5900X, 32 GiB RAM. Rust 1.98.1 MSVC; `diag`, `diagnostics,dlss,mimalloc`. Preflight: full 19-file diff/build-script audit, tracked and new-file clean-room scans exit 0; candidate GPU diagnostics 844 passed/59 ignored/0 failed, baseline 811/59/0, including device-backed depth-bounds; candidate XMem 28 passed/1 ignored; synthetic replay 1 passed. Both optimized builds passed. These are green tests and a test-count difference, not independent red/green proof of every new mechanism. Stock 300s gates, candidate then baseline: same freeroam template, idle driver, Series X, DLSS quality (runtime confirms 2560x1440 ->3840x2160), no FG/Smooth Motion/precompile, identical memory thresholds, independently hash-matched nested pipeline seeds. Both original per-arm launchers used: candidate enables its switches (including wait50, split pool, packing, shared cap5120); baseline uses its original profile (wait10000). Shader cache was shared/preserved. No external heavy builds/tests ran during either live leg. | Observation | Baseline | Candidate | |---|---:|---:| | Stock gate / actual exit | PASS / 0 | PASS / 0 | | World duration | 305.139s | 301.401s | | World+60 median / p5 FPS | 17.32 / 10.49 | 14.54 / 5.56 | | Frame p95 | 95.29ms | 179.95ms | | Longest in-world present gap | 4.676s | 2.370s | | Median draws/frame | 7135.5 | 6373.0 | | Peak private / shared VRAM | 32386 / 7973 MiB | 34148 / 10149 MiB | | Lowest system commit headroom | 293 MiB | 292 MiB | | VRAM peak / budget | 11909 / 23558 MiB | 11217 / 23558 MiB | Both stopped at target, saved cache, suspended, exited normally, and were never killed; zero logged ERROR/device-loss/crash. Native control and initial target placement confirmed in both. Candidate 22 marks stayed within 0.2m, spanning 212.650s from first mark to stop. Baseline 25 marks reached 4.0m drift, with 6 within1m, spanning 248.197s. Neither is300s of confirmed destination exposure. These are descriptive stability observations. Warm timing, shared shader-cache warming, differing draw workload/placement, and one leg per arm prevent speedup or memory-effect attribution. No visual correctness inspection was performed. Candidate guard diagnostics reported at least2048 rejected operations (23 rate-limited samples; sampled reasons were format mismatch). The independently reviewed BC1/BC3 reinterpret-copy rejection is recorded separately in [the P2 review](https://git.leonida.now/leonida/mandy/pulls/3380#issuecomment-25192). This gate pass does not validate those rejections or their visual impact. AI-assisted: GPT-6.1 Sol, xhigh, for audit/testing and parent independent numerical/source verification. No upstream source push or merge.
Henriazz11 force-pushed perf/city-hitches-forgejo from ad887ed0e4 to f07c1c87dd 2026-12-04 21:34:25 +00:00 Compare
First-time contributor

@Henriazz11 here are the four cases you asked for, plus a same-base comparison against no PR, measured while running on foot.

Setup

  • Tested version: PR head ad887ed (a later head than the 426dce8d3 you mentioned, before today's update to f07c1c8), on its own base 528614662. Every build below, with and without the PR, is on that base. I haven't tested f07c1c8 yet.
  • RTX 5070 Ti, Ryzen 7 9800X3D, 32 GB RAM, Windows 11. Series S, DLSS. Each run's settings were checked from its log's settings line.
  • "PR as shipped" means this branch's play-nvidia.ps1, which here turns on 28 switches the no-PR build doesn't have (among them TEXTURE_STAGE_MS=8, AHEAD_BUFFERS_ONLY=1 and the memory switches) and lowers PIPELINE_WAIT_MS from 10000 to 50. So that row is the whole package.
  • Route: not the walk from my first comment. That walk replayed timed key presses, so every run drifted and ended up seeing slightly different scenery, and runs couldn't be compared spot for spot. This one is a 1.95 km run through the city, about 5:45, with no planned stops. A script holds W and steers with J/L to follow a path I recorded by hand, correcting itself from the player's live position, so every run covers the same ground. Each run is a fresh launch with one teleport to the start. Across the 24 PR / no-PR runs, each stayed a median of 0.44–0.51 m from the recorded path, and any two runs were a median of about 0.6 m apart at the same point.
  • Measured over the 332 s from 3 s after the start teleport. Slow frames are counted the same way as in my first comment: frames over 50 ms and over 100 ms, per minute.

PR vs no PR (8 runs each, same base, interleaved in 8 blocks)

Build fps Median frame p99 p99.9 >50 ms per min (range) >100 ms per min
No PR, defaults 34.1 28.7 ms 42.2 ms 56.9 ms 6.10 (3.6–10.5) 0.02
No PR, TEXTURE_STAGE_MS=8 33.8 29.0 ms 42.3 ms 57.3 ms 6.01 (4.5–10.5) 0.05
PR as shipped 32.6 30.1 ms 43.2 ms 57.6 ms 6.30 (5.2–7.4) 0.05
  • Slow frames are the same with and without the PR on this route: 6.30 frames over 50 ms per minute vs 6.10 and 6.01 (permutation p 0.8 and 0.76). Frames over 100 ms are rare in all three.
  • The PR costs about 1.2–1.5 fps: the median frame is 1.1–1.4 ms longer, in all 8 blocks (p < 0.001). p99 is about 1 ms higher (p ≈ 0.05); p99.9 is the same.
  • On your catch-up question: TEXTURE_STAGE_MS=8 with catch-up on made no difference here (6.01 vs 6.10, p 0.9). This route has fewer slow frames than the walk in my first comment (about 6 vs 10–12 a minute with the defaults), so there was less for it to fix. It doesn't repeat that walk's result.
  • Freezes over 0.5 s: one (2.4 s) in the 16 no-PR runs, none in the 8 PR runs. Too few to call.
Every run: PR vs no PR (24 runs)
Block Build fps Median p99 p99.9 >50 ms/min >100 ms/min Longest
1 No PR, defaults 34.1 28.8 ms 41.2 ms 57.4 ms 5.6 0.00 72 ms
1 No PR, STAGE_MS=8 33.0 29.7 ms 44.9 ms 61.0 ms 10.5 0.00 95 ms
1 PR as shipped 32.8 29.9 ms 42.8 ms 57.4 ms 6.5 0.00 89 ms
2 PR as shipped 32.3 30.3 ms 44.0 ms 57.6 ms 7.4 0.18 101 ms
2 No PR, STAGE_MS=8 33.7 29.2 ms 42.5 ms 58.5 ms 5.4 0.00 89 ms
2 No PR, defaults 34.3 28.6 ms 43.4 ms 55.2 ms 6.0 0.00 70 ms
3 No PR, defaults 33.7 29.0 ms 44.5 ms 61.8 ms 10.5 0.18 137 ms
3 No PR, STAGE_MS=8 33.6 29.2 ms 42.3 ms 56.5 ms 4.5 0.00 76 ms
3 PR as shipped 32.9 29.9 ms 42.7 ms 57.9 ms 6.5 0.00 73 ms
4 PR as shipped 32.7 30.0 ms 43.3 ms 55.6 ms 5.2 0.00 70 ms
4 No PR, STAGE_MS=8 33.7 29.1 ms 42.0 ms 56.9 ms 6.3 0.00 75 ms
4 No PR, defaults 34.4 28.6 ms 40.9 ms 56.1 ms 5.6 0.00 71 ms
5 No PR, defaults 34.0 28.9 ms 42.1 ms 55.9 ms 5.4 0.00 72 ms
5 No PR, STAGE_MS=8 34.4 28.5 ms 41.7 ms 55.9 ms 5.6 0.18 108 ms
5 PR as shipped 32.5 30.2 ms 42.7 ms 57.2 ms 6.0 0.18 107 ms
6 PR as shipped 32.7 30.0 ms 43.1 ms 58.9 ms 6.5 0.00 81 ms
6 No PR, STAGE_MS=8 33.7 28.8 ms 41.5 ms 58.5 ms 5.4 0.18 2408 ms
6 No PR, defaults 34.3 28.6 ms 42.2 ms 57.2 ms 6.3 0.00 71 ms
7 No PR, defaults 33.9 29.0 ms 41.7 ms 57.0 ms 5.8 0.00 65 ms
7 No PR, STAGE_MS=8 34.6 28.4 ms 41.0 ms 56.3 ms 5.4 0.00 69 ms
7 PR as shipped 32.4 30.4 ms 43.2 ms 58.8 ms 5.8 0.00 89 ms
8 PR as shipped 32.6 29.9 ms 43.8 ms 57.7 ms 6.5 0.00 89 ms
8 No PR, STAGE_MS=8 33.8 29.0 ms 42.4 ms 54.4 ms 4.9 0.00 78 ms
8 No PR, defaults 34.5 28.4 ms 41.3 ms 54.3 ms 3.6 0.00 87 ms

Rows are in the order the runs were made.

Your four cases (3 runs each, PR build)

Case fps Median frame p99 p99.9 >50 ms per min (range) >100 ms per min
a: PR as is 32.8 29.9 ms 42.9 ms 56.2 ms 6.14 (5.2–6.9) 0.00
b: AHEAD_BUFFERS_ONLY=0 32.4 30.2 ms 43.7 ms 59.2 ms 8.31 (8.0–8.5) 0.00
c: TEXTURE_CATCHUP=0 32.7 30.0 ms 42.8 ms 57.3 ms 5.42 (4.3–6.1) 0.12
d: both off 32.7 30.0 ms 43.3 ms 58.3 ms 8.37 (7.2–9.0) 0.00
  • AHEAD_BUFFERS_ONLY=1 matters: 5.78 frames over 50 ms per minute with it on (a, c) vs 8.34 with it off (b, d), permutation p 0.002. Every run with it on is below every run with it off, and that holds in each of the two sessions the runs came from. fps and the median don't change.
  • Catch-up makes no difference: 7.23 with it on (a, b) vs 6.90 with it off (c, d), p 0.7.
Every run: your four cases (12 runs)
Case Run fps Median p99 p99.9 >50 ms/min >100 ms/min Longest
a 1 32.9 29.9 ms 42.9 ms 57.4 ms 6.9 0.00 67 ms
a 2 32.6 30.2 ms 43.3 ms 55.0 ms 5.2 0.00 90 ms
a 3 33.0 29.7 ms 42.5 ms 56.3 ms 6.3 0.00 91 ms
b 1 32.0 30.6 ms 44.2 ms 57.6 ms 8.5 0.00 76 ms
b 2 32.4 30.2 ms 43.7 ms 60.0 ms 8.5 0.00 86 ms
b 3 32.9 29.8 ms 43.2 ms 60.0 ms 8.0 0.00 69 ms
c 1 32.4 30.2 ms 43.3 ms 60.2 ms 6.1 0.00 98 ms
c 2 32.9 29.7 ms 42.7 ms 55.7 ms 5.8 0.18 102 ms
c 3 32.7 30.0 ms 42.2 ms 55.9 ms 4.3 0.18 101 ms
d 1 32.8 29.9 ms 42.6 ms 59.1 ms 7.2 0.00 87 ms
d 2 32.7 30.0 ms 43.8 ms 58.3 ms 8.9 0.00 81 ms
d 3 32.7 30.0 ms 43.6 ms 57.7 ms 9.0 0.00 85 ms

If you'd like, I can run the same comparison on the current version (f07c1c8), plus more of any case or another route.

@Henriazz11 here are the four cases you asked for, plus a same-base comparison against no PR, measured while running on foot. **Setup** - Tested version: PR head `ad887ed` (a later head than the `426dce8d3` you mentioned, before today's update to `f07c1c8`), on its own base `528614662`. Every build below, with and without the PR, is on that base. I haven't tested `f07c1c8` yet. - RTX 5070 Ti, Ryzen 7 9800X3D, 32 GB RAM, Windows 11. Series S, DLSS. Each run's settings were checked from its log's settings line. - "PR as shipped" means this branch's `play-nvidia.ps1`, which here turns on 28 switches the no-PR build doesn't have (among them `TEXTURE_STAGE_MS=8`, `AHEAD_BUFFERS_ONLY=1` and the memory switches) and lowers `PIPELINE_WAIT_MS` from 10000 to 50. So that row is the whole package. - Route: not the walk from my first comment. That walk replayed timed key presses, so every run drifted and ended up seeing slightly different scenery, and runs couldn't be compared spot for spot. This one is a 1.95 km run through the city, about 5:45, with no planned stops. A script holds W and steers with J/L to follow a path I recorded by hand, correcting itself from the player's live position, so every run covers the same ground. Each run is a fresh launch with one teleport to the start. Across the 24 PR / no-PR runs, each stayed a median of 0.44–0.51 m from the recorded path, and any two runs were a median of about 0.6 m apart at the same point. - Measured over the 332 s from 3 s after the start teleport. Slow frames are counted the same way as in my first comment: frames over 50 ms and over 100 ms, per minute. **PR vs no PR (8 runs each, same base, interleaved in 8 blocks)** | Build | fps | Median frame | p99 | p99.9 | >50 ms per min (range) | >100 ms per min | |---|---|---|---|---|---|---| | No PR, defaults | 34.1 | 28.7 ms | 42.2 ms | 56.9 ms | 6.10 (3.6–10.5) | 0.02 | | No PR, `TEXTURE_STAGE_MS=8` | 33.8 | 29.0 ms | 42.3 ms | 57.3 ms | 6.01 (4.5–10.5) | 0.05 | | PR as shipped | 32.6 | 30.1 ms | 43.2 ms | 57.6 ms | 6.30 (5.2–7.4) | 0.05 | - **Slow frames are the same with and without the PR on this route:** 6.30 frames over 50 ms per minute vs 6.10 and 6.01 (permutation p 0.8 and 0.76). Frames over 100 ms are rare in all three. - **The PR costs about 1.2–1.5 fps:** the median frame is 1.1–1.4 ms longer, in all 8 blocks (p < 0.001). p99 is about 1 ms higher (p ≈ 0.05); p99.9 is the same. - **On your catch-up question:** `TEXTURE_STAGE_MS=8` with catch-up on made no difference here (6.01 vs 6.10, p 0.9). This route has fewer slow frames than the walk in my first comment (about 6 vs 10–12 a minute with the defaults), so there was less for it to fix. It doesn't repeat that walk's result. - Freezes over 0.5 s: one (2.4 s) in the 16 no-PR runs, none in the 8 PR runs. Too few to call. <details><summary>Every run: PR vs no PR (24 runs)</summary> | Block | Build | fps | Median | p99 | p99.9 | >50 ms/min | >100 ms/min | Longest | |---|---|---|---|---|---|---|---|---| | 1 | No PR, defaults | 34.1 | 28.8 ms | 41.2 ms | 57.4 ms | 5.6 | 0.00 | 72 ms | | 1 | No PR, `STAGE_MS=8` | 33.0 | 29.7 ms | 44.9 ms | 61.0 ms | 10.5 | 0.00 | 95 ms | | 1 | PR as shipped | 32.8 | 29.9 ms | 42.8 ms | 57.4 ms | 6.5 | 0.00 | 89 ms | | 2 | PR as shipped | 32.3 | 30.3 ms | 44.0 ms | 57.6 ms | 7.4 | 0.18 | 101 ms | | 2 | No PR, `STAGE_MS=8` | 33.7 | 29.2 ms | 42.5 ms | 58.5 ms | 5.4 | 0.00 | 89 ms | | 2 | No PR, defaults | 34.3 | 28.6 ms | 43.4 ms | 55.2 ms | 6.0 | 0.00 | 70 ms | | 3 | No PR, defaults | 33.7 | 29.0 ms | 44.5 ms | 61.8 ms | 10.5 | 0.18 | 137 ms | | 3 | No PR, `STAGE_MS=8` | 33.6 | 29.2 ms | 42.3 ms | 56.5 ms | 4.5 | 0.00 | 76 ms | | 3 | PR as shipped | 32.9 | 29.9 ms | 42.7 ms | 57.9 ms | 6.5 | 0.00 | 73 ms | | 4 | PR as shipped | 32.7 | 30.0 ms | 43.3 ms | 55.6 ms | 5.2 | 0.00 | 70 ms | | 4 | No PR, `STAGE_MS=8` | 33.7 | 29.1 ms | 42.0 ms | 56.9 ms | 6.3 | 0.00 | 75 ms | | 4 | No PR, defaults | 34.4 | 28.6 ms | 40.9 ms | 56.1 ms | 5.6 | 0.00 | 71 ms | | 5 | No PR, defaults | 34.0 | 28.9 ms | 42.1 ms | 55.9 ms | 5.4 | 0.00 | 72 ms | | 5 | No PR, `STAGE_MS=8` | 34.4 | 28.5 ms | 41.7 ms | 55.9 ms | 5.6 | 0.18 | 108 ms | | 5 | PR as shipped | 32.5 | 30.2 ms | 42.7 ms | 57.2 ms | 6.0 | 0.18 | 107 ms | | 6 | PR as shipped | 32.7 | 30.0 ms | 43.1 ms | 58.9 ms | 6.5 | 0.00 | 81 ms | | 6 | No PR, `STAGE_MS=8` | 33.7 | 28.8 ms | 41.5 ms | 58.5 ms | 5.4 | 0.18 | 2408 ms | | 6 | No PR, defaults | 34.3 | 28.6 ms | 42.2 ms | 57.2 ms | 6.3 | 0.00 | 71 ms | | 7 | No PR, defaults | 33.9 | 29.0 ms | 41.7 ms | 57.0 ms | 5.8 | 0.00 | 65 ms | | 7 | No PR, `STAGE_MS=8` | 34.6 | 28.4 ms | 41.0 ms | 56.3 ms | 5.4 | 0.00 | 69 ms | | 7 | PR as shipped | 32.4 | 30.4 ms | 43.2 ms | 58.8 ms | 5.8 | 0.00 | 89 ms | | 8 | PR as shipped | 32.6 | 29.9 ms | 43.8 ms | 57.7 ms | 6.5 | 0.00 | 89 ms | | 8 | No PR, `STAGE_MS=8` | 33.8 | 29.0 ms | 42.4 ms | 54.4 ms | 4.9 | 0.00 | 78 ms | | 8 | No PR, defaults | 34.5 | 28.4 ms | 41.3 ms | 54.3 ms | 3.6 | 0.00 | 87 ms | Rows are in the order the runs were made. </details> **Your four cases (3 runs each, PR build)** | Case | fps | Median frame | p99 | p99.9 | >50 ms per min (range) | >100 ms per min | |---|---|---|---|---|---|---| | a: PR as is | 32.8 | 29.9 ms | 42.9 ms | 56.2 ms | 6.14 (5.2–6.9) | 0.00 | | b: `AHEAD_BUFFERS_ONLY=0` | 32.4 | 30.2 ms | 43.7 ms | 59.2 ms | 8.31 (8.0–8.5) | 0.00 | | c: `TEXTURE_CATCHUP=0` | 32.7 | 30.0 ms | 42.8 ms | 57.3 ms | 5.42 (4.3–6.1) | 0.12 | | d: both off | 32.7 | 30.0 ms | 43.3 ms | 58.3 ms | 8.37 (7.2–9.0) | 0.00 | - **`AHEAD_BUFFERS_ONLY=1` matters:** 5.78 frames over 50 ms per minute with it on (a, c) vs 8.34 with it off (b, d), permutation p 0.002. Every run with it on is below every run with it off, and that holds in each of the two sessions the runs came from. fps and the median don't change. - **Catch-up makes no difference:** 7.23 with it on (a, b) vs 6.90 with it off (c, d), p 0.7. <details><summary>Every run: your four cases (12 runs)</summary> | Case | Run | fps | Median | p99 | p99.9 | >50 ms/min | >100 ms/min | Longest | |---|---|---|---|---|---|---|---|---| | a | 1 | 32.9 | 29.9 ms | 42.9 ms | 57.4 ms | 6.9 | 0.00 | 67 ms | | a | 2 | 32.6 | 30.2 ms | 43.3 ms | 55.0 ms | 5.2 | 0.00 | 90 ms | | a | 3 | 33.0 | 29.7 ms | 42.5 ms | 56.3 ms | 6.3 | 0.00 | 91 ms | | b | 1 | 32.0 | 30.6 ms | 44.2 ms | 57.6 ms | 8.5 | 0.00 | 76 ms | | b | 2 | 32.4 | 30.2 ms | 43.7 ms | 60.0 ms | 8.5 | 0.00 | 86 ms | | b | 3 | 32.9 | 29.8 ms | 43.2 ms | 60.0 ms | 8.0 | 0.00 | 69 ms | | c | 1 | 32.4 | 30.2 ms | 43.3 ms | 60.2 ms | 6.1 | 0.00 | 98 ms | | c | 2 | 32.9 | 29.7 ms | 42.7 ms | 55.7 ms | 5.8 | 0.18 | 102 ms | | c | 3 | 32.7 | 30.0 ms | 42.2 ms | 55.9 ms | 4.3 | 0.18 | 101 ms | | d | 1 | 32.8 | 29.9 ms | 42.6 ms | 59.1 ms | 7.2 | 0.00 | 87 ms | | d | 2 | 32.7 | 30.0 ms | 43.8 ms | 58.3 ms | 8.9 | 0.00 | 81 ms | | d | 3 | 32.7 | 30.0 ms | 43.6 ms | 57.7 ms | 9.0 | 0.00 | 85 ms | </details> If you'd like, I can run the same comparison on the current version (`f07c1c8`), plus more of any case or another route.
Sign in to join this conversation.
No description provided.