Repository navigation
Draw: a held slot does not walk the pages first (part of #1521) - #1877
Open
unueberlegt wants to merge 1 commit into
Open
unueberlegt wants to merge 1 commit into
unueberlegt wants to merge 1 commit into
Conversation
The pass over the textures picked by index walked a placed view's pages (VirtualQuery, whole textures at a time) before it asked whether the card's fullness holds the slot: held ones threw the answer away. The held decision is made first now, and held ones are counted where they skip the walk (HEAP_TEXTURES_HELD_SKIP, in the 5 s line). What changes besides the order: a held slot that streamed out is told Held without the walk (it was told Away), and its host copy is not let go until a pass with room walks it again — about four seconds, or as soon as the card has room. Point 4 of trustno1-coder#1521; the issue's other three are covered by 0174844 (the shadow copy state lock, merged) and the open trustno1-coder#614, trustno1-coder#1133, trustno1-coder#1556, trustno1-coder#1637. Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Tested on 9800X3D + RTX 5070 Ti 16 GB across 20+ min sessions (including under heavy texture churn). Skipping VirtualQuery on held slots ran cleanly with zero faults or stale views. |
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.
What it changes
The pass over the textures picked by index (the heap's buffer views and friends) walked a placed view's pages with
mapped_bytes()— VirtualQuery over whole textures — before it asked whether the card's fullness holds the slot. A held slot's answer (nothing mapped, or mapped in part) was thrown away: the slot is toldHeldand looked at again in about four seconds, or as soon as the card has room.Now the held decision runs first (it needs only the view and
texture_slot_made_from), and a held slot never walks. A counter (HEAP_TEXTURES_HELD_SKIP) in the 5-second line says how many slots skipped the walk:Behavior delta (said plainly)
Under
!room, an ineligible slot that streamed out is now toldHeldinstead ofAway— the walk was the only way to see that its memory is gone, and held slots do not walk.texture_slot_gonefor such a slot runs on the next pass with room (the slot's tell re-checks then); nothing leaks, the host copy's bytes are still resident.Why
Point 4 of #1521: on a full card the walks cost 87–281 ms of every 5 s plus recording-thread lock contention behind
mapped_bytes. On our machine (RTX 5070 12 GB, Ryzen 9 9950X3D, 31 GB, Series X 2560x1440, prologue) the pass stands under!roomalmost constantly: 3,716,941 held slots skipped the walk in one ~10-minute run (and 3.4M in a second). The skip is the pass's own answer: its walk exists only for slots that go up.How it was tested
cargo testpassed for the crates it touches:victory-gpu590 passed / 0 failed (and 644 with--features diagnostics);clippy --all-featuresat the base's warning count (10, none new).held_for_fullness_with_nothing_going_up_is_said_before_the_walk(the held predicate over a room/made/reupload/first-room/window matrix).Checked for overlap
draw.rsor the texture pass. 0174844 (the shadow copy state lock) is merged and takes Reduce lock/atomic contention on the ~88% no-op refresh fast path (21.3 ms/frame on 8-core CPU, GPU 52% busy) #1521's second point.The other three points of #1521 are left to those PRs and 0174844; this one takes the fourth.
🤖 Generated with Claude Code