Slot eviction takes textures picked by index that no shader sampled (VICTORY_SAMPLED_EVICT=1, draft, on #1074) #1145

Manually merged
github merged 2 commits from github-bot/gh-1145 into gh-pr/1145/base 2026-11-28 19:42:45 +00:00 AGit
Owner

@⁠psttt432454 on GitHub · 2026-11-28 14:09 UTC · original
psttt432454:feat/sampled-evict → main · +531 −24 · 11 files · 2 commits · merged 2026-11-28 19:39 UTC

Draft: an experiment for 8 GB cards, not ready to merge. It is built on #1074 (the first commit here is #1074's), so review that one first. Only the last commit is new.

Why

#1074 showed that 75-94 % of the textures slot eviction may not take, because a slot shaders pick by index shows them, are read by no shader within its idle time: 0.5-1.2 GB on an RTX 5070 Laptop 8 GB. This lets eviction take them.

The change

VICTORY_SAMPLED_EVICT=1 (with VICTORY_SAMPLED_MARKS=1; off by default, and unset nothing changes):

  • HostHeap::slots_showing also says which slots are title slots picked by index (no table showed them lately).
  • evictable_slots keeps a texture whose slots are all either a draw's to make again or picked by index, when no shader marked any of them and no table showed it since the cutoff. Its indexed slots come flagged.
  • evict_slots notes each flagged slot it puts back to null (sampled::evicted). When a shader marks one again, it is queued as a title write would be (HostHeap::texture_slot_sampled_again). The pass over textures picked by index then makes the texture and the slot again (newest write first), and make_waiting makes its other slots.
  • The marks are now read only up to the heap's null slot (125 KiB on NVIDIA), in 8 parts. So a slot that is read again shows its null view for at most 8 frames plus the pass.
  • The line every 5 s adds: slots put back to null since the start, how many were queued again, and how many are null now.

Measured (RTX 5070 Laptop 8 GB, Series S, the story cutscenes from the same save)

Both runs had VICTORY_SAMPLED_MARKS=1 VICTORY_SLOT_EVICT_PERCENT=75. On the default 85 % the card never got there in one run, so eviction did nothing.

eviction as on main VICTORY_SAMPLED_EVICT=1
slots picked by index put back to null 0 21,232
of them read again and queued again - 7,740 (36 %)
texture-room lines saying no room, new textures wait 50 of 66 (76 %) 12 of 20 (60 %)
fps (10 s lines, cutscenes) 17-38 18-39
run 5.5 min, closed by hand 2.5 min, crashed (below)

An earlier run at the default 85 % let go of 49,038 slots, and 24,589 (50 %) of them came back. In the cutscenes many textures go unread for 30 s and are needed again. A longer idle time for these would probably cut that churn; not tried.

The player saw textures come in better with it on. I'm not counting that, because one such "better" run turned out to have evicted nothing.

The crash (open question)

Two runs with the switch on ended in the title's watchdog: victory-image…+0x23cf683 (write 0x0), after 33-34 s without a present, in the prestream of the same cutscene (fbk_stry000_FBK_STRY000_INTRO_min). That's the crash of #990 and #1031.

  • One of the two runs had evicted nothing (the card stayed under 85 %).
  • The same crash happened in the same cutscene on 27 November, without any of this, on Series X.
  • With the switch off, one run got past that point without the stall. Its picture went black there instead: 1,000-2,700 draws a frame were dropped without a host pipeline.

So that cutscene breaks either way here. I can't say that eviction plays no part: 2 of 3 runs with the switch on crashed, and 0 of 5 with it off, too few runs to tell.

Tests

  • New sampled::tests::the_used_words_cover_the_heap_in_whole_parts.
  • cargo test -p victory-gpu --lib --locked: 455 passed, 37 ignored. Clippy --all-targets: nothing new (main's own manual_is_multiple_of and let_and_return remain).

Not tested: other cards, Series X, frame generation, open-world driving (only the cutscenes so far).

No game files, dumps or extracted data are included.

🤖 Generated with Claude Code

**@⁠psttt432454** on GitHub · 2026-11-28 14:09 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1145) `psttt432454:feat/sampled-evict` → `main` · +531 −24 · 11 files · 2 commits · merged 2026-11-28 19:39 UTC **Draft: an experiment for 8 GB cards, not ready to merge.** It is built on #1074 (the first commit here is #1074's), so review that one first. Only the last commit is new. ## Why #1074 showed that 75-94 % of the textures slot eviction may not take, because a slot shaders pick by index shows them, are read by no shader within its idle time: 0.5-1.2 GB on an RTX 5070 Laptop 8 GB. This lets eviction take them. ## The change `VICTORY_SAMPLED_EVICT=1` (with `VICTORY_SAMPLED_MARKS=1`; off by default, and unset nothing changes): - `HostHeap::slots_showing` also says which slots are title slots picked by index (no table showed them lately). - `evictable_slots` keeps a texture whose slots are all either a draw's to make again or picked by index, when no shader marked any of them and no table showed it since the cutoff. Its indexed slots come flagged. - `evict_slots` notes each flagged slot it puts back to null (`sampled::evicted`). When a shader marks one again, it is queued as a title write would be (`HostHeap::texture_slot_sampled_again`). The pass over textures picked by index then makes the texture and the slot again (newest write first), and `make_waiting` makes its other slots. - The marks are now read only up to the heap's null slot (125 KiB on NVIDIA), in 8 parts. So a slot that is read again shows its null view for at most 8 frames plus the pass. - The line every 5 s adds: slots put back to null since the start, how many were queued again, and how many are null now. ## Measured (RTX 5070 Laptop 8 GB, Series S, the story cutscenes from the same save) Both runs had `VICTORY_SAMPLED_MARKS=1 VICTORY_SLOT_EVICT_PERCENT=75`. On the default 85 % the card never got there in one run, so eviction did nothing. | | eviction as on main | `VICTORY_SAMPLED_EVICT=1` | |---|---:|---:| | slots picked by index put back to null | 0 | 21,232 | | of them read again and queued again | - | 7,740 (36 %) | | texture-room lines saying `no room, new textures wait` | 50 of 66 (76 %) | 12 of 20 (60 %) | | fps (10 s lines, cutscenes) | 17-38 | 18-39 | | run | 5.5 min, closed by hand | 2.5 min, crashed (below) | An earlier run at the default 85 % let go of 49,038 slots, and 24,589 (50 %) of them came back. In the cutscenes many textures go unread for 30 s and are needed again. A longer idle time for these would probably cut that churn; not tried. The player saw textures come in better with it on. I'm not counting that, because one such "better" run turned out to have evicted nothing. ## The crash (open question) Two runs with the switch on ended in the title's watchdog: `victory-image…+0x23cf683` (write 0x0), after 33-34 s without a present, in the prestream of the same cutscene (`fbk_stry000_FBK_STRY000_INTRO_min`). That's the crash of #990 and #1031. - One of the two runs had **evicted nothing** (the card stayed under 85 %). - The same crash happened in the same cutscene on 27 November, without any of this, on Series X. - With the switch off, one run got past that point without the stall. Its picture went black there instead: 1,000-2,700 draws a frame were dropped without a host pipeline. So that cutscene breaks either way here. I can't say that eviction plays no part: 2 of 3 runs with the switch on crashed, and 0 of 5 with it off, too few runs to tell. ## Tests - New `sampled::tests::the_used_words_cover_the_heap_in_whole_parts`. - `cargo test -p victory-gpu --lib --locked`: 455 passed, 37 ignored. Clippy `--all-targets`: nothing new (main's own `manual_is_multiple_of` and `let_and_return` remain). Not tested: other cards, Series X, frame generation, open-world driving (only the cutscenes so far). No game files, dumps or extracted data are included. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Slot eviction cannot take a texture that a slot shaders pick by index
shows: nothing tells whether a shader still reads it. On an 8 GB card
that is 99.8 % of the idle-looking textures, so the card stays full and
new textures wait.

With VICTORY_SAMPLED_MARKS=1 every texture read or sample through a slot
picked from the heap sets that slot's bit in a root UAV of ours
(u251, SLOT_SAMPLED, a bit per slot). The dword is read first and the
atomic OR runs only for a bit not set yet. The mark is emitted after the
image instruction, since `image` emits into the block it began in.
The buffer lies in card memory the CPU maps where there is some
(GPU_UPLOAD); in the PC's memory GPU time went from 3 to 200 ms a frame.
The CPU takes a 32nd of it a frame (all 512 KiB took 20 ms), into the
frame each slot was last marked in.

For now it only counts: slot eviction's pass notes, of the textures it
may not take, those no shader marked within its idle time, and a line
every 5 s tells them. Nothing that eviction does changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
On top of the sampled marks (VICTORY_SAMPLED_MARKS=1). With
VICTORY_SAMPLED_EVICT=1 too, slot eviction also lets go of a texture
that slots shaders pick by index show, when no shader marked any of its
slots and no table showed it within the idle time, and its other slots
are a draw's to make again. Its slots picked by index are noted; when a
shader marks one again, it is queued as a title write is
(HostHeap::texture_slot_sampled_again), so the pass over textures picked
by index makes the texture and the slot again.

The marks are now read only over the slots a view heap has (to the null
slot), in 8 parts, so a slot read again waits at most 8 frames.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 14:34:25 +00:00
Author
Owner

@⁠Aniseto on GitHub · 2026-11-28 14:28 UTC · original

Ran the sampled-texture eviction test at f3b7e62 on an NVIDIA Blackwell desktop part:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, Rust 1.98.1 (48a229cea 2026-09-01, pinned by rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5 (shared env), debug build.

VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib sampled::tests::the_used_words_cover_the_heap_in_whole_parts -- --test-threads=1
1 passed; 0 failed; 0 ignored; 0 measured; 491 filtered out      (exit 0)

The new test passes: the used words cover the heap in whole parts, which is the marking the opt-in eviction relies on. This is a CPU-side test; the branch is stacked on #1074 and its author reports only cutscene runs so far. The PR is a draft and has no comments yet, so this is the first datapoint in the thread and the first from an RTX 5070 Ti.

Not tested: open-world driving, a paired smoke run, a retail title, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

**@⁠Aniseto** on GitHub · 2026-11-28 14:28 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1145#issuecomment-7240698143) Ran the sampled-texture eviction test at `f3b7e62` on an NVIDIA Blackwell desktop part: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, Rust 1.98.1 (48a229cea 2026-09-01, pinned by `rust-toolchain.toml`), MSVC 14.44.35207, DXC 1.9.2609.5 (shared env), debug build. ``` VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib sampled::tests::the_used_words_cover_the_heap_in_whole_parts -- --test-threads=1 1 passed; 0 failed; 0 ignored; 0 measured; 491 filtered out (exit 0) ``` The new test passes: the used words cover the heap in whole parts, which is the marking the opt-in eviction relies on. This is a CPU-side test; the branch is stacked on #1074 and its author reports only cutscene runs so far. The PR is a draft and has no comments yet, so this is the first datapoint in the thread and the first from an RTX 5070 Ti. Not tested: open-world driving, a paired smoke run, a retail title, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
github-bot referenced this pull request from a commit 2026-11-28 19:41:56 +00:00
github-bot changed target branch from main to gh-pr/1145/base 2026-11-28 19:42:30 +00:00
github manually merged commit f3b7e624d6 into gh-pr/1145/base 2026-11-28 19:42:32 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-29 03:18 UTC · original

In-game result for VICTORY_SAMPLED_MARKS=1 + VICTORY_SAMPLED_EVICT=1 (#1074 + #1145, cherry-picked onto a local build) on an RTX 5070 Ti (16 GB), Windows 11 26300, Series X profile, 4K output, DLSS Performance, frame generation 4x: the marks made the game unplayable, and eviction never ran.

Same build and launcher in every run; only the switches differ. Medians over the in-world windows of the VICTORY_THIN and frame-time lines:

Run List calls / frame Translating them (all threads) Per call Median frame
Marks off (earlier session, about 75 min) ~45,500 ~262 ms ~5.8 µs ~72 ms
Marks off (later session, same build) ~33,000 ~224 ms ~6.7 µs ~65 ms
Marks on ~65,600 ~662 ms ~10.1 µs ~159 ms
Marks on, marking 1 frame in 8 (see below) ~72,500 ~822 ms ~11.3 µs ~186 ms

While moving, it held at 300–490 ms frames for about 30–40 seconds at a stretch. One run ended with Windows closing the game as hung (AppHangB1). The marks buffer was in card memory (in_card=true).

Caveat: the marks-on runs were short, about 1.5–2 minutes in the world each (three runs). But a marks-off run of the same length on the same build ran at its usual ~65 ms frames, and the player saw the slowdown whenever they moved.

Eviction never fired. Texture memory peaked at about 75% of the budget, under VICTORY_SLOT_EVICT_PERCENT=78, and every status line read 0 slots picked by index put back to null. So all of the cost is the marks.

The cost is on the CPU side, not the card.

  • I tried a local change where shaders read a switch dword just past the marks and mark only while it is set, with the host setting it on 1 frame in 8 (VICTORY_SAMPLED_EVERY). That cuts the card's reads and atomics by about 8x, and it changed nothing: still about 10–11 µs per call and 160–190 ms frames.
  • The frames' waits for the card (settles lines) stayed at a few ms.
  • What grows is the fork's own CPU work per translated list call, which roughly doubles.

Not measured: which function grows with marks on. I haven't profiled a marks-on run yet. (A profile of a different change, #638, showed list translation as the main cost but no single hot spot.)

Two more notes for anyone trying this:

  • VICTORY_SAMPLED_MARKS was missing from the shader cache key on the base I cherry-picked onto. Without it, a marks-on run can be served translations made without marks, and eviction would then see on-screen textures picked by index as unused. main keys it already.
  • With marks off, the launcher's VICTORY_SLOT_EVICT_PERCENT=78 (under the texture queue's 80% line) costs nothing measurable.

🤖 Generated with Claude Code

**@⁠futurepro62** on GitHub · 2026-11-29 03:18 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1145#issuecomment-7249972312) In-game result for `VICTORY_SAMPLED_MARKS=1` + `VICTORY_SAMPLED_EVICT=1` (#1074 + #1145, cherry-picked onto a local build) on an RTX 5070 Ti (16 GB), Windows 11 26300, Series X profile, 4K output, DLSS Performance, frame generation 4x: **the marks made the game unplayable, and eviction never ran.** Same build and launcher in every run; only the switches differ. Medians over the in-world windows of the `VICTORY_THIN` and frame-time lines: | Run | List calls / frame | Translating them (all threads) | Per call | Median frame | |---|---|---|---|---| | Marks off (earlier session, about 75 min) | ~45,500 | ~262 ms | ~5.8 µs | ~72 ms | | Marks off (later session, same build) | ~33,000 | ~224 ms | ~6.7 µs | ~65 ms | | **Marks on** | ~65,600 | ~662 ms | ~10.1 µs | ~159 ms | | **Marks on, marking 1 frame in 8** (see below) | ~72,500 | ~822 ms | ~11.3 µs | ~186 ms | While moving, it held at 300–490 ms frames for about 30–40 seconds at a stretch. One run ended with Windows closing the game as hung (`AppHangB1`). The marks buffer was in card memory (`in_card=true`). **Caveat:** the marks-on runs were short, about 1.5–2 minutes in the world each (three runs). But a marks-off run of the same length on the same build ran at its usual ~65 ms frames, and the player saw the slowdown whenever they moved. **Eviction never fired.** Texture memory peaked at about 75% of the budget, under `VICTORY_SLOT_EVICT_PERCENT=78`, and every status line read `0 slots picked by index put back to null`. So all of the cost is the marks. **The cost is on the CPU side, not the card.** - I tried a local change where shaders read a switch dword just past the marks and mark only while it is set, with the host setting it on 1 frame in 8 (`VICTORY_SAMPLED_EVERY`). That cuts the card's reads and atomics by about 8x, and it changed nothing: still about 10–11 µs per call and 160–190 ms frames. - The frames' waits for the card (`settles` lines) stayed at a few ms. - What grows is the fork's own CPU work per translated list call, which roughly doubles. Not measured: which function grows with marks on. I haven't profiled a marks-on run yet. (A profile of a different change, #638, showed list translation as the main cost but no single hot spot.) Two more notes for anyone trying this: - `VICTORY_SAMPLED_MARKS` was missing from the shader cache key on the base I cherry-picked onto. Without it, a marks-on run can be served translations made without marks, and eviction would then see on-screen textures picked by index as unused. `main` keys it already. - With marks off, the launcher's `VICTORY_SLOT_EVICT_PERCENT=78` (under the texture queue's 80% line) costs nothing measurable. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-29 03:26 UTC · original

Method for my report above, so it can be checked and repeated.

Hardware and settings

RTX 5070 Ti 16 GB, Windows 11 26300, shaders.rpf of 1.0.2.1. Launched with the fork's PLAY_FRAMEGEN.cmd mode 6 (Series X profile, big pools, High priority), with the F1 menu's saved choices on top: 4K output, DLSS Performance, DLSS frame generation 4x.

Builds (all on fork main 9300875 from 2026-11-28)

Common to all: #339 (e8e2dfc), #348 at 5df24f4 plus a local fallback-order fix cb325c5 (posted in #348), and a port of Marvisak/VIctory#3619 (1f10565, atomic-sub loops on NVIDIA).

Build Adds Used for
1f10565 (the common part only) "marks off, about 75 min" row
315c941 #1074 (a410fd0, one-line import conflict resolved) and #1145 (f3b7e62) cherry-picked, plus VICTORY_SAMPLED_MARKS added to the shader cache key (main keys it already) "marks on" row
58ea7df the same, plus a local change: shaders read a switch dword past the marks (SAMPLED_ON) and mark only while it is set; the host sets it on 1 frame in VICTORY_SAMPLED_EVERY (default 8) "1 frame in 8" row, and "marks off (later session)"

Each build was warmed (victory warm, with VICTORY_SAMPLED_MARKS set as in the runs) before it was played.

Runs and switches

Run Log In the world Switches
Marks off, long victory-nvidia-20261128-154834.log ~75 min VICTORY_SLOT_EVICT=1 at its default 85%
Marks on ...-180934.log ~2.2 min VICTORY_SAMPLED_MARKS=1, VICTORY_SAMPLED_EVICT=1, VICTORY_SLOT_EVICT_PERCENT=78
Marks on, 1 frame in 8 ...-185120.log, ...-185310.log ~1.6 and ~0.9 min same as the row above
Marks off, later ...-190300.log ~2.6 min VICTORY_SAMPLED_MARKS=0, VICTORY_SAMPLED_EVICT=0, VICTORY_SLOT_EVICT_PERCENT=78

Confounds: the long marks-off run is on the build without the cherry-picks and evicted at 85%, not 78%. The runs were in different places in the game. The run on the same build and switches minus the marks is "marks off, later".

How the numbers were computed (from the logs)

  • Frame time: the victory_gpu::frame_times lines. "In the world" means windows whose median is over 20 ms. Correction: the column labelled "Median frame" in my report above is the mean of those window medians (mislabelled). The real medians of the window medians (mean in brackets):
Run Median (mean)
marks off, long 71 ms (72)
marks on 71 ms (159)
marks on, 1 frame in 8 (...-185120) 291 ms (186)
marks off, later 71 ms (66)

So in the "marks on" run, half the windows ran at the normal 71 ms pacing, and the slow stretches (300–490 ms, while moving) pulled the mean up. The "1 frame in 8" run was slow for most of its length. These are the game's own frames, before frame generation: 71.4 ms is the pacing on this setup (about 14 game fps, 56 shown); 160–190 ms is about 5–6 game fps.

  • List calls and per-call cost: the list calls translated by threads of ours per frame: N in T ms lines. Over windows with N > 20,000: mean N, mean T, and sum T / sum N. T is summed over all threads.
  • Eviction: the texture slots shaders sampled ... lines. Every one in the marks-on runs read 0 slots picked by index put back to null. Card memory came from the texture queue's room lines.
  • Hang: Windows Application log, Application Hang / AppHangB1 for victory.exe.

The marks-on runs weren't profiled. The CPU-profile procedure I used for #638 (wpr + samply import + a symbolication script) is in my method comment there.

🤖 Generated with Claude Code

**@⁠futurepro62** on GitHub · 2026-11-29 03:26 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1145#issuecomment-7250051387) **Method for my report above**, so it can be checked and repeated. ### Hardware and settings RTX 5070 Ti 16 GB, Windows 11 26300, `shaders.rpf` of 1.0.2.1. Launched with the fork's `PLAY_FRAMEGEN.cmd` mode 6 (Series X profile, big pools, High priority), with the F1 menu's saved choices on top: 4K output, DLSS Performance, DLSS frame generation 4x. ### Builds (all on fork `main` 9300875 from 2026-11-28) Common to all: #339 (`e8e2dfc`), #348 at `5df24f4` plus a local fallback-order fix `cb325c5` (posted in #348), and a port of Marvisak/VIctory#3619 (`1f10565`, atomic-sub loops on NVIDIA). | Build | Adds | Used for | |---|---|---| | `1f10565` | (the common part only) | "marks off, about 75 min" row | | `315c941` | #1074 (`a410fd0`, one-line import conflict resolved) and #1145 (`f3b7e62`) cherry-picked, plus `VICTORY_SAMPLED_MARKS` added to the shader cache key (`main` keys it already) | "marks on" row | | `58ea7df` | the same, plus a local change: shaders read a switch dword past the marks (`SAMPLED_ON`) and mark only while it is set; the host sets it on 1 frame in `VICTORY_SAMPLED_EVERY` (default 8) | "1 frame in 8" row, and "marks off (later session)" | Each build was warmed (`victory warm`, with `VICTORY_SAMPLED_MARKS` set as in the runs) before it was played. ### Runs and switches | Run | Log | In the world | Switches | |---|---|---|---| | Marks off, long | `victory-nvidia-20261128-154834.log` | ~75 min | `VICTORY_SLOT_EVICT=1` at its default 85% | | Marks on | `...-180934.log` | ~2.2 min | `VICTORY_SAMPLED_MARKS=1`, `VICTORY_SAMPLED_EVICT=1`, `VICTORY_SLOT_EVICT_PERCENT=78` | | Marks on, 1 frame in 8 | `...-185120.log`, `...-185310.log` | ~1.6 and ~0.9 min | same as the row above | | Marks off, later | `...-190300.log` | ~2.6 min | `VICTORY_SAMPLED_MARKS=0`, `VICTORY_SAMPLED_EVICT=0`, `VICTORY_SLOT_EVICT_PERCENT=78` | Confounds: the long marks-off run is on the build without the cherry-picks and evicted at 85%, not 78%. The runs were in different places in the game. The run on the same build and switches minus the marks is "marks off, later". ### How the numbers were computed (from the logs) - **Frame time:** the `victory_gpu::frame_times` lines. "In the world" means windows whose median is over 20 ms. **Correction:** the column labelled "Median frame" in my report above is the *mean* of those window medians (mislabelled). The real medians of the window medians (mean in brackets): | Run | Median | (mean) | |---|---|---| | marks off, long | 71 ms | (72) | | marks on | **71 ms** | (159) | | marks on, 1 frame in 8 (`...-185120`) | 291 ms | (186) | | marks off, later | 71 ms | (66) | So in the "marks on" run, half the windows ran at the normal 71 ms pacing, and the slow stretches (300–490 ms, while moving) pulled the mean up. The "1 frame in 8" run was slow for most of its length. These are the game's own frames, before frame generation: 71.4 ms is the pacing on this setup (about 14 game fps, 56 shown); 160–190 ms is about 5–6 game fps. - **List calls and per-call cost:** the `list calls translated by threads of ours per frame: N in T ms` lines. Over windows with N > 20,000: mean N, mean T, and sum T / sum N. T is summed over all threads. - **Eviction:** the `texture slots shaders sampled ...` lines. Every one in the marks-on runs read `0 slots picked by index put back to null`. Card memory came from the `texture queue's room` lines. - **Hang:** Windows Application log, `Application Hang` / `AppHangB1` for victory.exe. The marks-on runs weren't profiled. The CPU-profile procedure I used for #638 (`wpr` + `samply import` + a [symbolication script](https://gist.github.com/futurepro62/8426c554b68c1bf60fc39f247ca13bc8)) is in my method comment there. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

@⁠psttt432454 on GitHub · 2026-11-29 11:31 UTC · original

@⁠futurepro62 Thanks for the in-game numbers. I measured the marks on current main (829188e9, v2026.11.29.01). There they're adwen-007's rewrite (7d0c2867: marks in a DEFAULT heap, read back once per present, one mark per wave) and they're on by default. On this machine they don't slow anything down.

RTX 5070 Laptop 8 GB, Ryzen 9 HX, 32 GB, victory play --series-s, launcher defaults. Same save and same spot, walking in the world, about 2.5 minutes each. Only VICTORY_SAMPLED_MARKS differs, and the shader cache was warm in both runs (--preload with that setting, then hits=3065 misses=0).

marks on (default) VICTORY_SAMPLED_MARKS=0
fps, median of the 5 s lines in the world 19.8 14.7
preparing per frame, typical 32-36 ms 42-50 ms
list calls translated per frame (VICTORY_THIN) ~36,000 in ~178 ms ~30,600 in ~184 ms
per call ~4.9 µs ~6.0 µs
hang / crash none none

So the per-call doubling you saw doesn't show up with main's version here. The marks-on run is faster, which fits 739f8339: with marks off, sampled_lately is None and every texture counts as visible. That's one run each, so take the size of the gap loosely.

One thing that may matter for your runs: VICTORY_SAMPLED_MARKS is in the shader cache key, so the first run after flipping it starts with a cold cache. Here a marks-on run right after a new build (hits=0) went to 12 s frames at the title screen and Windows closed it as hung (AppHangB1). A marks-off run without a preload for that setting lost the picture, with 1-9 s frames and up to ~2,000 draws dropped while pipelines were made. Both were fine after a --preload with the same setting.

**@⁠psttt432454** on GitHub · 2026-11-29 11:31 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1145#issuecomment-7255171930) @⁠futurepro62 Thanks for the in-game numbers. I measured the marks on current `main` (`829188e9`, v2026.11.29.01). There they're adwen-007's rewrite (7d0c2867: marks in a DEFAULT heap, read back once per present, one mark per wave) and they're on by default. On this machine they don't slow anything down. RTX 5070 Laptop 8 GB, Ryzen 9 HX, 32 GB, `victory play --series-s`, launcher defaults. Same save and same spot, walking in the world, about 2.5 minutes each. Only `VICTORY_SAMPLED_MARKS` differs, and the shader cache was warm in both runs (`--preload` with that setting, then `hits=3065 misses=0`). | | marks on (default) | `VICTORY_SAMPLED_MARKS=0` | |---|---:|---:| | fps, median of the 5 s lines in the world | **19.8** | 14.7 | | preparing per frame, typical | 32-36 ms | 42-50 ms | | list calls translated per frame (`VICTORY_THIN`) | ~36,000 in ~178 ms | ~30,600 in ~184 ms | | per call | **~4.9 µs** | ~6.0 µs | | hang / crash | none | none | So the per-call doubling you saw doesn't show up with `main`'s version here. The marks-on run is faster, which fits 739f8339: with marks off, `sampled_lately` is `None` and every texture counts as visible. That's one run each, so take the size of the gap loosely. One thing that may matter for your runs: `VICTORY_SAMPLED_MARKS` is in the shader cache key, so the first run after flipping it starts with a cold cache. Here a marks-on run right after a new build (`hits=0`) went to 12 s frames at the title screen and Windows closed it as hung (`AppHangB1`). A marks-off run without a preload for that setting lost the picture, with 1-9 s frames and up to ~2,000 draws dropped while pipelines were made. Both were fine after a `--preload` with the same setting.
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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!1145
No description provided.