[pr-performance][memory][NVIDIA] Small textures at 4 KiB steps by default with a discrete NVIDIA card (DARNER_POOL_SMALL=auto) #151

Manually merged
TrustNo1 merged 3 commits from Cyber-Croissant/Darner:pool-small-nvidia into main 2026-12-04 02:29:30 +00:00
Contributor

Refs #19. See also #135, #1 and #68.

What it changes

  • DARNER_POOL_SMALL gets a third value, auto, which both launchers now set (play mode and scripts/play-nvidia.ps1, kept equal for the launcher table test). With auto, small textures (most detailed level of 64 KiB or less; with its other levels a texture can be larger) are placed at 4 KiB steps, in blocks of their own (DARNER_POOL_SMALL_APART, already on by default), when the host's card is a discrete NVIDIA one (Host::discrete_nvidia, the check DARNER_SCRATCH_CARD already uses). Other cards keep 64 KiB steps until someone tests them. That side of auto is a safety: the 64 KiB default came from two device losses on an AMD card (the note above small_placement), and we have no AMD or Intel numbers. 1 still turns it on with any card and 0 off. The DARNER_HOT_AB file reads the value the same way. A run without the variable follows auto too (before, it was on with every card).
  • One log line says the decision: small textures at 4 KiB steps: on (DARNER_POOL_SMALL=auto).
  • README row updated.
  • A second commit shortens two comments from #199 (ours): they keep the result, not the machine or the date.
  • A third commit (review) makes the environment and the DARNER_HOT_AB file share one decoding of the value, with a test for both card cases, and corrects the wording about which textures are small.

Why it was off: play mode turned it off on 2026-11-28 because trees flashed in and out. Small textures got blocks of their own the same evening (walls came out black when they shared blocks with large textures). The tree flashing is there with it off too: #135 reports every tree's leaves vanishing for one frame on v2026.12.03.01 with play's defaults, and we saw trees flash in our runs without the switch.

How it was tested

  • Tested revision: the measurements below ran on exes built from Darner 4db98e01 and fc3642e0 with DARNER_POOL_SMALL=1, plus local bench scripts and a pad-replay patch used only to start the autodrive (not part of this PR). This branch (aab9c4f6, on main 57dea7f2) was built (normal and diagnostics) and passed cargo test -p darner --bin darner the_powershell_launcher_sets_no_play_default_differently and cargo test -p darner-gpu --lib pool::tests (59 passed). On a discrete NVIDIA card auto selects the placement that 1 gave in the runs.
  • Gameplay: RTX 5070 12 GB (resizable BAR on), driver 621.47, six-core CPU, 32 GB RAM, Windows 11; Series S, DLSS Quality, frame generation off, ray tracing off.
  • Before and after: each series is A B B A on one exe in one sitting, A without the switch and B with it, both with DARNER_POOL_STATS=1 and DARNER_FLICKER_DETECT=1. Noise: the spread of the two A runs. Card memory: nvidia-smi's window mean, and the card ledger's DXGI local use. "Made on the card": the ledger's "made ... since the start", over the time in the world. Bench: one fixed save, 30 s warm-up, then 180 s standing still; "light" and "heavy" are the median frame time of the frame lines with 4,500-7,000 and 7,000+ draws. Drives: the game's own autodrive from the same save, started by a recorded pad replay, 11.5 minutes through the city each; figures over minutes 4 to 7 after the world appears (the city).
  • Shader wave sizes: not relevant (no shader change).
  • Coverage gaps: one card and one vendor (NVIDIA); no drive under the 8 GB budget; this branch itself was built and unit-tested, not benched. Details under "Weaknesses".

1. Bench, native, Darner 4db98e01

A1 B1 B2 A2
Card memory (MB) 9,911 7,535 7,366 10,021
Light (ms) 29.3 29.4 29.4 29.8
Heavy (ms) 38.6 38.9 38.7 38.9
p99 (ms) 50.3 49.6 46.8 47.4
Flicker events a minute 3.0 0.3 1.3 0.7

Card memory -2.38 and -2.65 GB (spread of the A runs: 0.11 GB). The pool's own line in A said as much: "47415 of them could lie at multiples of 4 KiB and would hold 629 MB where they hold 3070 MB".

2. Drives, native, Darner 4db98e01

A1 B1 B2 A2
City frame time (ms) 44.4 44.8 48.5 46.0
Card memory (MB) 10,522 10,001 10,173 10,589
Made on the card in the world (GB) 58.4 45.0 45.2 58.8
Shared GPU memory (GB) 7.2 6.1 5.6 7.4
Textures held at the end 45,645 86,611 81,772 43,949
Flicker events a minute 10.2 7.9 9.0 9.6

While driving, the room it frees keeps about twice as many textures on the card, with less made on the card and less shared memory. City captures were sharper with it (median B/A 1.34 over 20 s slots, a rough gradient measure).

3. Bench, native, Darner fc3642e0

A1 B1 B2 A2
Card memory (MB) 9,799 7,489 7,390 9,886
Made on the card in the world (GB) 8.2 6.4 6.6 8.2
Light (ms) 31.6 30.8 30.4 30.6
Heavy (ms) 41.0 40.9 39.6 39.7
p99 (ms) 52.7 49.7 48.8 49.9
Flicker events a minute 1.3 1.7 1.7 1.0

4. Bench under an 8 GB card's budget (DARNER_VRAM_BUDGET_MB=7040), Darner fc3642e0

A1 B1 B2 A2
DXGI local use, median (MB, budget 7,040) 6,882 5,274 5,417 6,765
Ledger lines over the budget 0 % 0 % 0 % 0 %
Made on the card in the world (GB) 8.9 6.2 6.4 7.7
Textures held at the end 33,549 51,893 46,908 33,857
Light (ms) 30.1 30.4 30.5 30.8
Heavy (ms) 37.6 40.3 39.3 41.0
Flicker events a minute 1.3 1.7 1.7 1.7

