Repository navigation
Conversation
…ies on HostList::reset
|
Tested on Windows 10 (i5-13600K + RTX 4080 16 GB, Series X) as part of a 7-PR stack (#1014 + #1015 + #1029 + #1043 + #1044 + #1058 + #1059) on
Note this run measured #1059 bundled with the 6 other PRs rather than standalone. AI-assisted benchmark and analysis (Gemini 4 Hydrogen). |
|
Tried this together with #1068 on Windows, RTX 5080 + 7800X3D, tree is ca8829f + #1043 + #868 (SKIP_WC_BACK=1), RELAY=2. Two runs to world+800: 100.7 and 96.6 ms median against 102.8 ms before on the same base. Small, and close to my run-to-run noise, but both runs were on the right side. Picture at world+250/+400 unchanged, no device loss. One note if anyone else has #812 (view sets) in their tree: the open_here hunk conflicts, and the alias-guarding run uses view_known()/viewed which aren't there anymore. I marked the run's blocks unclean/clean the same way the single-block paths do and it built and ran fine. |
|
Windows/RTX 4070 in-game data point for the Flamingo downstream that includes this change. This is the Flamingo main commit A fixed view toward the window for 120 seconds produced 915 measured presents: 7.84 effective FPS, P50/P95 123/169.3 ms. Median host metrics were 67.0 ms preparation, 38.1 ms copy-back for 38.4 MB, 33.3 ms inspecting 13,612 buffer slots, and 4,012 draws/frame. Raw descriptor synchronization was 19.7 ms median over 110 reports. For context, an earlier |
DoubleD17
left a comment
There was a problem hiding this comment.
Independent synthetic API check for the read path in 62de6c06b4da48f5ecc2b712653d40a44bf0a884 on Windows x64 build 26300 (AMD Ryzen 7 5800X). I used two adjacent 4 KiB pages in the current process, with a known byte pattern in the first and PAGE_NOACCESS on the second. I modeled the PR's success predicate and 64 KiB/4 KiB fallback in a standalone fixture. Read path at this SHA
Both APIs read all 4,096 bytes from the readable page. The 8 KiB read crossing the boundary returned 0x8000000D (STATUS_PARTIAL_COPY) and zero bytes with NtReadVirtualMemory, and Win32 error 299 and zero bytes with ReadProcessMemory. Splitting the failed read and zero-filling unreadable pieces reproduced the first page byte for byte and zeroed all 4,096 bytes of the second page with both APIs.
This exercises the native API and fallback assumptions on one Windows build. The fixture ran independently of the PR binary and did not measure performance or cover protection batching or deferred resets.
AI-assisted.
Flamingo's commits since 7ca2674, applied three-way on top of fork main 085ee7c (merged just before): - 4825fda: fewer VirtualProtect calls and kernel reads (victory-fork fxceless#1059); the write watch lists only pages newer than the caller's; stale copies of title memory by address retired; placed texture UAVs mirrored; the in-picture fps box off by default (F9's overlay shows the rate). Its console_insn removal is already here. - 63d976b: the ray-tracing memory directory holds 4095 copies; storing dispatches can write back only the copies they name. - 11ed9aa: from Flamingo pull request fxceless#4: the discrete GPU on laptops, big textures hashed on several threads, and more. - 866d277: a logging build for problem reports (flamingo-log.cmd). - ffd778e: textures DirectStorage just wrote are uploaded right before a decoration bake. Fixed in the merge: two DirectStorage uses of a read's options (the fork moved them into the request), and a collapsible `if` in fork main's new pipeline-library code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SEGb51RnUN5wf49ozEtinL
… reads by NtReadVirtualMemory with VICTORY_NT_READ=1 (after upstream fxceless#1059) From fxceless#1059 by @UwUCammie ("GPU: coalesce VirtualProtect runs in watch.rs, use NtReadVirtualMemory in host::read, and reuse Deferred capacities"), the parts that fit our tree: - `watch::open_here` gives back each run of blocks that follow one another with one VirtualProtect, and block by block if the run is not one region (two views, or a placeholder and a view). Each block's notes (clean and known-view bits) are kept as they were. Same end state: no switch. Counted: the guards line gains "N blocks opened in N calls". - `HostList::reset` clears its steps (`Deferred::clear`) instead of putting a new `Deferred` in, keeping the collections' room. Same state: no switch. - `host::read` reads with NtReadVirtualMemory with VICTORY_NT_READ=1 (off by default, read once per process; upstream put it under the on-by-default VICTORY_DIRECT_WRITES). One log line when on, and a per-frame line "title memory reads per frame by NtReadVirtualMemory (VICTORY_NT_READ=1): N, and N that found a page missing". Skipped: the coalescing of the guarding of other views of a page (`protect`). Ours is `protect_aliases`, a block at a time, called also from the asking pass (between its VICTORY_GUARD_HOT and VICTORY_GUARD_PARK handling of each block); batching it there would change what that pass sees block by block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e log lines that show them fxceless#1014 (@martindevbr), fxceless#1068, fxceless#1066 and fxceless#1059 (@UwUCammie) as ported on feature/overhead-ports; fxceless#1043 comes by its own hand port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
One thing to watch now that #999 (VICTORY_TEXTURE_BACK) is on main: it adds two fields to Deferred, back_wanted and texture_backs. With the Deferred::clear from this PR they don't get cleared on reset, so a reused list would land an old texture read-back again. I added self.back_wanted.clear() and self.texture_backs.clear() next to self.backs.clear() when merging both into my tree. Probably worth adding here before it goes in. |
…xceless#1016 and add VRAM residency knobs
…alias guarding Ported from fxceless/victory-fork PR fxceless#1059 (4212d82) onto our watch.rs (clean.remove takes usize by value). Zero new locks; preserves watch::MAPPING before xmem::PHYSICAL ordering.
…ies on HostList::reset Ported from fxceless/victory-fork PR fxceless#1059 (62de6c0). Clears all Deferred fields including pooled uploads (giving them back to UPLOAD_SPARE and decrementing ALIVE[6]), early indirect clamps/rings, written sets, and quarantined flag.
|
Updated this branch to A synthetic 4×4 texture on the RX 7900 XT reproduced it: after the first GPU readback, I wrote The new pixel test, the existing upload/readback test and the guarded kernel-read test passed under Wine 11.22 and RADV 26.3.1. The broader test filter had the same two failures on unmodified upstream: the Windows driver-event subscription and placeholder-region query. Fix and test. |
|
Updated the reset path for the three recording caches added in main: bound pipelines, filled root uploads and texture alias sources. The first use in a new recording must copy the GPU alias again, even when the same list and resources were used in its previous recording. I reproduced the stale result when combining the two changes on the RADV integration and added a regression there. The exhaustive field match in this PR also caught the two new list-reuse fields at build time. At |
Three small CPU-side overhead fixes that cut syscall and allocation churn per frame:
VirtualProtectruns (watch.rs):open_hereand the alias-guarding pass both walk sorted block lists and calledVirtualProtectonce per 64 KiB block. Now they group contiguous runs into oneVirtualProtectcall and fall back per-block if a run fails.NtReadVirtualMemoryinhost::read(host.rs): whenVICTORY_DIRECT_WRITESis on (default),host::readnow usesNtReadVirtualMemoryinstead ofReadProcessMemory(matchingwrite_mapped'sNtWriteVirtualMemorypath to avoid the extraVirtualQueryoverhead on large pools).Deferredcapacities onHostList::reset(host.rs): clear the existingVec/HashSetbuffers inDeferredinstead of replacing the struct with fresh empty collections on every list reset.Tested on Linux + Wine 11.22 + RX 7900 XT (RADV,
VICTORY_RELAY=2, 480 s run into the cell scene):copiesdropped from ~46–50 ms to ~42.5–44.7 ms/frame, 0 GPUVM faults, 0 refused waits, picture unchangedwatch::testspass under Wine.