Skip to content

Interaction v2: zero-copy GPU surface transfer bridge (Skyline.Interaction.Gpu)#35

Open
codymullins wants to merge 1 commit into
mainfrom
feat/interaction-gpu-transfer
Open

Interaction v2: zero-copy GPU surface transfer bridge (Skyline.Interaction.Gpu)#35
codymullins wants to merge 1 commit into
mainfrom
feat/interaction-gpu-transfer

Conversation

@codymullins

Copy link
Copy Markdown
Contributor

Closes #23.

The interaction tier's transfer broker is text/metadata only — copying a GPU surface (canvas, composited page) would force a CPU round-trip, which the design forbids. This adds the v2 GPU bridge so a surface moves by reference.

What's new — Skyline.Interaction.Gpu (a new, optional project)

  • GpuSurfaceHandle — a wgpu texture handle plus format and dimensions. The source owns the texture and keeps it alive for the life of the offer; the taker binds or copies it before the offer expires or is revoked. The handle never touches the processor.
  • GpuTransferOffer — the GPU twin of TransferOffer, carrying the same Provenance and TransferPolicy from Skyline.Interaction.
  • IGpuTransferBroker / InProcessGpuTransferBroker — offer / take / revoke / list, with the same lifetime and local-vs-remote rules as the text broker (remote takers are denied a local-only offer; lapsed offers prune against an injected TimeProvider).

Depends on Skyline.Interaction + Skyline.Gpu. No window dependency, so it stays headless-testable.

Tests + coverage wiring

  • Skyline.Interaction.Gpu.Tests (headless MSTest, 7 tests) covers every broker branch: offer/list/take, unknown id, remote-denied, remote-allowed, revoke (twice), and expiry-prune-vs-survive.
  • The new assembly is registered in Skyline.slnx and added to tools/cover.sh's reportgenerator -assemblyfilters. Verified it's actually measured: the report now shows Assemblies: 6 (was 5) with Skyline.Interaction.Gpu at 100% — not a silent false-green.

Verification

  • dotnet build Skyline.slnx clean (0 warnings); headless tests pass; format-check.sh clean.
  • Coverage: new assembly 100%; overall line coverage and the 37 pre-existing uncovered lines unchanged from main.

Note

Fully isolated (new project + slnx + cover.sh) — no conflict with the open window/input PRs (#30/#31/#32/#34) or #33.

Add Skyline.Interaction.Gpu: a wgpu-handle transfer representation so a
surface copy moves by reference and never round-trips through the
processor.

- GpuSurfaceHandle (texture handle + format + size), GpuTransferOffer,
  and IGpuTransferBroker / InProcessGpuTransferBroker.
- Reuses the interaction tier's Provenance, TransferPolicy, and
  local/remote rules, so a surface transfer answers the same
  who / how-far / how-long questions a text transfer does.
- The new assembly is wired into the 100% coverage gate (slnx and
  cover.sh), and reports 100%.

Closes #23
Copilot AI review requested due to automatic review settings June 17, 2026 00:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Interaction v2: zero-copy GPU transfer bridge (Skyline.Interaction.Gpu)

2 participants