Phase 4: shared-texture ring transport#8
Merged
Conversation
…desktop animates The frame worker now GPU-copies each acquired frame into named keyed-mutex shared textures and publishes through the shared ring section (DESIGN.md §3.1); core::ring::RingPolicy makes every slot decision. Milestone verified: 2,108 frames published over a 30 s hold at 4K120 with no compositor stalls; with no reader attached, drop-oldest accounts published−slots as dropped, as specified. - shell/ring.rs: Global\ ring section (RingHeader/SlotMetadata volatile+ atomic writers, SYSTEM+Admins SDDL), named NT-handle keyed-mutex shared textures via proto::names, raw-HRESULT AcquireSync wrapper so WAIT_TIMEOUT stays visible (bounded-wait contract). - swapchain.rs: FrameRing lives in MonitorRt (sequences/generation survive reassignment); lazy texture creation from frame desc with generation bump on size change; 250 ms heartbeat; E_PENDING (0x8000000A) recognized as "no frame yet" (COM-style, not STATUS_PENDING — misreading it abandoned the swapchain mid-activation and stalled the compositor); on real failure: REBUILDING + retire + worker exit, letting the OS's unassign→assign cycle drive recovery. - monitors.rs: ring created at plug, marked DEAD at unplug; RequiredBandwidth=0 in both target-mode callbacks (nonzero vs MaxDisplayPipelineRate=0 made every mode unactivatable). - core/ring.rs: writer_abort (revert without publishing; aborts consume no sequence numbers) + test. - vgd-probe: maps the ring during the hold, prints gen/state/seq/ published/dropped/heartbeat per second with a milestone verdict; --ephemeral mints a throwaway identity (Windows persists per-identity "Disconnect this display" topology). - CLAUDE.md: phase-4 status, bring-up lessons, phase-5 notes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
core::ring::RingPolicymakes every slot decision (drop-oldest, writer never blocks).shell/ring.rs: ring section with volatile/atomic header+slot writers (SYSTEM+Admins SDDL), generation-stamped texture names viaproto::names, raw-HRESULT AcquireSync so WAIT_TIMEOUT stays visible.MonitorRt— sequences and generation survive swap-chain reassignment; section created at plug, DEAD at unplug; lazy texture (re)creation with generation bump on mode-size change; ≤250 ms heartbeat.core/ring.rs:writer_abort(revert without publishing, no sequence consumed) + test.vgd-probe: live ring watch during the hold (gen/state/seq/published/dropped/heartbeat + milestone verdict);--ephemeralflag for a fresh Windows display identity.Bring-up lessons (documented in CLAUDE.md)
E_PENDING(0x8000000A) for "no frame yet" — notSTATUS_PENDING; misreading it stalls the compositor until WUDFHost is killed.RequiredBandwidthmust be 0 alongsideMaxDisplayPipelineRate=0, else no mode can ever activate (Extend reverts, Scale/Resolution grayed).--ephemeralfor testing.Milestone verification
ring milestone: sequences advanced by 2108 during the hold ✔— 30 s at 4K120, generation stable, heartbeat continuous, no compositor stalls. Drops ≈ published − slots as specified (no reader until phase 5). 89/89 workspace tests green; clippy silent.🤖 Generated with Claude Code