CPU → GPU: the write-watch round trip (catch → upload → re-lock) #1307
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#1307
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@liuycsbxbxn on GitHub · 2026-11-26 13:32 UTC · original
Split out of #1273.
Suggested labels: performance / memory
Verification cost:
[GPU]What the meta-issue points at
watch.rs(the exception path —writes_as/writing).shadow.rs—refresh_check,copy_stale,copy,copy_changed(meta-issue cites L3411–L3487 on988aa41).watch.rs—open/open_here/protect_here.Acceptance
@JayFoxRox on GitHub · 2026-11-26 16:37 UTC · original · edited 2026-11-26 16:45 UTC
Some information was lost in transition from #1273.
When the CPU writes to (the read-only system-RAM copy of) a GPU resource, currently a read-only page exception occurs which eventually triggers a reupload of the CPU side memory to the GPU. However, page-exceptions are slow and the current approach requires unlocking and relocking pages.
The idea is to use #1305 to handle this (avoiding page exception and page re-locking, which takes 1000x than doing it the proposed way)
github-bot referenced this issue2026-11-26 16:46:43 +00:00
@liuycsbxbxn on GitHub · 2026-11-26 17:04 UTC · original
Same for the write side - restoring the background the split dropped: the CPU writes into the read-only system-RAM copy, the fault wakes the uploader, and the unlock/relock is what makes it expensive. If #1305 lands, both directions can drop the exception path; #1306 is the read-side counterpart, so the two are one chain rather than two independent tasks.