Repository navigation
1.0 - #782
Open
pug205gti6 wants to merge 11 commits into
Open
1.0#782pug205gti6 wants to merge 11 commits into
pug205gti6 wants to merge 11 commits into
Conversation
Contributor
|
I looked through this and I think it needs splitting before it can be reviewed properly. Most of the diff is formatting. I ran What I found in those 8 files:
The PR has no description, its title is "1.0", and CI hasn't run. My suggestion: drop the formatting, rebase on |
…k in one call Two costs of the paths a26859f added, on a 3840x2160 window with a 2522 to 4394 draw world frame (RTX 3080, Windows 10, release build). 9376fd6 already took the third (the fingerprint), so that is not here. 1. sync_heaps walked the 1,024 to 2,048 records of every page the kernel called written: 300,000 to 485,000 records a frame, of which 12,000 to 20,000 were new. The kernel marks a page written even when the title put back the bytes it already held, so most of that walk found nothing. The page's bytes are now compared with the ones last read (64 KiB, a few microseconds) and the page's records are skipped when they are the same. 2. copy_back_with wrote every run of changed bytes through the kernel on its own: 53 to 75 MB a frame in runs a handful of bytes long, at 3 to 4 ms/MB. The runs of one copy are contiguous, so they and the gaps between them (the title's bytes as read, so putting them back writes what is already there) now go back in one write per copy. Measured, same scene band (2400 to 3200 draws/frame), medians of the frame lines, before and after: | | before | after | | --- | --- | --- | | frame | 815 ms | 364 ms | | preparing, copies | 123 ms / 191 MB | 71 ms / 194 MB | | copying back | 216 ms / 64 MB | 210 ms / 62 MB | The first change is what moved the frame; the copies fell with it (fewer slots left stale, so less to refresh). The second did not move the copying back figure on its own — the one-write form lands in the same 210 to 256 ms band, so the time there is not the write call itself. It is here because it is fewer syscalls over the same bytes, not because I can show a win from it, and it can be dropped without touching the first. Honest limits: the run drifts through the prologue, so the bands are medians of 2 to 4 frame lines at matching draw counts rather than a fixed camera, and the later runs had a warm shader cache. Two things the fork needs on Windows 10 to run at all, not part of this PR: the app-local Agility SDK runtime (without it the title dies at +0xb5a5f8 on the in-box runtime) and the keyboard stand-in pad fix from upstream fxceless#729 (with an XInput keyboard such as a Wooting the title otherwise gets no input).
…e, and write a copy back in one call
…E_TEXTURES=1) While the world streams in, a submission checks hundreds of textures one after another on the submitting thread: each is read, hashed whole and, when it changed, detiled into its staging buffer. With the switch the checks that come due in a batch are queued (Batch::textures_due) and run at its next flush, before a step that writes title memory and before the lists run, so their order against those steps is unchanged, on the threads kept for the snapshots (shadow::wide_run). Each check reads its texture's title memory and writes its own staging buffer and notes under its own lock, and a texture is queued once per batch (texture_due), so no two threads check the same texture. The frame line's "textures" counts the time it took, not the threads' sum. Measured on the opening cutscene and the first world minutes (RTX 3090 Ti, 8dd30ab, same binary, one launch each): default frame ~1,030 ms, textures ~330 ms VICTORY_WIDE_TEXTURES=1 frame ~826 ms, textures ~120 ms VICTORY_TEXTURE_NO_WAIT=1 frame ~654 ms, textures ~44 ms both frame ~518 ms, textures ~16 ms Steady state after streaming: 4.0-4.3 fps in all four. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017rHNfuPpCyeMjHxWTEyhiQ
… commit headroom is low
… a page and a cheap fingerprint sync_heaps looked at about 180,000 slots a frame in the world, and for each took the heap's fingerprint lock and hashed its 32-byte record with BLAKE3: 35.6 ms a frame on an i5-12400F (its own counter), the frame about 20 ms longer than with VICTORY_HEAP_SYNC=0. The slots of a page are now compared under one lock, and the fingerprint is four multiply steps (each a bijection of the state, so records one word apart never share one). What is mirrored, and when, is unchanged.
…S=1, or VICTORY_PROBE_PIPELINES) With residents on, every bound slot was checked against its view's copy (HostHeap::shows takes the heap's lock, once per view of every draw), and every view set the +R/+W/+S tag bits, in every build and run. These are measuring tools; they now run only with VICTORY_DRAW_PROBES=1 or when VICTORY_PROBE_PIPELINES names pipelines. Off, the residents' line counts no mismatched slots (0).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.