Commit Graph

45 Commits

Author SHA1 Message Date
Geoffrey McRae
be4bb19fa4 [clipboard] lgmp: make payload streams mandatory
Carry DATA and FILE_DATA only through the duplex SPSC streams. Keep LGMP
queues for control and status. Remove grants, commits, ACKs, and
queue-payload transport negotiation.

Poll adaptively while ownership or release is active. Preserve FIFO
release and graceful draining. Quarantine payloads crossed by a newer
OFFER or CLEAR, and retire data-plane state on detach.
2026-08-15 14:51:24 +10:00
Geoffrey McRae
12801df353 [input] lgmp: make report streams mandatory
Carry every input activation and report through its client-bound SPSC
stream. Keep the LGMP queue only for status publication and subscriber
discovery, removing transport selection and the queue-report fallback.

Retain graceful endpoint draining when a subscriber disappears and use
bounded adaptive polling while streams are active. The IDD polling setup
remains compatible with the project’s current C++ language mode.
2026-08-15 14:51:24 +10:00
Geoffrey McRae
89b1ced8fc [idd] clipboard: pipeline helper channel
Publish ordered four-record prefixes through the Helper mapping and ring
once per accepted burst. Wake blocked producers when the peer returns
credits while retaining the bounded polling fallback.

Move received payload ownership into manager work items and place remote
file-read data directly into the waiting caller’s bounded output buffer.
This removes avoidable 256 KiB copies without changing record ordering,
timeouts, cancellation, or reset semantics.
2026-08-15 14:51:16 +10:00
Geoffrey McRae
aea73cd2b3 [idd] input: consume per-client LGMP streams
Create and advertise one reliable input stream for each possible LGMP
client, then bind endpoints to active input subscribers.

Drain endpoints fairly while prioritizing the current owner's lane so
its RELEASE remains the ordering barrier. Reject transport changes
within an activation generation.

Gracefully retire missing or stalled subscribers without reusing an
active reservation. Keep excess clients on the queue and release HID
ownership from the input worker when its stream retires.
2026-08-15 14:38:16 +10:00
Geoffrey McRae
72522dadb8 [idd] clipboard: carry payloads over streams
Create one reliable four-slot lane in each direction and advertise the
stream data plane for clipboard protocol v4.

Bind both lanes to the accepted owner generation, stage incoming data
within a fixed window, and apply backpressure when Helper delivery is
full.

Drain reliable records before releasing an owner. Force stale or
unresponsive bindings after a bounded deadline while preserving the
existing cancellation and clipboard-clear cleanup.
2026-08-15 14:38:16 +10:00
Geoffrey McRae
6c412e0307 [idd] lgmp: expose stream allocation
Expose LGMP stream creation through the existing IDD host wrapper so
subsystem transports do not reach through its ownership boundary.

Keep stream lifetime and binding under each transport while the host
continues to own the underlying shared-memory allocator.
2026-08-15 14:38:16 +10:00
Geoffrey McRae
13d1bb1855 [idd] lgmp: remove old debug logging 2026-08-15 02:39:59 +10:00
Geoffrey McRae
a373df7705 [idd] capture: restore direct software publication 2026-08-15 02:28:26 +10:00
Geoffrey McRae
352c3c42b6 [common] clipboard: enlarge transfer buffers 2026-08-14 19:09:11 +10:00
Geoffrey McRae
3525796a00 [idd] lgmp: route clipboard file operations 2026-08-14 16:09:08 +10:00
Geoffrey McRae
88fd0da19e [idd] clipboard: route file dataset records 2026-08-14 16:09:08 +10:00
Geoffrey McRae
c868082a7f [client/idd] fix copyright headers 2026-08-14 12:36:43 +10:00
Geoffrey McRae
b786167f72 [idd] clipboard: add direct synchronization 2026-08-14 10:22:37 +10:00
Geoffrey McRae
caf8515e9d [idd] logging: make periodic statistics opt-in 2026-08-14 03:14:36 +10:00
Geoffrey McRae
879b8429e7 [idd] capture: log committed frame graph 2026-08-14 02:30:31 +10:00
Geoffrey McRae
1dcab65ab9 [idd] capture: version frame graph changes 2026-08-14 02:30:31 +10:00
Geoffrey McRae
70bc66b3f1 [idd] capture: execute texture frame graphs 2026-08-14 02:30:31 +10:00
Geoffrey McRae
deb963774e [idd] transport: route immutable texture frames 2026-08-14 02:30:31 +10:00
Geoffrey McRae
43d918b5f3 [idd] capture: build frame processing graph 2026-08-14 02:30:31 +10:00
Geoffrey McRae
081dcf8879 [idd] transport: isolate frame configuration 2026-08-14 02:30:30 +10:00
Geoffrey McRae
eb74a8ec9d [idd] transport: define texture frame profiles 2026-08-14 02:30:30 +10:00
Geoffrey McRae
af309de438 [idd] common: centralize atomic operations 2026-08-13 21:44:31 +10:00
Geoffrey McRae
5d12ee4bce [idd] common: centralize nonzero sequences 2026-08-13 21:44:07 +10:00
Geoffrey McRae
cd6bcc3a41 [idd] transport: centralize source identity 2026-08-13 21:42:24 +10:00
Geoffrey McRae
34835dd1af [idd] lgmp: pointer motion data doesn't require 1MB buffers
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2026-08-13 16:01:29 +10:00
Geoffrey McRae
5b9d4923a7 [idd] transport: coordinate recovery requests
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2026-08-13 04:28:09 +10:00
Geoffrey McRae
fbc4640623 [idd] transport: arbitrate interaction requests 2026-08-13 04:28:09 +10:00
Geoffrey McRae
5b09d4f90a [idd] transport: intersect frame capabilities 2026-08-13 04:28:09 +10:00
Geoffrey McRae
c601468871 [idd] transport: configure active instances 2026-08-13 04:28:09 +10:00
Geoffrey McRae
c92acb0a34 [idd] transport: isolate interactive services 2026-08-13 04:08:49 +10:00
Geoffrey McRae
51f432db00 [idd] transport: track asynchronous frame readiness 2026-08-13 04:08:49 +10:00
Geoffrey McRae
8792c3c446 [idd] transport: fan out frame publication 2026-08-13 04:08:49 +10:00
Geoffrey McRae
bd4d31f0bd [idd] transport: add frame sink boundary 2026-08-13 04:08:49 +10:00
Geoffrey McRae
801a1e58f8 [idd] transport: centralize source and control state 2026-08-13 04:08:49 +10:00
Geoffrey McRae
1ebf80fbe8 [idd] transport: add multi-instance lifecycle manager 2026-08-13 04:08:49 +10:00
Geoffrey McRae
bacf376305 [idd] recovery: restore fallback display
Add a protocol-independent recovery channel outside LGMP so clients can
request a usable guest display even when transport versions differ.

