Commit Graph

326 Commits

Author SHA1 Message Date
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
91c501d602 [idd] logging: suppress duplicate pipeline initialization 2026-08-14 02:30:30 +10:00
Geoffrey McRae
8c21f61e91 [idd] postprocess: centralize compute effect utilities 2026-08-13 21:48:37 +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
84bda112ac [idd] postprocess: centralize color transform state 2026-08-13 21:41:45 +10:00
Geoffrey McRae
3d7df86a01 [idd] postprocess: centralize frame format utilities 2026-08-13 21:40:53 +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
efa1b1bbee [idd] installer: use staged LGInput package
Read the LGInput catalog, binary, and INF from the package root.

The driver packaging target stages these files for signing and export.
2026-08-09 02:29:33 +10:00
Geoffrey McRae
4367fbc277 [client/idd] input: avoid replaying absolute position
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-09 02:07:38 +10:00
Geoffrey McRae
c89c01ae5a [idd] input: preserve relative mode on reset 2026-08-09 01:57:51 +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
726086a969 [idd] input: report volume keys as consumer controls
Expose a Consumer Control HID report for the system volume usages that
Windows does not handle through the Keyboard/Keypad usage page.

Translate the existing mute and volume keyboard usages at the LGInput
boundary, preserve normal keyboard state, and force a neutral consumer
report across resets and HID device reactivation.
2026-08-09 01:02:33 +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
04fd31219c [idd] input: add mouse and keyboard IPC messages
Replace raw HID report forwarding with typed absolute mouse, relative
mouse, and keyboard messages.

Expose absolute and relative modes as separate Mouse collections because
Windows MouHID requires one X/Y motion mode per mouse device.
2026-08-08 20:18:05 +10:00
Geoffrey McRae
241ab3fad2 [idd] ipc: connect LGInput to LGIdd
Move the reusable named-pipe endpoint and shared support code into
the LGCommon static library.

Run a dedicated server in LGIdd and a reconnecting client in
LGInput, with device-lifecycle handling and report framing.

Refactor the helper pipe to use the same endpoint implementation.
2026-08-08 20:18:05 +10:00
Geoffrey McRae
214665bedd [idd] input: add virtual HID driver
Build LGInput as an independent UMDF driver with its own entry point,
service, tracing, and binary.

Expose absolute pointer, relative mouse, and keyboard collections with a
guarded report queue.

Keep LGIdd as the startup and deployment project. Give it a non-linking
build/package dependency on LGInput so F5 stages both driver stacks and
installs them together through LGIddInstall, while the two UMDF binaries
remain independent for future IPC.

Stage both DLLs for the NSIS installer, retain the WDK UMDF remote-debug
startup attachment, and move CSRWLock into LGCommon for the input
driver's report queue.
2026-08-08 20:17:32 +10:00
Geoffrey McRae
e470f9d8ae [idd] capture: preserve software copy row pitch
Use an explicit placed buffer for software frame copies so the D3D copy
uses the same row pitch published through KVMFR.

GetCopyableFootprints describes buffer copies and cannot be used to infer
the physical layout of a placed row-major texture. This caused padded
resolutions to use the wrong row starts in every consumer.

Keep the copy direct to IVSHMEM without a staging or CPU copy.
2026-08-07 21:10:37 +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
Geoffrey McRae
3ddc199bec [idd] capture: split software and hardware frame processors
Move cadence-aware hardware capture and immediate software capture
behind a common frame processor interface.

Keep shared damage tracking and frame-buffer ownership in the base
processor, and move stateless format, resource, and rectangle helpers
into CFrameProcessorUtil.

Decouple frame-buffer resources from CSwapChainProcessor by passing the
device dependencies they use directly.
2026-08-07 13:34:40 +10:00
Geoffrey McRae
d7c90e4693 [idd] capture: copy software frames directly to IVSHMEM
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
build / client-tests (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client-tests (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client-tests (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client-tests (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client-tests (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client-tests (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client-tests (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client-tests (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
Bypass cadence retention when the software render adapter is active.
Publish each available source frame immediately with one damage-aware
D3D copy into its final IVSHMEM resource.

Keep only one software copy in flight so newer frames are dropped
instead of queued behind stale work. Retain accumulated damage for the
next frame and skip static re-encodes when no image update is pending.

Use a row-major IVSHMEM texture when the shared heap supports it and
fall back to a direct IVSHMEM buffer copy otherwise. In indirect mode,
copy only damaged rows from readback memory into IVSHMEM.
2026-08-07 12:43:48 +10:00
Geoffrey McRae
ce47758ebd [idd] config: support fractional refresh rates
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
build / client-tests (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client-tests (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client-tests (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client-tests (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client-tests (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client-tests (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client-tests (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client-tests (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
Store refresh rates in millihertz and preserve three decimal places.

Advertise exact rational rates while accepting legacy integer values.

Accept rates from 23.900 through 1000.000 Hz.
2026-08-06 23:40:08 +10:00
Geoffrey McRae
a279a87bdb [idd] config: reload persisted display modes
Rebuild the driver's cached mode list before replugging the monitor so
Windows enumerates the settings saved by the helper.

Keep saved mode refresh rates intact and update only ExtraMode to the
configured default refresh.
2026-08-06 23:06:40 +10:00
Geoffrey McRae
ee9d958626 [idd] scheduler: avoid secondary subscription replays 2026-08-06 18:04:10 +10:00
Geoffrey McRae
b50dd41909 [idd] scheduler: account queue maintenance work 2026-08-06 18:04:10 +10:00
Geoffrey McRae
807ea52b02 [idd] scheduler: reject isolated work timing stalls 2026-08-06 18:04:10 +10:00
Geoffrey McRae
5e7d944607 [idd] pipeline: overlap independent frame copies 2026-08-06 18:04:10 +10:00
Geoffrey McRae
d3ee46f376 [idd] scheduler: prioritize deadline publication 2026-08-06 18:04:10 +10:00
Geoffrey McRae
fac417c6b3 [idd] scheduler: avoid stale deadline waits 2026-08-06 18:04:10 +10:00
Geoffrey McRae
0b744d2286 [common] kvmfr: report cadence hold and lead timing 2026-08-06 18:04:10 +10:00
Geoffrey McRae
fb1fb8447e [idd] scheduler: unblock ownership transitions
Permit retained-buffer reuse when both private queues are occupied by a
previous timing owner, even if the new owner has no pending deliveries.

Use the shared fallback when possible. Otherwise retain the fresh frame
locally and republish it instead of waiting for stale private deliveries.
2026-08-06 18:02:08 +10:00