Repository navigation
Conversation
refresh_direct_srvs merged only overlapping ranges. In the world most directly indexed SRVs are small and close together without overlapping, so each became its own Shadow::update with its own write-watch query: about 900,000 per world frame. Also merge a range of the same buffer that starts in the page where the previous one ends, or at its end. The bytes between them are under a page, and update still leaves out ranges shaders may be writing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for measuring. One thing to separate: your comparison is #185 + this PR against neither, since this one is stacked on #185. The per-view watches you see come from #185's refresh of directly indexed SRVs, one write-watch question per range before every submission; this PR merges ranges that share a page, so it lowers that count rather than adding it. With #185 in both builds (RTX 5080, proton-cachyos / vkd3d-proton 3.2.0, Series X, world frames), this PR took direct SRV ranges from 862,000–929,000 to 280,000–290,000 per frame and frames from 5.0–6.2 s to 2.4–4.2 s, as in the description. What you measured is still real: under Wine each of those questions is expensive, so #185 makes loading and world frames much slower there. I'm working on that next: asking once per buffer and submission for the written pages over the span its ranges cover, instead of once per range. In a synthetic test (8 views into one watched buffer) that is 1 question per submission instead of 8, and #185's coherency tests still pass. It is being measured in the world now; I'll link it here with numbers once it holds up. Over several allocations it relies on #515 (asking per allocation when a span covers several). AI-assisted (Claude Code). |
|
Follow-up to the above: the per-range questions you measured are in draft #600 now. It asks once per span of title memory instead of once per range, across host copies (most ranges are in different small buffers, so per-buffer grouping alone did not help). Same stack with and without it, write-watch questions per frame: menus about 3,500 → 223, loading 3,500–6,400 → 900–3,600, world 165,000–184,000 → 80,000–162,000. The world gains little so far because most of its ranges reach the title's GPU heap of physical-page views, which cannot be write-watched and still go one by one; that is the next step, described in the PR. AI-assisted (Claude Code). |
Resolves the overlap in refresh_direct_srvs: Marvisak#462's page-sharing merge condition in this branch's loop, and both PRs' tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Closing in favour of #185 as it is now: its later commit AI-assisted (Claude Code). |
…d there A fresh descriptor table's constant buffer was filled into the list's upload memory from title memory on the CPU at the submission, unless it lay where shaders had been seen to write (VICTORY_FILL_HOT / VICTORY_FILL_DIRECT). A fill reads title memory behind every flight that may write it. Now a constant buffer that lies in a title buffer's host copy in the card's memory, 256-byte aligned there, is bound to that copy, as the hot ones are: the copy takes the title's bytes before the submission's lists run, so the draw sees them and what earlier lists wrote, from the card's own memory. Only a copy that is there already is taken (shadow::existing); none is made for it. Measured by the source line only on an RTX 4070 with the Series S profile (realblastex/flamingo run 41: 10.7 -> 11.1 frames a second, no fill waiting for the card); not measured here. On by default as the hot case is; VICTORY_CARD_CONSTANTS=0 fills them as before. README: the table in "Faster settings". Source: theinkbit/victory-lot9-next ffd04e130 (also crt4ever/ DumbFloridaMoron 40acb8854); fxceless/victory-fork PRs Marvisak#462 / Marvisak#522 solve the relay's form of the wait, which our tree does not run by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stacked on #185 (its two commits come first); review that first.
Problem
#185 refreshes the live directly indexed SRV ranges before each submission, merging only ranges that overlap. In the world most of them are small and close together but do not overlap, so each becomes its own
Shadow::update, with its own write-watch query: about 900,000 updates per world frame here, which took 7–8 s of each frame to prepare.Change
refresh_direct_srvsalso merges a range of the same buffer that starts in the page where the previous one ends (or at its end). The bytes between them are under a page;updatestill leaves out ranges shaders may be writing.Measured
RTX 5080, Linux (proton-cachyos, vkd3d-proton 3.2.0), Series X 1.0.2.1. Diagnostics build of
maind2a4bae+ #185 + #436 + #440 + #259, #177, #151 (needed to reach the world here), one run with and one without this change, Enter into story mode at about 35 s, first 1–2 min in the world:More bytes are copied: a merged range also covers the gaps between views, and a merged range whose write-watch query fails (it reaches uncommitted private memory) is copied whole. That case is a follow-up: the failing ranges start in reserved, uncommitted pages of otherwise watched buffers.
Related
refresh_direct_srvsresolved there.updatechecks.main.Tests
New
directly_indexed_srvs_in_one_page_refresh_as_one_rangein #185's coherency tests: 16 small SRVs in one page refresh as one range and each still reads its own value; it fails without the change (16 ranges). All 9 coherency tests pass on the GPU (vkd3d-proton,VICTORY_PC_DXCset).AI-assisted (Claude Code).
🤖 Generated with Claude Code