Repository navigation
GPU: wait for in-flight writes from aliased copies, read-backs and late writes (#89) - #191
Open
gdawid9407 wants to merge 1 commit into
Open
gdawid9407 wants to merge 1 commit into
gdawid9407 wants to merge 1 commit into
Conversation
This was referenced Nov 24, 2026
RicerBoy
added a commit
to RicerBoy/DropItLikeItsHot
that referenced
this pull request
Nov 24, 2026
… writes from aliased copies, read-backs and late writes (#89) Part of #16
VlREX
added a commit
to VlREX/victory-fork
that referenced
this pull request
Nov 25, 2026
…B testing Original contributions: gdawid9407 (fxceless#191) and AscilCH (fxceless#206, fxceless#207). Preserve credits and source commits in docs/virex-world-geometry-recovery.md. Resolve overlapping host hazard checks without changing upstream PRs. Native validation pending; AI-assisted integration.
VlREX
added a commit
to VlREX/victory-fork
that referenced
this pull request
Nov 25, 2026
[Integration test only] World Geometry Recovery: combine fxceless#191, fxceless#206, fxceless#207
triippywhale
pushed a commit
to triippywhale/victory-fork
that referenced
this pull request
Nov 25, 2026
…te writes (fxceless#89) (cherry picked from commit 1582757) Ported from fxceless#191 (conflict in the relay tests' imports only). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017V7WBDcuSkQXqyyY47pR31
triippywhale
pushed a commit
to triippywhale/victory-fork
that referenced
this pull request
Nov 25, 2026
…one host copy per placed texture (upstream c96b4f2, without its depth bounds) Ported from fxceless/victory-fork c96b4f2, leaving out its depth bounds test (fxceless#82): this fork has its own (0a82121), and where they meet (pipeline/host.rs, list.rs, draw.rs, host.rs) the fork's is kept. - Defaults: wide copy-back, card copies from 1 MiB up to 1,024 MB, and 256 lists in the air (VICTORY_WIDE_BACK=0, VICTORY_CARD_BUFFERS_MIN_MB, VICTORY_CARD_BUFFERS_MB, VICTORY_LATE_WAIT_LISTS=128 give the old values). The relay stays off by default on this fork (fxceless#191 is still open): VICTORY_RELAY=1 or 2 turns it on, and with it on, stage 2 is the default stage as upstream has it. - Textures picked by index are uploaded while loading and before a draw of the title's decoration bake (VICTORY_EARLY_TEXTURES_MS, VICTORY_BAKE_TEXTURES_MS; 0 turns each off). - Placed textures are keyed without the filler words of their description (VICTORY_PLACED_FILLER=1 keeps the old key); the count of such twins is logged by diagnostics builds only. - VICTORY_TEXTURE_ROOM_PERCENT (90, unchanged). (cherry picked from commit c96b4f2, in part) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
triippywhale
added a commit
to triippywhale/victory-fork
that referenced
this pull request
Nov 25, 2026
…d of waiting With flights in the air, a submission that refreshed a host copy over bytes another host copy's shaders were writing in a flight waited for that flight to land (88897be, fxceless#191: "title memory read … another copy" on the line of flights). In the PalmVI run (main 5493624, RX 7900 XT) that was about 3 settles and most of 66 ms a frame, with the card about 40% busy while the submitting thread stood. The bytes are already on the card, and the flight's submission comes first in the queue. Now such a refresh does not wait: a list of its own, sent just ahead of the submission's lists, copies each range from the writing copy's buffer into the refreshing copy's, in queue order, as 3d87249 passes what shaders wrote to card copies down in the submission that wrote it instead of fetching it afterwards. It is exact only where title memory over the range is still what the writing copy's snapshot took when its flight declared the write (Shadow::snapshot_is_title): then the writing copy's buffer holds what title memory will hold once the flight is copied back. Anywhere else (the title wrote there since, no snapshot, a read-back, bottom-of-pipe writes, two writers, the refreshing copy's own shaders writing there too, a copy in the card's memory or in place, more than 64 MB to compare) it waits as before. If no list can be had, the flights are settled and the bytes go from copy to copy on the CPU. VICTORY_ALIAS_FORWARD=0 waits as before. A line beside the line of flights counts the refreshes that took bytes on the card, their ranges and MB, and those that still waited. Test: a_forward_takes_another_copys_bytes_on_the_card (on the host GPU): the card copies the range and nothing else; the snapshot check holds only where the snapshot is the title's bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I checked two ordering cases on
The replay cases are Prepared with the help of Codex 6.2 Astra Max. |
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.
Problem
Under
VICTORY_RELAY=2(relay_exact),submitonly waits onWHY_READuntilblocked_byclears for the current submission's CPU-side reads:blocked_byignoredStep::Refresh(shadow, address, len). Refreshing the sameShadowthat declared an in-flightGpuWriteneeds no wait (its GPU buffer receives the write in queue order andShadow::updateskipspending), but refreshing a differentShadowcovering overlapping title addresses (e.g. a 4 MiB loose window vs an 8 MiB window, or a sub-buffer vs an enclosing heap buffer) reads title CPU memory before the writing flight's copy-back has landed — matching the missing skinned meshes and overlapping subtitle vertices reported withVICTORY_RELAY=2in RTX 5070 Laptop (8 GB, default TDR) on 4e17478: 20 min stable, but VICTORY_RELAY=2 causes missing character skin and overlapping subtitles (clean without relay) #89.read_backs(deferred().backs) andLate::Writeitems (in_hand/line) were not checked byblocked_by(while keepingLate::Writeout ofline.writtensolate_metstill evaluates knownWritten::Valuewrites without unnecessary settles).Changes
by_copy, keyed byShadowpointer or0for texture read-backs) alongsidewritten, plusLine::immed_writesfor pending/landingLate::Writeranges.Step::Refreshinblocked_byiff the refreshed range overlaps an in-flight write from a differentShadowcopy, a texture read-back, or aLate::Write(counted inLATE_STATSasanother copy).relay_tests::refreshes_wait_only_for_writes_from_another_copy_or_readback.