No device loss and no freeze in the 16 runs.

About #19

#19 measured this switch only together with tiled levels, on an older build (v2026.11.29.02, other switches different too): an 8 GB card went over its budget and uploaded about ten times more. Tiled levels are off by default now. With this switch alone under an 8 GB budget, the card stayed further under it (peak 77 % of the budget against 98 %), kept 40 to 55 % more textures and made 17 to 31 % less on the card. It does not compete with #19's central manager: it changes how textures are packed, not who decides how much card memory may be used, and the pool's free space is already counted over both texture pools. Runs for #19 that set DARNER_POOL_SMALL=0 stay comparable with earlier series.

Weaknesses

  • No frame-rate gain on this card: its 12 GB are not full at the bench. In the drives the city frame time was +0.4 and +2.5 ms with it (spread of the A runs: 1.6 ms; B2's window had 4 % more draws), within the noise but on the same side. The gain is memory; a frame-rate gain is expected only where the card is short of room (Darner's own note: 10 to 13 fps on an RTX 2060).
  • Flicker at the bench on the newer base: 1.7 against 1.0 and 1.3 events a minute, within the noise floor (about 1 a minute); not seen on the older base or in the drives.
  • One card, one vendor. No drive under the 8 GB budget.
  • Textures whose most detailed level is over 64 KiB keep 64 KiB steps.

Why NVIDIA only, and a call for AMD and Intel testers

Every run with it on that we know of is on NVIDIA: this RTX 5070, Darner's RTX 2060 note, and the RTX 5070 Ti in play-nvidia.ps1's comment. The 64 KiB default came from two device losses on an AMD card (2026-11-25), on textures at 4 KiB but not 64 KiB offsets, before small textures had blocks of their own; the cause was never found. Intel: no data. So auto leaves AMD and Intel cards as they are.

