Renderer port 2: a copy into a record's later words marks its slot (missed view records 101 -> 6 a frame) #384
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!384
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-384"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Sr-0w on GitHub · 2026-11-26 21:52 UTC · original
port2/copies-mid-record→main· +28 −6 · 1 files · 1 commits · closed without mergingWith
VICTORY_PORT_DESCRIPTORS=1(renderer port 2), the title's importedmemcpy/memmoveinto the marked heap marked a slot only when the copy wrote the slot's first word and that word was a view record's tag. A copy that rewrites a record's later words (its address, its size) and leaves the tag as it was marked nothing. That record kept the old view until port 2's fallback reached its page, which is every 8th frame for 16 pages. #359 notes that the wrapper's copies marked no record (0 records they marked). These copies are where that goes.Change
copied()looks at every slot the copy writes into, including the one it begins in, and marks the ones that hold a view record after the copy. The slot range isslots_touched(), which covers only slots whose tag word lies inside the heap.VICTORY_PORT_DESCRIPTORS=1, which is off by default.Measured
RX 7800 XT 16 GB, i9-12900K, 64 GB, Windows 11. Series X, ray tracing on (
VICTORY_BVH_BUILDER=1), renderer ports 1, 2, 5, 6, 7 on, warm cache, diagnostics build. A retail game's boat scene; figures are the averages of port 2's line over the last 90 s of a 480 s run.2de9980+ #359 + #273* That run waited on the card more than any other run of the evening (48.7 ms a frame vs 13.7), so the lower fps is not from this change. The extra marks cost about 0.04 ms a frame of taking. A main-only before/after follows in a comment.
VCRUNTIME140!memcpythrough port 2's wrapper. The per-block writer hint pointed the same way:VCRUNTIME140.dll+0x1234f, 79,258 of 202,580 misses.Checks
cargo test -p victory-gpu --locked --lib port_descriptors: 3 passed. The new testa_copy_into_a_record_marks_the_slot_it_begins_incovers whole records, a copy into a record's later words only, a copy across two records, a one-byte copy, and a heap whose last slot holds no whole tag.cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: nothing in the changed code.Related
port_descriptors.rs. This PR applies on top of both; the measured build carries all three.🤖 Generated with Claude Code
@Sr-0w on GitHub · 2026-11-26 22:23 UTC · original
Hold on reviewing this one: on a second check, whole-run flicker counts in the same scene are higher with this change (10.9 vs 4.8 local flicker events per 100 frames on
126acb3, one run each). Marking a slot as soon as any part of a record is copied may let the layer rebuild a half-updated record. I'm checking with more runs and will report back before asking for review.@YeokiNoewChi on GitHub · 2026-11-26 23:53 UTC · original
A data point from NVIDIA: RTX 3070 Ti 8 GB, Ryzen 5 5600X, Windows 11, Series S, diagnostics build. This was not on your main. It was a cool_fox-based tree with renderer ports 1, 2, 6 and 7, so I applied the change by hand behind a switch. I A/B'd it within one run at the boat save, in 10 s phases, about 60 phases in total.
The picture looked the same, and there was no cost in frame time on this card. More of the misses are left here than in your run (about 30 against your 6). At least some of what remains is written from outside the title's image; the fallback's warning names
writer=… (not the title's).Pull request closed