Synchronize recovery state with the helper across driver restarts and
restore the configured topology without persisting temporary changes.
2026-08-11 23:50:13 +10:00
Geoffrey McRae
9898e9bcec [common/idd] recovery: reserve IVSHMEM control region
Define a fixed, protocol-independent recovery ABI in the final 64 KiB
of IVSHMEM.

Provide crash-safe multi-client requests and coherent producer status.

Exclude the region from LGMP allocation and frame capacity so future
protocol mismatches retain a stable control path.
2026-08-11 23:50:13 +10:00
Geoffrey McRae
61a49ebaba [idd] common: use CSRWLock throughout the drivers
Make CSRWLock own the native lock and provide scoped guards for shared,
exclusive, early-unlock, and non-blocking use.

Replace direct SRW lock management throughout the IDD, input driver,
and helper while preserving the existing lock scopes.
2026-08-11 23:50:13 +10:00
Geoffrey McRae
487920ada3 [client/idd] input: add transport diagnostics 2026-08-09 01:55:45 +10:00
Geoffrey McRae
5b90384123 [client/idd] input: report endpoint status 2026-08-09 01:36:54 +10:00
Geoffrey McRae
ced2fb531e [idd] input: preserve reports under backpressure
Move named pipe writes off the LGMP input worker so a stalled LGInput
endpoint cannot block queue draining or lease maintenance.

Coalesce motion only under queue pressure while preserving mode, button,
wheel, and keyboard transitions. Reset HID state after discontinuities
and carry all 32 mouse button bits through the pipe and HID reports.
2026-08-08 23:42:27 +10:00
Geoffrey McRae
83c552fb9d [idd] input: receive LGMP input reports
Add an optional input transport and a dedicated LGMP receiver that
validates source ownership, generations, ordered sequences, and leases.

Poll input outside the 10 ms control timer. Forward mouse and keyboard
state through the LGInput pipe, and neutralize the endpoint before
ownership changes or transport failures can leave input held.
2026-08-08 22:56:02 +10:00
Geoffrey McRae
1de52f6e8a [idd] project: organize source layout
Move cadence and pipeline declarations under capture, and move local
named-pipe handling under ipc.

Flatten display contexts and rename files after their contained classes.
Keep transport headers limited to transport contracts and capabilities.

Consolidate CSwapChainProcessor definitions so each source file matches
the class it implements.
2026-08-07 18:16:18 +10:00
Geoffrey McRae
6725133375 [idd] transport: abstract LGMP implementation
Introduce transport, frame, and control interfaces with an LGMP factory
backend.

Move LGMP and IVSHMEM implementation details under transport/lgmp and
expose direct frame-buffer memory through a neutral capability.
2026-08-07 17:53:00 +10:00
Geoffrey McRae
30a1383d5e [idd] project: organize driver sources by responsibility
Group the IDD sources and Visual Studio filters by subsystem.

Split the device and swap-chain implementations into focused units,
rename the context classes, and reduce header coupling.
2026-08-07 15:49:18 +10:00