If you have an AMD or Intel card, please try DARNER_POOL_SMALL=1 and report here: device losses, black or missing textures, flicker, and the card memory with and without it (DARNER_POOL_STATS=1 logs the pool's line). If it holds, auto can include your vendor.

Checklist

  • This PR contains one change based on main. It is based on main (57dea7f2); besides the change, a second commit only shortens two comments of #199 (ours). I can move that commit to a PR of its own if you prefer.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #59 (spare texture blocks) touches play.rs, pool.rs and play-nvidia.ps1 on other lines; the two fit together. No open PR changes DARNER_POOL_SMALL.
Refs #19. See also #135, #1 and #68. ## What it changes - `DARNER_POOL_SMALL` gets a third value, `auto`, which both launchers now set (play mode and `scripts/play-nvidia.ps1`, kept equal for the launcher table test). With `auto`, small textures (most detailed level of 64 KiB or less; with its other levels a texture can be larger) are placed at 4 KiB steps, in blocks of their own (`DARNER_POOL_SMALL_APART`, already on by default), when the host's card is a discrete NVIDIA one (`Host::discrete_nvidia`, the check `DARNER_SCRATCH_CARD` already uses). Other cards keep 64 KiB steps until someone tests them. That side of `auto` is a safety: the 64 KiB default came from two device losses on an AMD card (the note above `small_placement`), and we have no AMD or Intel numbers. `1` still turns it on with any card and `0` off. The `DARNER_HOT_AB` file reads the value the same way. A run without the variable follows `auto` too (before, it was on with every card). - One log line says the decision: `small textures at 4 KiB steps: on (DARNER_POOL_SMALL=auto)`. - README row updated. - A second commit shortens two comments from #199 (ours): they keep the result, not the machine or the date. - A third commit (review) makes the environment and the `DARNER_HOT_AB` file share one decoding of the value, with a test for both card cases, and corrects the wording about which textures are small. Why it was off: play mode turned it off on 2026-11-28 because trees flashed in and out. Small textures got blocks of their own the same evening (walls came out black when they shared blocks with large textures). The tree flashing is there with it off too: #135 reports every tree's leaves vanishing for one frame on v2026.12.03.01 with play's defaults, and we saw trees flash in our runs without the switch. ## How it was tested - Tested revision: the measurements below ran on exes built from Darner [4db98e01](https://git.gtahub.st/TrustNo1/Darner/commit/4db98e011d361da9ded0303a7beab6a1a47fc08f) and [fc3642e0](https://git.gtahub.st/TrustNo1/Darner/commit/fc3642e0c1f596968861073c8001868c019e540d) with `DARNER_POOL_SMALL=1`, plus local bench scripts and a pad-replay patch used only to start the autodrive (not part of this PR). This branch (aab9c4f6, on `main` 57dea7f2) was built (normal and diagnostics) and passed `cargo test -p darner --bin darner the_powershell_launcher_sets_no_play_default_differently` and `cargo test -p darner-gpu --lib pool::tests` (59 passed). On a discrete NVIDIA card `auto` selects the placement that `1` gave in the runs. - Gameplay: RTX 5070 12 GB (resizable BAR on), driver 621.47, six-core CPU, 32 GB RAM, Windows 11; Series S, DLSS Quality, frame generation off, ray tracing off. - Before and after: each series is A B B A on one exe in one sitting, A without the switch and B with it, both with `DARNER_POOL_STATS=1` and `DARNER_FLICKER_DETECT=1`. Noise: the spread of the two A runs. Card memory: nvidia-smi's window mean, and the card ledger's DXGI local use. "Made on the card": the ledger's "made ... since the start", over the time in the world. Bench: one fixed save, 30 s warm-up, then 180 s standing still; "light" and "heavy" are the median frame time of the frame lines with 4,500-7,000 and 7,000+ draws. Drives: the game's own autodrive from the same save, started by a recorded pad replay, 11.5 minutes through the city each; figures over minutes 4 to 7 after the world appears (the city). - Shader wave sizes: not relevant (no shader change). - Coverage gaps: one card and one vendor (NVIDIA); no drive under the 8 GB budget; this branch itself was built and unit-tested, not benched. Details under "Weaknesses". ### 1. Bench, native, Darner 4db98e01 | | A1 | B1 | B2 | A2 | | --- | ---: | ---: | ---: | ---: | | Card memory (MB) | 9,911 | 7,535 | 7,366 | 10,021 | | Light (ms) | 29.3 | 29.4 | 29.4 | 29.8 | | Heavy (ms) | 38.6 | 38.9 | 38.7 | 38.9 | | p99 (ms) | 50.3 | 49.6 | 46.8 | 47.4 | | Flicker events a minute | 3.0 | 0.3 | 1.3 | 0.7 | Card memory -2.38 and -2.65 GB (spread of the A runs: 0.11 GB). The pool's own line in A said as much: "47415 of them could lie at multiples of 4 KiB and would hold 629 MB where they hold 3070 MB". ### 2. Drives, native, Darner 4db98e01 | | A1 | B1 | B2 | A2 | | --- | ---: | ---: | ---: | ---: | | City frame time (ms) | 44.4 | 44.8 | 48.5 | 46.0 | | Card memory (MB) | 10,522 | 10,001 | 10,173 | 10,589 | | Made on the card in the world (GB) | 58.4 | 45.0 | 45.2 | 58.8 | | Shared GPU memory (GB) | 7.2 | 6.1 | 5.6 | 7.4 | | Textures held at the end | 45,645 | 86,611 | 81,772 | 43,949 | | Flicker events a minute | 10.2 | 7.9 | 9.0 | 9.6 | While driving, the room it frees keeps about twice as many textures on the card, with less made on the card and less shared memory. City captures were sharper with it (median B/A 1.34 over 20 s slots, a rough gradient measure). ### 3. Bench, native, Darner fc3642e0 | | A1 | B1 | B2 | A2 | | --- | ---: | ---: | ---: | ---: | | Card memory (MB) | 9,799 | 7,489 | 7,390 | 9,886 | | Made on the card in the world (GB) | 8.2 | 6.4 | 6.6 | 8.2 | | Light (ms) | 31.6 | 30.8 | 30.4 | 30.6 | | Heavy (ms) | 41.0 | 40.9 | 39.6 | 39.7 | | p99 (ms) | 52.7 | 49.7 | 48.8 | 49.9 | | Flicker events a minute | 1.3 | 1.7 | 1.7 | 1.0 | ### 4. Bench under an 8 GB card's budget (`DARNER_VRAM_BUDGET_MB=7040`), Darner fc3642e0 | | A1 | B1 | B2 | A2 | | --- | ---: | ---: | ---: | ---: | | DXGI local use, median (MB, budget 7,040) | 6,882 | 5,274 | 5,417 | 6,765 | | Ledger lines over the budget | 0 % | 0 % | 0 % | 0 % | | Made on the card in the world (GB) | 8.9 | 6.2 | 6.4 | 7.7 | | Textures held at the end | 33,549 | 51,893 | 46,908 | 33,857 | | Light (ms) | 30.1 | 30.4 | 30.5 | 30.8 | | Heavy (ms) | 37.6 | 40.3 | 39.3 | 41.0 | | Flicker events a minute | 1.3 | 1.7 | 1.7 | 1.7 | No device loss and no freeze in the 16 runs. ### About #19 #19 measured this switch only together with tiled levels, on an older build (v2026.11.29.02, other switches different too): an 8 GB card went over its budget and uploaded about ten times more. Tiled levels are off by default now. With this switch alone under an 8 GB budget, the card stayed further under it (peak 77 % of the budget against 98 %), kept 40 to 55 % more textures and made 17 to 31 % less on the card. It does not compete with #19's central manager: it changes how textures are packed, not who decides how much card memory may be used, and the pool's free space is already counted over both texture pools. Runs for #19 that set `DARNER_POOL_SMALL=0` stay comparable with earlier series. ### Weaknesses - No frame-rate gain on this card: its 12 GB are not full at the bench. In the drives the city frame time was +0.4 and +2.5 ms with it (spread of the A runs: 1.6 ms; B2's window had 4 % more draws), within the noise but on the same side. The gain is memory; a frame-rate gain is expected only where the card is short of room (Darner's own note: 10 to 13 fps on an RTX 2060). - Flicker at the bench on the newer base: 1.7 against 1.0 and 1.3 events a minute, within the noise floor (about 1 a minute); not seen on the older base or in the drives. - One card, one vendor. No drive under the 8 GB budget. - Textures whose most detailed level is over 64 KiB keep 64 KiB steps. ### Why NVIDIA only, and a call for AMD and Intel testers Every run with it on that we know of is on NVIDIA: this RTX 5070, Darner's RTX 2060 note, and the RTX 5070 Ti in `play-nvidia.ps1`'s comment. The 64 KiB default came from two device losses on an AMD card (2026-11-25), on textures at 4 KiB but not 64 KiB offsets, before small textures had blocks of their own; the cause was never found. Intel: no data. So `auto` leaves AMD and Intel cards as they are. If you have an AMD or Intel card, please try `DARNER_POOL_SMALL=1` and report here: device losses, black or missing textures, flicker, and the card memory with and without it (`DARNER_POOL_STATS=1` logs the pool's line). If it holds, `auto` can include your vendor. ## Checklist - [ ] This PR contains one change based on `main`. It is based on `main` (57dea7f2); besides the change, a second commit only shortens two comments of #199 (ours). I can move that commit to a PR of its own if you prefer. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #59 (spare texture blocks) touches `play.rs`, `pool.rs` and `play-nvidia.ps1` on other lines; the two fit together. No open PR changes `DARNER_POOL_SMALL`.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Both launchers set DARNER_POOL_SMALL=auto: on with a discrete NVIDIA card,
where small textures in blocks of their own took about 2.4 GB less on the
card at the Series S bench and kept twice as many textures while driving;
other cards keep 64 KiB steps until tested. 1 still turns it on with any
card, 0 off. The decision is logged once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner

This changes the default for AMD and Intel too: a run without the variable used to pack small textures at 4 KiB on every card, and with auto those cards go back to 64 KiB steps. Do you have numbers on an AMD or Intel card for that part (VRAM and fps, with and without)? Without them, could auto leave non-NVIDIA cards as they were (on), so only NVIDIA's decision changes?

This changes the default for AMD and Intel too: a run without the variable used to pack small textures at 4 KiB on every card, and with `auto` those cards go back to 64 KiB steps. Do you have numbers on an AMD or Intel card for that part (VRAM and fps, with and without)? Without them, could `auto` leave non-NVIDIA cards as they were (on), so only NVIDIA's decision changes?
Owner

Correction to the above: 4 KiB placement came from a port whose AMD source defaults to 64 KiB, after two device losses in small textures at 4 KiB offsets (see the note above small_placement in pool.rs). If the AMD/Intel side of auto is meant as that safety, please say so in the PR text. Numbers from an AMD card would still settle it: the memory saved against any device losses.

Correction to the above: 4 KiB placement came from a port whose AMD source defaults to 64 KiB, after two device losses in small textures at 4 KiB offsets (see the note above `small_placement` in pool.rs). If the AMD/Intel side of `auto` is meant as that safety, please say so in the PR text. Numbers from an AMD card would still settle it: the memory saved against any device losses.
Author
Contributor

No AMD or Intel numbers: we only have this NVIDIA card. Yes, the non-NVIDIA side of auto is meant as that safety; I have added it to the PR text. With both launchers, AMD and Intel players had DARNER_POOL_SMALL=0 until now, and auto keeps them at 64 KiB steps, so nothing changes for them. The one case that does change is a run with the variable unset, outside the launchers: it was on with every card and now follows auto. If you would rather keep that case as it was, I can make an unset variable mean on, as before, so that only the launchers' auto decides by card. Numbers from an AMD or Intel card would settle it; the call for testers stands.

No AMD or Intel numbers: we only have this NVIDIA card. Yes, the non-NVIDIA side of `auto` is meant as that safety; I have added it to the PR text. With both launchers, AMD and Intel players had `DARNER_POOL_SMALL=0` until now, and `auto` keeps them at 64 KiB steps, so nothing changes for them. The one case that does change is a run with the variable unset, outside the launchers: it was on with every card and now follows `auto`. If you would rather keep that case as it was, I can make an unset variable mean on, as before, so that only the launchers' `auto` decides by card. Numbers from an AMD or Intel card would settle it; the call for testers stands.
Contributor

One place where the AMD/Intel auto policy still differs at 47ce3bf5: the live DARNER_HOT_AB branch returns v != "0". Putting DARNER_POOL_SMALL=auto in the benchmark file therefore enables 4 KiB placement for new textures on AMD/Intel, while the same value at startup selects 64 KiB. Could the environment and hot file share the 0/auto/on decoding, with a small test for both vendor cases? The DARNER_AB boolean override can stay a forced on/off toggle. This is from source review. Both paths

One place where the AMD/Intel `auto` policy still differs at `47ce3bf5`: the live `DARNER_HOT_AB` branch returns `v != "0"`. Putting `DARNER_POOL_SMALL=auto` in the benchmark file therefore enables 4 KiB placement for new textures on AMD/Intel, while the same value at startup selects 64 KiB. Could the environment and hot file share the `0`/`auto`/on decoding, with a small test for both vendor cases? The `DARNER_AB` boolean override can stay a forced on/off toggle. This is from source review. [Both paths](https://git.gtahub.st/Cyber-Croissant/Darner/src/commit/47ce3bf5c6eb78a37db110b7729d4598a75e9ce4/crates/darner-gpu/src/pool.rs#L2124-L2144)
First-time contributor

One detail for the PR description’s “textures of 64 KiB and less”: the top mip can qualify even when the full allocation exceeds 64 KiB. I queried an RTX 4070 Ti SUPER on driver 617.14 with GetResourceAllocationInfo, comparing the default alignment with a 4 KiB request.

2D texture Default 4 KiB placement
RGBA8 128×128 or BC7 256×256, one mip 64 KiB 64 KiB
Same dimensions, full chain (8 or 9 mips) 128 KiB 88 KiB
RGBA8 129×128 or BC7 260×256, one mip 128 KiB rejected

Both full chains saved 40 KiB in the driver’s reported requirement. All 22 queries (11 descriptors) matched across three process launches. These are size queries only. In-game residency, flicker, FPS and the AMD/Intel stability question remain open. D3D12 alignment rules

One detail for the PR description’s “textures of 64 KiB and less”: the top mip can qualify even when the full allocation exceeds 64 KiB. I queried an RTX 4070 Ti SUPER on driver 617.14 with GetResourceAllocationInfo, comparing the default alignment with a 4 KiB request. | 2D texture | Default | 4 KiB placement | |---|---:|---:| | RGBA8 128×128 or BC7 256×256, one mip | 64 KiB | 64 KiB | | Same dimensions, full chain (8 or 9 mips) | 128 KiB | 88 KiB | | RGBA8 129×128 or BC7 260×256, one mip | 128 KiB | rejected | Both full chains saved 40 KiB in the driver’s reported requirement. All 22 queries (11 descriptors) matched across three process launches. These are size queries only. In-game residency, flicker, FPS and the AMD/Intel stability question remain open. [D3D12 alignment rules](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_resource_desc#alignment)
The hot file's branch read `auto` as on with any card. Both now go through one function (0 off, auto or an empty value by the card, anything else on), with a test for both card cases. DARNER_AB stays a forced on/off.

The texts say which textures are small: those whose most detailed level is 64 KiB or less; with its other levels a texture can be larger.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
First-time contributor

I checked the live setting on both revisions with a temporary hot file and the real environment and timed A/B readers. The previous head, 47ce3bf5, passed 26 of 30 cases. With the non-NVIDIA flag, an empty value, auto, and whitespace-padded auto in the hot file each enabled 4 KiB placement. Changing 1 to auto while the process was running also left it on. The updated head, aab9c4f6, passed all 30 cases. Both revisions passed all 15 discrete-NVIDIA cases.

A hot-file 0 overrode the timed on phase. Removing the line restored the phase value, or the startup setting when timed A/B was disabled. The author’s parser unit test also passed.

I compiled the placement functions from both Git revisions with their hot.rs and ab.rs modules. The harness supplied the card flag and called the present callbacks, with logging and frame counters stubbed. This verifies setting selection. AMD/Intel device stability, VRAM and FPS still need real hardware.

I checked the live setting on both revisions with a temporary hot file and the real environment and timed A/B readers. The previous head, 47ce3bf5, passed 26 of 30 cases. With the non-NVIDIA flag, an empty value, auto, and whitespace-padded auto in the hot file each enabled 4 KiB placement. Changing 1 to auto while the process was running also left it on. The updated head, aab9c4f6, passed all 30 cases. Both revisions passed all 15 discrete-NVIDIA cases. A hot-file 0 overrode the timed on phase. Removing the line restored the phase value, or the startup setting when timed A/B was disabled. The author’s parser unit test also passed. I compiled the placement functions from both Git revisions with their hot.rs and ab.rs modules. The harness supplied the card flag and called the present callbacks, with logging and frame counters stubbed. This verifies setting selection. AMD/Intel device stability, VRAM and FPS still need real hardware.
Contributor

In-game numbers on a discrete NVIDIA card that runs out of VRAM: about 1.5 GB less on the card and no DLSS VRAM warning, same frame rate, no trees flashing in the run watched.

Setup. RTX 5070 Ti 16 GB, Ryzen 7 7800X3D, 31 GB RAM, Series X profile, 1440p, DLAA, frame generation 2x, DARNER_HW_RT=1. Without the switch the card is at its limit in this scene (VRAM peak about 15.7 GB of 16, DLSS VRAM warning in every run). Route: gta-bench-kit cam-city60 (65 s of city camera).

What ran. One exe, main 57dea7f (release, --features bench-remote), with DARNER_POOL_SMALL=0 (the launcher's value on main) against DARNER_POOL_SMALL=1. On a discrete NVIDIA card that is what this PR's auto picks (small_wanted("auto", true) is on at aab9c4f6), so the placement is the same; the PR build itself did not run.

Bench (median of runs, spread max−min in brackets; the off runs are all of tonight's runs of that exe, the on runs were interleaved with one of them: on, off, on):

off (6 runs) on (2 runs)
VRAM peak 15,688 MB [685] 14,180 MB [38]
DLSS VRAM warning 6 of 6 runs 0 of 2 runs
fps median 12.0 [2.4] 12.0 [1.1]
fps p10 7.2 [3.5] 7.2 [1.9]
p99 frame time 371 ms [322] 280 ms [94]
frames over 100 ms 30.8 % [31.1] 29.9 % [11.1]
textures due (bench average) 4,131 [3,969] 5,081 [708]
private bytes peak 33,789 MB [923] 32,632 MB [148]
commit peak 57,529 MB [4,576] 56,478 MB [52]

The VRAM and the warning are clear. Frame rate and the texture queue are within the off runs' spread.

Texture queue from the game logs (the interleaved batch, first 60 s of each log skipped):

on off on
textures due, median / max 3,904 / 7,117 3,695 / 9,165 4,873 / 8,847
oldest not uploaded, p90 / max (frames) 1,854 / 1,989 77 / 498 1,208 / 2,174
passes stopped at their time 95 % 94 % 66 %
uploads per second 1,619 1,769 1,398

The 1.5 GB freed did not make the texture pass faster here: the card's room did not turn into more uploads, and the oldest due texture waited longer in both on runs than in the off run between them (one off run only, so not settled).

By eye (the second on run only; the first was not watched): no trees flashing in and out, the reason main's launcher turned this off on 2026-11-28. That run looked worse than the earlier runs, with more visual glitches, but nothing flashing. No device loss in either on run (no device-removed line in the logs).

In-game numbers on a discrete NVIDIA card that runs out of VRAM: about 1.5 GB less on the card and no DLSS VRAM warning, same frame rate, no trees flashing in the run watched. **Setup.** RTX 5070 Ti 16 GB, Ryzen 7 7800X3D, 31 GB RAM, Series X profile, 1440p, DLAA, frame generation 2x, `DARNER_HW_RT=1`. Without the switch the card is at its limit in this scene (VRAM peak about 15.7 GB of 16, DLSS VRAM warning in every run). Route: gta-bench-kit `cam-city60` (65 s of city camera). **What ran.** One exe, `main` 57dea7f (release, `--features bench-remote`), with `DARNER_POOL_SMALL=0` (the launcher's value on `main`) against `DARNER_POOL_SMALL=1`. On a discrete NVIDIA card that is what this PR's `auto` picks (`small_wanted("auto", true)` is on at aab9c4f6), so the placement is the same; the PR build itself did not run. **Bench** (median of runs, spread max−min in brackets; the off runs are all of tonight's runs of that exe, the on runs were interleaved with one of them: on, off, on): | | off (6 runs) | on (2 runs) | |---|---|---| | VRAM peak | 15,688 MB [685] | 14,180 MB [38] | | DLSS VRAM warning | 6 of 6 runs | 0 of 2 runs | | fps median | 12.0 [2.4] | 12.0 [1.1] | | fps p10 | 7.2 [3.5] | 7.2 [1.9] | | p99 frame time | 371 ms [322] | 280 ms [94] | | frames over 100 ms | 30.8 % [31.1] | 29.9 % [11.1] | | textures due (bench average) | 4,131 [3,969] | 5,081 [708] | | private bytes peak | 33,789 MB [923] | 32,632 MB [148] | | commit peak | 57,529 MB [4,576] | 56,478 MB [52] | The VRAM and the warning are clear. Frame rate and the texture queue are within the off runs' spread. **Texture queue from the game logs** (the interleaved batch, first 60 s of each log skipped): | | on | off | on | |---|---|---|---| | textures due, median / max | 3,904 / 7,117 | 3,695 / 9,165 | 4,873 / 8,847 | | oldest not uploaded, p90 / max (frames) | 1,854 / 1,989 | 77 / 498 | 1,208 / 2,174 | | passes stopped at their time | 95 % | 94 % | 66 % | | uploads per second | 1,619 | 1,769 | 1,398 | The 1.5 GB freed did not make the texture pass faster here: the card's room did not turn into more uploads, and the oldest due texture waited longer in both on runs than in the off run between them (one off run only, so not settled). **By eye** (the second on run only; the first was not watched): no trees flashing in and out, the reason `main`'s launcher turned this off on 2026-11-28. That run looked worse than the earlier runs, with more visual glitches, but nothing flashing. No device loss in either on run (no device-removed line in the logs).
TrustNo1 manually merged commit 5fcd4e6d89 into main 2026-12-04 02:29:27 +00:00
Author
Contributor

Follow-up after the merge: answers to the review comments, corrections to the PR text, and what ran on the merged commits. Each line says how it was checked: a run in the game, a unit test, the source, or not checked.

Read this first: this default may be a regression. Nyutt saw a worse-looking run and a longer texture wait with it on a card at its VRAM limit, a case our card does not cover. Our numbers below do not rule that out. If other users see a regression, the setting will most likely have to be off by default again, whatever VRAM it saves. Details in the last section.

Answers

  • tyr0nsur (the DARNER_HOT_AB path read auto as on): fixed in aab9c4f6. The environment and the hot file share one decoding (small_wanted), with a unit test for both card cases. Thank you.
  • akimfomin (which textures are small; the check of both heads): the code comment, the README row and the PR text now say "most detailed level of 64 KiB or less; with its other levels a texture can be larger". Thank you for the size queries and the 30 cases.
  • Nyutt (the oldest due texture waited longer, one run looked worse): measured on our card below. Thank you for the runs on a card at its limit.

Corrections to the PR text

It was merged before I had corrected these.

  • "#59 ... the two fit together" is wrong against today's main. Checked with git merge-tree: #59's head (eefe0191) merges cleanly with this PR's base but conflicts with main (a361afed) in scripts/play-nvidia.ps1, in the comment lines above the settings line both touch. It resolves by keeping #59's four comment lines and its DARNER_WINDOW_GROW... line, then main's two comment lines and its DARNER_POOL_SMALL = 'auto' line. Not built or run.
  • Series 3: the warm-up run never reached the world, so A1 was that exe's first run in the world (it loaded for 790 s). By docs/ab-testing.md it does not count. One A run is left (29.9 fps) against B's 30.5 and 30.8: no frame-rate claim stands on that series. Its card memory is not affected (9,886 MB against 7,489 and 7,390).
  • Series 4: B2 was another scene (7,925 draws a frame against 5,430 to 5,590). That run is out.
  • "This branch ... was built (normal and diagnostics)": when that was written only cargo check and the two unit tests had run on the branch. The build and the run in the game came later, below.
  • The flicker rows are the detector's counts (DARNER_FLICKER_DETECT=1), not a judgement by eye of the picture.

What ran on the merged commits

Exe: main 57dea7f2 plus this PR's three commits (head aab9c4f6) plus local bench scripts, diagnostics build. RTX 5070 12 GB, driver 621.47, Series S, DLSS Quality, frame generation off, ray tracing off.

  • Run in the game, RTX 5070, the launcher's default (auto), one run: the log says small textures at 4 KiB steps: on (DARNER_POOL_SMALL=auto); card memory 7,620 MB (four runs of the same base without the switch the same night, another sitting: 9,854 to 10,011 MB); 29.4 fps, 1 % low 19.6 (those four runs: 28.5 to 31.2 and 18.7 to 20.8); no device-removed line.
  • Integrated AMD Radeon of the same PC (DARNER_ADAPTER=Radeon), one launch: the log says adapter=AMD Radeon(TM) Graphics and small textures at 4 KiB steps: off (DARNER_POOL_SMALL=auto). The game then stopped with an access violation in the AMD driver (amdxc64.dll) while loading, with the switch off. So: the decision is the intended one on an AMD adapter; nothing is learnt about 4 KiB placement on AMD.
  • Gates on aab9c4f6 (--locked --offline): cargo clippy --workspace --all-targets -- -D warnings passed, and so did the same with --all-features. cargo test --workspace was stopped after more than 20 minutes in darner-shader's tests (debug build): 18 test binaries had finished, all ok (3,281 tests); darner-shader had not finished and showed two failures (emit::waterfall_tests::sampled_marks_restore_early_depth_only_when_safe_in_pixel_shaders, emit::wave64_tests::lds_shared_atomic_add_producer_executes_wave32_on_hardware). This PR changes no file in crates/darner-shader; whether they fail on the base too is not checked.

Texture lag with the switch (Nyutt's reserve)

The 5 s queue line cannot tell a texture waiting on the layer from one waiting on the title's memory, so this uses the per-frame record (DARNER_BENCH_CSV). Hypothesis written before the runs: with 4 KiB placement the layer serves textures later. Same exe, DARNER_POOL_SMALL=0 against auto; each log says the decision of its arm; no row lost.

Standing, A B B A, 30 to 210 s after the world's first frame (5,443 to 5,624 draws a frame); noise is the larger spread inside an arm:

off on noise
tex_due_layer_late, median 78 78 4
tex_due_layer_late, mean 103.1 102.6 5.3
Frames after due at first serve, mean 0.96 0.95 0.01
Frames with tex_oldest_due_frames over 600 14.9 % 15.0 % 3.2
tex_due_title_late, median 0 0 0
Uploads a second 389 389 47
Card memory, nvidia-smi (MB) 9,948 7,508 40
Process private bytes (GB) 21.3 18.8 0.2
Average fps 30.0 31.3 0.5
1 % low (fps) 20.1 20.7 0.2

Drives, one run an arm (the game's autodrive from the same save, 690 s; each checked by a capture and by its moves; no rescue needed; 6 % fewer draws a frame in the on run). With one run an arm there is no noise figure: this only says whether the on run was later.

off on
City, 240 to 480 s: tex_due_layer_late, median 870 384
City: frames after due at first serve, mean 4.13 2.09
City: frames with tex_oldest_due_frames over 600 26.7 % 25.3 %
Whole drive, 60 to 690 s: tex_due_layer_late, median 97 96
Whole drive: frames after due at first serve, mean 2.55 1.60
Whole drive: frames with tex_oldest_due_frames over 600 20.4 % 20.9 %
City: average fps, 1 % low 21.6, 12.4 22.5, 12.9
Whole drive: card memory, nvidia-smi (MB) 10,587 9,968

No device-removed line in any of the six runs.

Result: on this card the hypothesis does not hold. Standing there is no difference in texture lag beyond the noise, and in the drives the on run was not later on any of the three measures. By eye: from what I saw while the various tests ran, no visual degradation caught my attention; any further report is welcome. What this does not cover: the card is not at its VRAM limit (about 10 of 12 GB without the switch). Nyutt's card was at its limit, with ray tracing and frame generation on, and that is where the longer wait and the worse-looking run were seen. That reserve stays open for a card at its limit.

This default may be a regression

We want to be clear about it: turning this on by default may be a regression for some players, above all on a card at its VRAM limit: the one run watched in that situation (Nyutt's) looked worse than his earlier runs. We are aware that if other users see a regression with this setting on, it will most likely have to be off by default again, whatever VRAM it saves, and the subject would then be looked at again. Please report in the issue #209 what you see with it, good or bad.

To run without it meanwhile: darner play ... --set DARNER_POOL_SMALL=0 (how the off arm above ran), or scripts\play-nvidia.ps1 ... -More @{DARNER_POOL_SMALL='0'} (from the script's source, not run). A DARNER_POOL_SMALL set in the window beforehand is cleared by both launchers (from the source). The default itself is the auto value in play.rs's table and in scripts/play-nvidia.ps1; setting both back to 0 is a small change (the two launcher lines and the README row) that I can send as a PR if you want it, with auto and 1 kept for testers.

Follow-up after the merge: answers to the review comments, corrections to the PR text, and what ran on the merged commits. Each line says how it was checked: a run in the game, a unit test, the source, or not checked. **Read this first: this default may be a regression.** Nyutt saw a worse-looking run and a longer texture wait with it on a card at its VRAM limit, a case our card does not cover. Our numbers below do not rule that out. If other users see a regression, the setting will most likely have to be off by default again, whatever VRAM it saves. Details in the last section. ## Answers - tyr0nsur (the `DARNER_HOT_AB` path read `auto` as on): fixed in aab9c4f6. The environment and the hot file share one decoding (`small_wanted`), with a unit test for both card cases. Thank you. - akimfomin (which textures are small; the check of both heads): the code comment, the README row and the PR text now say "most detailed level of 64 KiB or less; with its other levels a texture can be larger". Thank you for the size queries and the 30 cases. - Nyutt (the oldest due texture waited longer, one run looked worse): measured on our card below. Thank you for the runs on a card at its limit. ## Corrections to the PR text It was merged before I had corrected these. - "#59 ... the two fit together" is wrong against today's `main`. Checked with `git merge-tree`: #59's head (eefe0191) merges cleanly with this PR's base but conflicts with `main` (a361afed) in `scripts/play-nvidia.ps1`, in the comment lines above the settings line both touch. It resolves by keeping #59's four comment lines and its `DARNER_WINDOW_GROW...` line, then `main`'s two comment lines and its `DARNER_POOL_SMALL = 'auto'` line. Not built or run. - Series 3: the warm-up run never reached the world, so A1 was that exe's first run in the world (it loaded for 790 s). By `docs/ab-testing.md` it does not count. One A run is left (29.9 fps) against B's 30.5 and 30.8: no frame-rate claim stands on that series. Its card memory is not affected (9,886 MB against 7,489 and 7,390). - Series 4: B2 was another scene (7,925 draws a frame against 5,430 to 5,590). That run is out. - "This branch ... was built (normal and diagnostics)": when that was written only `cargo check` and the two unit tests had run on the branch. The build and the run in the game came later, below. - The flicker rows are the detector's counts (`DARNER_FLICKER_DETECT=1`), not a judgement by eye of the picture. ## What ran on the merged commits Exe: `main` 57dea7f2 plus this PR's three commits (head aab9c4f6) plus local bench scripts, diagnostics build. RTX 5070 12 GB, driver 621.47, Series S, DLSS Quality, frame generation off, ray tracing off. - Run in the game, RTX 5070, the launcher's default (`auto`), one run: the log says `small textures at 4 KiB steps: on (DARNER_POOL_SMALL=auto)`; card memory 7,620 MB (four runs of the same base without the switch the same night, another sitting: 9,854 to 10,011 MB); 29.4 fps, 1 % low 19.6 (those four runs: 28.5 to 31.2 and 18.7 to 20.8); no device-removed line. - Integrated AMD Radeon of the same PC (`DARNER_ADAPTER=Radeon`), one launch: the log says `adapter=AMD Radeon(TM) Graphics` and `small textures at 4 KiB steps: off (DARNER_POOL_SMALL=auto)`. The game then stopped with an access violation in the AMD driver (`amdxc64.dll`) while loading, with the switch off. So: the decision is the intended one on an AMD adapter; nothing is learnt about 4 KiB placement on AMD. - Gates on aab9c4f6 (`--locked --offline`): `cargo clippy --workspace --all-targets -- -D warnings` passed, and so did the same with `--all-features`. `cargo test --workspace` was stopped after more than 20 minutes in darner-shader's tests (debug build): 18 test binaries had finished, all ok (3,281 tests); darner-shader had not finished and showed two failures (`emit::waterfall_tests::sampled_marks_restore_early_depth_only_when_safe_in_pixel_shaders`, `emit::wave64_tests::lds_shared_atomic_add_producer_executes_wave32_on_hardware`). This PR changes no file in `crates/darner-shader`; whether they fail on the base too is not checked. ## Texture lag with the switch (Nyutt's reserve) The 5 s queue line cannot tell a texture waiting on the layer from one waiting on the title's memory, so this uses the per-frame record (`DARNER_BENCH_CSV`). Hypothesis written before the runs: with 4 KiB placement the layer serves textures later. Same exe, `DARNER_POOL_SMALL=0` against `auto`; each log says the decision of its arm; no row lost. Standing, A B B A, 30 to 210 s after the world's first frame (5,443 to 5,624 draws a frame); noise is the larger spread inside an arm: | | off | on | noise | | --- | ---: | ---: | ---: | | `tex_due_layer_late`, median | 78 | 78 | 4 | | `tex_due_layer_late`, mean | 103.1 | 102.6 | 5.3 | | Frames after due at first serve, mean | 0.96 | 0.95 | 0.01 | | Frames with `tex_oldest_due_frames` over 600 | 14.9 % | 15.0 % | 3.2 | | `tex_due_title_late`, median | 0 | 0 | 0 | | Uploads a second | 389 | 389 | 47 | | Card memory, nvidia-smi (MB) | 9,948 | 7,508 | 40 | | Process private bytes (GB) | 21.3 | 18.8 | 0.2 | | Average fps | 30.0 | 31.3 | 0.5 | | 1 % low (fps) | 20.1 | 20.7 | 0.2 | Drives, one run an arm (the game's autodrive from the same save, 690 s; each checked by a capture and by its moves; no rescue needed; 6 % fewer draws a frame in the on run). With one run an arm there is no noise figure: this only says whether the on run was later. | | off | on | | --- | ---: | ---: | | City, 240 to 480 s: `tex_due_layer_late`, median | 870 | 384 | | City: frames after due at first serve, mean | 4.13 | 2.09 | | City: frames with `tex_oldest_due_frames` over 600 | 26.7 % | 25.3 % | | Whole drive, 60 to 690 s: `tex_due_layer_late`, median | 97 | 96 | | Whole drive: frames after due at first serve, mean | 2.55 | 1.60 | | Whole drive: frames with `tex_oldest_due_frames` over 600 | 20.4 % | 20.9 % | | City: average fps, 1 % low | 21.6, 12.4 | 22.5, 12.9 | | Whole drive: card memory, nvidia-smi (MB) | 10,587 | 9,968 | No device-removed line in any of the six runs. Result: on this card the hypothesis does not hold. Standing there is no difference in texture lag beyond the noise, and in the drives the on run was not later on any of the three measures. By eye: from what I saw while the various tests ran, no visual degradation caught my attention; any further report is welcome. What this does not cover: the card is not at its VRAM limit (about 10 of 12 GB without the switch). Nyutt's card was at its limit, with ray tracing and frame generation on, and that is where the longer wait and the worse-looking run were seen. That reserve stays open for a card at its limit. ## This default may be a regression We want to be clear about it: turning this on by default may be a regression for some players, above all on a card at its VRAM limit: the one run watched in that situation (Nyutt's) looked worse than his earlier runs. We are aware that if other users see a regression with this setting on, it will most likely have to be off by default again, whatever VRAM it saves, and the subject would then be looked at again. Please report in the issue #209 what you see with it, good or bad. To run without it meanwhile: `darner play ... --set DARNER_POOL_SMALL=0` (how the off arm above ran), or `scripts\play-nvidia.ps1 ... -More @{DARNER_POOL_SMALL='0'}` (from the script's source, not run). A `DARNER_POOL_SMALL` set in the window beforehand is cleared by both launchers (from the source). The default itself is the `auto` value in play.rs's table and in `scripts/play-nvidia.ps1`; setting both back to `0` is a small change (the two launcher lines and the README row) that I can send as a PR if you want it, with `auto` and `1` kept for testers.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
5 participants
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
TrustNo1/Darner!151
No description provided.