Skip to content

CI: perf/alias-handover - #45

Closed
AlxcBTW wants to merge 2 commits into
mainfrom
perf/alias-handover
Closed

AlxcBTW wants to merge 2 commits into
mainfrom
perf/alias-handover

Conversation

@AlxcBTW

@AlxcBTW AlxcBTW commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Fork CI for boykopovar#4286 (full Linux/lavapipe and Windows suites). Not for review here.

AI-assisted: yes

AlxcBTW and others added 2 commits October 12, 2026 05:26
A title's transient allocator (UE's RDG transient aliasing) gives the memory of a storage image A
that still has results pending to a surface B of another format and shape. Refresh of B stored A's
results first (a retile and a store through guest memory, PCIe on host-imported memory), then
uploaded B from that memory, at every such hand-over; on Sword of the Sea most of the frame's
storage write-backs and refresh uploads were these round trips.

Where B's content does not come from guest memory, A's results now stay pending:
- B's DCC keys are a clear code its format can hold: the upload is a GPU clear;
- B's keys are uncompressed over host-imported memory: B takes the units from A on the device (A's
  results retiled into a device buffer, detiled into B), the bytes A's store would write.
Only 64 KiB block units that lie wholly inside B, that B's write-back stores whole, that B holds no
results of its own in and, on the device, that A's element covers whole and nothing stamped since
A's generation. They are stored as before when anything reads the memory first (the flush hook,
another image's refresh; a key change after the flush stores them first), dropped once B's own
results cover the block (markLayersPending: B's write-back then overwrites every byte they would
have stored), and a late store of them advances B's units past its stamps while A still holds the
results it handed over. B's refresh proof is not broken by those units alone.

With APS5_PROFILE_DRAW a "[storage] hand-over" line counts the units every 10 s.

Test: agc_driver_alias_handover (B under clear keys and from memory; A never read again, read
before B wrote, written again after the hand-over; unwatched and watched memory): the same guest
bytes and the same texels of B with and without the hand-over (SetAliasHandOverForTests), and the
expected units handed over, superseded and stored later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013fa2MbmdFLVr8YHuVjucHE
… imports

The watched arm forced host imports to stay write-watched. Linux compares the imports of a device
whose own reads and writes of an import resolve the write protection (the import probe), and there
the forced watch reads the device's accesses as CPU stores: RADV imports host memory as a writable
amdgpu userptr, which every command submission faults in writable again, so each collect after a
submission stamps the whole import; lavapipe writes the import with the CPU. Results under those
stamps give way to the CPU's bytes, so the Off order lost A's results on RADV (A read before B
wrote, then A read again) and B's on lavapipe, in a configuration main never runs on these devices.

On Linux the watched arm now follows the probe and reports "host imports are compared on this
device" where it compares. Windows keeps the forced watch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013fa2MbmdFLVr8YHuVjucHE
@AlxcBTW

AlxcBTW commented Oct 12, 2026

Copy link
Copy Markdown
Owner Author

Upstream boykopovar#4286 was closed; the alias hand-over is superseded by boykopovar#4367.

@AlxcBTW AlxcBTW closed this Oct 12, 2026
@AlxcBTW
AlxcBTW deleted the perf/alias-handover branch October 12, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant