Skip to content

Notes from a second RTX 5090 and opt-in small-buffer residency - #1

Merged
ThomasHFWright merged 6 commits into
ThomasHFWright:mainfrom
OctoAlgo:notes-from-a-second-5090
Nov 26, 2026
Merged

ThomasHFWright merged 6 commits into
ThomasHFWright:mainfrom
OctoAlgo:notes-from-a-second-5090

Conversation

@OctoAlgo

Copy link
Copy Markdown

Hi @ThomasHFWright, congrats on walking the cell and talking to an NPC with a controller, and thanks for the Marvisak#1006 credit. Our setup is very close to yours (and we've played through the prologue into Chapter 1 on it): RTX 5090 (plus a 5070 Ti), CachyOS, NVIDIA 620.73.04, Proton 11 / GE-Proton 11-14. Here is what helped us that I couldn't find on main yet. It's docs plus three small opt-in kit patches. Feel free to take any part of it, or none.

Docs (docs/linux-notes-5090.md):

  • Biggest one first: VICTORY_CARD_BUFFERS_MIN_KB=64 with VICTORY_CARD_BUFFERS_MB=1536 puts all title buffers' copies in the card's memory, not just those of 1 MiB or more. On our 5090 it gave +33.5 % (6.14 → 8.19 FPS, ±6.4 %): waiting for the GPU went from 60 to 23 ms and copy-back from 90 to 62 ms. Keep 1536; with 1024 it was about 50 % slower. Your renderer has CARD_BUFFERS_MB but not MIN_KB, so it's the third kit patch (from fxceless's c36971b). One caveat: 4 of our 17 runs came up with a dark cell and very few shader lookups, with the switch on and off. We haven't found the cause, so please check the picture.
  • View-tree wineserver (CachyOS/wine-cachyos#50): it's the same idea as your indexed server. On stock Proton 11 it cut world loading from 118–131 s to 69 s, and the cutscene after loading went from 2.3 to 4.9 FPS. Steady FPS stayed the same.
  • The 0x5149aec stop on new games is the title's own pool-empty int3 during the intro's prestreaming (all 45,000 instance slots full, VIctory#698). A save made after the intro avoids it, which matches what you found.
  • VICTORY_TEXTURE_BACK=1 (fork#999) fixes the sinking boat in Chapter 1. The pre-migration linux-edge tree has it, but the PR995 renderer doesn't.
  • Ambient tint 1,0.6,0.4 (Runtime knob to write bytes into a loaded module (VICTORY_PATCH=<module>:<rva>:<bytes>) Marvisak/VIctory#917 + Belobug) matched the PS5 reference at the cell window for us.
  • Fork-main frame-rate switches, measured on our 5090: CARD_HASH_WIDE +6.7 % and TABLE_STAGES +7.1 %. Together with CARD_BUFFERS_MB=1536, DYNAMIC_SLOTS and BACK_QUIET they gave +15.8 % (5.68 → 6.58 FPS; the noise range is ±6.3 %).

Kit patches (all off by default; they go on top of the source that build.sh leaves):

  • back-quiet.patch.txt: VICTORY_BACK_QUIET=1 from fork#1188 by Yorivel. The copy-back's own writes stop counting as title writes. BitWuehler measured 122 → 51 ms CPU preparation on GE-Proton with a 5080.
  • dynamic-slots.patch.txt: VICTORY_DYNAMIC_SLOTS=524288. It makes room for more dynamic view slots under NVIDIA's 1,000,000-slot heap cap. The idea is trustno1-coder's, from trustno1-coder/VIctory-NVIDIA@a9632bc.
  • card-buffers-min-kb.patch.txt: VICTORY_CARD_BUFFERS_MIN_KB=<KiB>, see above.

Tested (RTX 5090, Xvfb, release build of build.sh's source at 438872d (7406afb + candidate, upstream, next and followup patches) + these three patches, your preset, our story save):

  • Both runs reached the cell and ran for the full 12 minutes, each with 0 NVIDIA Xid, no device loss and no title breakpoint.
  • All three switches on (BACK_QUIET=1, DYNAMIC_SLOTS=524288, CARD_BUFFERS_MIN_KB=64, CARD_BUFFERS_MB=1536): 4.91 FPS over world frames 300–600. All three logged that they were active. Copy-back wrote 1.29 M stretches quietly, 3,848 buffer copies went to the card's memory (98 without the switch), and the dynamic ring held 499,999 slots.
  • Same binary with nothing set (your defaults): 4.34 FPS.
  • That's +13 % for the set on your renderer: copy-back went from 84 to 61 ms a frame and CPU preparation from 88 to 75 ms. This is one run each. The switched run paid for the cold shader translations and still came out ahead, so the gain is if anything understated. Xvfb also waits on the GPU longer than a desktop, so absolute FPS there runs lower than yours (your 3.57 FPS window is a different camera and workload).
  • These runs used your preset from before HEAP_SLOT_CACHE=1 was added. We didn't take screenshots, so please check the picture.

Faces: on our stack, faces render fully: Lucia's close-ups in the diner and bar have skin, eyes and a closed jaw. We haven't bisected which piece matters, so these are only candidates, not a verified cause. Here's what our tree has that the PR995 renderer doesn't:

CARD_HASH_WIDE and TABLE_STAGES were too big to port onto the PR995 renderer cleanly, so they're only in the notes. We also have our own rework of the host descriptor heap's lock (one global lock split into striped per-slot locks, so the heap sync can run on several threads: +8.3 % ± 3.8 % for us), but it's written against fork main, not the PR995 renderer. Happy to share it if it's useful.

Is there anything specific you'd like us to focus on? For example, a problem you're stuck on that we could test on our 5090 + 5070 Ti CachyOS setup. No pressure either way.

(Investigated with an AI coding assistant; all numbers are from runs on our PC.)

🤖 Generated with Claude Code

OctoAlgo and others added 4 commits November 26, 2026 10:18
Copy-backs into write-watched title memory reset the pages' write-watch
bits afterwards, so the layer no longer takes its own output in again
as a title write. Off by default. Applies to the finished three-PR
source that build.sh leaves; one conflict against the candidate's
writing_exact path was resolved by keeping writing_exact.

Original: Yorivel, fxceless/victory-fork#1188
(fork commit 0460bf535).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a host that caps the view heap (NVIDIA: 1,000,000 slots for the
title's 1,245,184), VICTORY_DYNAMIC_SLOTS=<n> gives the dynamic-slot
ring n slots (2^18 up to half the heap), taken from the title's slots
kept in place; the allocator's bitmap, free count and wrap follow the
heap's own count. Unset: unchanged.

Idea and first implementation: trustno1-coder,
trustno1-coder/VIctory-NVIDIA@a9632bc
This version: OctoAlgo, adapted to the candidate's single `kept` lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VICTORY_CARD_BUFFERS_MIN_KB=<KiB> sets the least size of a title buffer
whose host copy lives in the card's memory below the 1 MiB floor of
VICTORY_CARD_BUFFERS_MIN_MB (64 = every buffer). The copies under 1 MiB
are thousands of small buffers that shaders load, store and do atomics
on over the bus. Unset: unchanged. Logs one line when set.

Original: fxceless, fxceless/victory-fork commit c36971b
(the card_limits part only; its placement counters are not ported).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured results from another CachyOS + RTX 5090 setup: small buffers
in the card's memory (CARD_BUFFERS_MIN_KB=64, +33.5 %), the view-tree
wineserver (CachyOS/wine-cachyos#50 by ajsem1337, after neonbyte1),
the title's pool-empty breakpoint on new games (Marvisak#698),
TEXTURE_BACK for the Chapter 1 boat (fxceless/victory-fork#999), the
ambient tint that matched the PS5 reference, and frame-rate switches
measured on fork main (fxceless/victory-fork#1014, Marvisak#1188, 5d659e0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ThomasHFWright

ThomasHFWright commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Thanks for testing the PR995 kit and for offering to help. We reproduced the residency change on our RTX 5090 with indexed GE-Proton 11-14. With a 1536 MiB copy budget and the 64 KiB floor, the run peaked at 3,726 GPU-resident buffer copies and measured 3.24 FPS across 300 presents after the initial world load. The default 1 MiB control on the same binary, checkpoint and 1536 MiB budget measured 2.61 FPS and peaked at 98 GPU-resident copies. The observed difference was +0.63 FPS (+24%) across presents 301–600 after the first world shader bind. The 64 KiB run was slower in the first 90 seconds after the bind. The two runs showed the same cell and progressed through different camera views in the sample, so the full 0.63 FPS difference cannot be isolated to this setting. We're keeping the default at 1 MiB. Your 6.14 to 8.19 FPS result was measured on the separate fork build.

The revised kit applies the small-buffer setting through the existing locked build and keeps the current default. We reproduced the README's relative patch-path failure. The two other patches exposed correctness issues in this renderer. The larger ring reassigns some title indices that shaders can still read directly, and the quiet copy-back's write-watch reset can erase a concurrent title store. We're keeping the original measurements with their configuration and testing the small-buffer change on its own.

On our PR995 face tests, the eyes and teeth render but the cheek surface is still missing, and the hair is bundled. We've built the full Marvisak#854/Marvisak#993 pairing on the pinned 46bf535 base. A source-only branch for the build that rendered complete faces, or the exact patch order and conflict resolutions, would help us reproduce your result. The launch flags and scene or checkpoint description would also be useful, especially with Marvisak#938, Marvisak#1002 and Marvisak#927 in the mix.

@ThomasHFWright ThomasHFWright changed the title Notes from a second RTX 5090 + three optional frame-rate patches (small buffers on the card: +33 % for us) Notes from a second RTX 5090 and opt-in small-buffer residency Nov 26, 2026
@ThomasHFWright
ThomasHFWright merged commit d7bd5f1 into ThomasHFWright:main Nov 26, 2026
@ThomasHFWright

ThomasHFWright commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

We tested both public tips of your renderer repo from source on the RTX 5090 with the same offline GE-Proton 11-14 checkpoint.

  • Public main at 3973179 hit NVIDIA Xid 109 during world loading, then the title exited after a null-write access violation.
  • Code-table branch at 4e7af7b reached the movement and cellmate interaction prompts on a black scene. It ran about 7½ minutes without a logged driver fault. The log recorded six Wave64 pipeline rejection messages, and no character or room rendered in the captures.

We also tested our local reconstruction of the newer 46bf535 stack. All four compute pipelines we had previously seen rejected for Wave64 were eventually created. The window stalled during loading after an Xid 13 memory fault. Neither experiment reached a shot where we could assess facial skin or hair. We’ve returned to the playable LinVxtory checkpoint renderer. Your source-only face build or exact settings would still be useful for comparing these results.

Follow-up on LinVxtory: we tested the early-depth change from fxceless #907 on our playable renderer. The replay reached the cell. In comparable window shots, both builds still showed a cheek gap, bundled hair and a brief hair smear on entering the cell.

The later CBV work in #1316 pointed us to a separate reproducible issue. On the 5090 under Proton, a synthetic title list split at a real wait kept reading the first part's CBV selector after a deferred write changed it. Rebuilding constant-buffer tables after the split fixed the readback. The isolated fix completed a 7½-minute replay on our RTX 5090 under GE-Proton 11-14 without a logged driver fault. The cell, wire mesh and yard rendered, and a close-up still showed exposed eyes and teeth, missing cheek and jaw surfaces, and bundled hair. The run averaged 4.37 FPS from 180 to 330 seconds after the first world shader bind versus 2.61 FPS in the earlier control. The reboot and differences in camera timing prevent attributing that gap to the fix.

@OctoAlgo

Copy link
Copy Markdown
Author

Thanks for testing all of that, and sorry for the detour. OctoAlgo/victory-fork is only our pull-request fork: its main is an older copy of fxceless's main, and the other branch holds a single PR. Neither is the build that renders faces. We've now put that build up as a source-only kit: OctoAlgo/inkVI (GPL-3.0, no binaries or game data).

What it is: victory-fork main at ceb9e1f7a plus 39 patches in patches/series, each with its source PR, author and licence. build.sh fetches the base, checks the patch hashes, applies the series and builds release + diagnostics. The launch flags are in launch/README.md, and the speed preset is launch/speed.env.

Faces: we checked this today with exactly this series and preset, on our RTX 5090 under Proton 11. In two cutscene close-ups of Lucia (in the canteen and by the cars), cheeks, jaw, ears and hair are all complete. One frame at world frame 6 still had a black-skinned NPC while textures were streaming; fork main e4245f3c1 fixes exactly that case and will be in our next base. We haven't bisected it, but these are the face-related patches, in order:

The face runs did not use DYNAMIC_SLOTS, so the larger ring isn't needed for faces.

Your two correctness points: you're right on both. DYNAMIC_SLOTS is opt-in only now, and BACK_QUIET is out of the preset; docs/known-issues.md explains why. The README path bug from our PR: the working form is git -C "$src" apply "$PWD/docs/pr995-candidate/<name>.patch.txt".

Scene: the prologue checkpoint in the prison. One thing that cost us a run: holding A (or a repeated Enter) skips most cutscenes, so press it only on the start screen if you want the close-ups. If the cell comes up dark, the first lighting passes were dropped because of a cold pipeline cache. The preset's VICTORY_PIPELINE_WAIT_FIRST_MS=5000 lets the first draws wait for them instead (see known-issues).

Your CBV-after-split fix looks important. We'll check whether our stack reads the stale selector too.

What we're working on next, so we don't duplicate effort (happy to adjust if you're already on any of these):

  • Frame time on the submitting thread: write-watch spans under Proton (GetWriteWatch cost grows with the span, so our 8 MiB "ask ahead" grouping backfires on Linux), batched guard openings, and the heap sync working on dirty 4 KiB pages only.
  • The cold start: why the pipeline library loads only part of the early pipelines (the wait above fixes the picture; we'd like it fast as well).
  • Ray tracing on NVIDIA: the structure builder (Linux: run under Proton, and fix the world GPU faults Marvisak/VIctory#994) hangs before world frame 0 on our 5070 Ti (CPU in ntsync waits, GPU idle). We're checking whether it's a queue/fence cycle or the 16 GB.
  • A 32:9 ultrawide patch as its own small kit.

If faces, hair or anything else is what you're focused on, tell us and we'll stay off it, or test it on our 5090 + 5070 Ti.

(Investigated with an AI coding assistant; all numbers and pictures are from runs on our PC.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants