Commit Graph

464 Commits

Author SHA1 Message Date
Geoffrey McRae
ccff282cd0 [client/idd] network: preserve exact frame damage 2026-11-06 14:40:30 +11:00
Geoffrey McRae
2021874ca9 [common/client] windows: avoid deprecated CRT calls 2026-11-06 14:40:25 +11:00
Geoffrey McRae
37f7bbad77 [common] cpuinfo: move feature queries to platform code 2026-11-06 14:40:25 +11:00
Geoffrey McRae
05fcc64c57 [common] option: use portable tokenizer 2026-11-06 14:40:25 +11:00
Geoffrey McRae
78b6a31e7d [client/common] windows: fix native clang-cl build 2026-11-06 14:40:25 +11:00
Geoffrey McRae
57f18d7e80 [client] windows: add native clang-cl build
Build the Windows client against the MSVC ABI while retaining clang
language support. Use vcpkg for ANGLE and libsamplerate, and build
MsQuic with its bundled static OpenSSL.
2026-11-06 14:40:25 +11:00
Geoffrey McRae
7530943446 [build] msquic: fix MinGW static OpenSSL linking
Build MsQuic's component archives instead of flattening Windows import
libraries into the monolithic archive. Use the static OpenSSL archives
supplied by the active MinGW toolchain while retaining Schannel for MSVC
and QuicTLS for Linux.

Let the active compiler locate its target root and use the restricted
ntdll import library. Provide GCC-compatible byte interlocked
operations, expose native XDP calls, and suppress expected compatibility
warnings.
2026-11-06 14:40:25 +11:00
Geoffrey McRae
6dfba7519c [client/idd] network: add password authentication 2026-11-06 14:37:38 +11:00
Geoffrey McRae
6eb7c1698c [common] network: use LGProtocol codecs 2026-11-06 14:37:38 +11:00
Geoffrey McRae
adf9ac3035 [common] network: add service payload codecs 2026-11-06 14:37:38 +11:00
Geoffrey McRae
5ba1bda0c8 [common] network: define transport wire protocol 2026-11-06 14:37:37 +11:00
Geoffrey McRae
eabc56a6de [common/client] platform: abstract runtime services 2026-11-06 14:34:25 +11:00
Geoffrey McRae
382f35e503 [common/client] ivshmem: add portable external frames 2026-11-06 14:34:25 +11:00
Geoffrey McRae
6d367d4ab2 [common/client] platform: make filesystem access portable 2026-11-06 14:34:25 +11:00
Geoffrey McRae
a60da36420 [common] windows: add native path and UTF support 2026-11-06 14:34:25 +11:00
Geoffrey McRae
62a8786fe2 [common/client] platform: add portable worker primitives 2026-11-06 14:34:25 +11:00
Geoffrey McRae
9c8343df96 [common/client] platform: make timing waits portable 2026-11-06 14:34:25 +11:00
Geoffrey McRae
36e170d93a [client/idd] audio: support multiple playback clients
Replace the single-owner PCM queues with one shared LGMP SPMC stream.
Give each admitted client reliable state and an independent playback
cursor, while clients without clock authority resample locally.

Extend the audio protocol with per-client epochs and barriers.
Keep capture exclusive and bound authority backpressure so slow
secondary readers cannot affect the disciplined low-latency path.
2026-11-06 14:34:25 +11:00
Geoffrey McRae
efc9952e74 [idd] audio: support 32-bit and common channel layouts
Advertise signed and floating-point 32-bit formats across mono,
stereo, quad, surround, 5.1, and 7.1 at every supported rate.

Carry sample encoding through the broker and LGMP protocol so integer
and floating-point streams remain distinct.

Expand packet, shared-memory, and ring capacity for eight-channel
32-bit audio.
2026-11-06 14:34:25 +11:00
Geoffrey McRae
e55cb8bd61 [common] audio: define the mediated LGMP stream protocol
Advertise optional audio mediation separately from runtime driver
availability, then negotiate ownership through the existing LGMP
client-control path.

Define fixed playback and capture stream records for packed PCM,
endpoint state, clock feedback, and targeted descriptor discovery.
Keep the LGMP queue table, recovery sidecar, and submodule unchanged.
2026-11-06 14:01:34 +11:00
Geoffrey McRae
8fbe3e7454 [repos] lgprotocol: import shared protocol definitions
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
Add LGProtocol as a pinned submodule and consume its KVMFR protocol
definitions throughout the client, host, IDD, OBS, and profiler.

Keep Looking Glass framebuffer helpers local while removing duplicated
protocol headers and migrating users to KVMFR-scoped types.
2026-09-01 20:58:25 +10:00
Geoffrey McRae
8336a27192 [common] rects: validate copy geometry 2026-08-24 19:13:10 +10:00
Geoffrey McRae
197b4d060f [common] framebuffer: bound row copies 2026-08-24 19:13:10 +10:00
Geoffrey McRae
71733433ed [client/idd] input: synchronize keyboard LEDs
Report guest HID keyboard LED state from LGInput to LGIdd and
publish it with the LGMP input endpoint status.

Forward SPICE modifier updates through the same provider state so evdev
can synchronize physical keyboard LEDs across transport changes and
reconnects.

Bump the versioned pipe and KVMFR input status contracts for the new
feedback state.

Accept earlier LGMP input status versions without LED feedback so the
client retains input while the guest driver is being upgraded.
2026-08-21 13:07:46 +10:00
Quantum
4cee75dab5 [common] linux/proctitle: fix off-by-one bug
0884d14bde introduces an off-by-one bug: if
`strlen(title) == totalSize`, then no space will be left for a null terminator.
2026-08-16 19:56:07 +10:00
Quantum
0884d14bde [common] linux/proctitle: zero out entire usable memory block
This avoids additional arguments showing up when their memory hasn't been
touched at all.
2026-08-16 16:03:27 +10:00
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
b3e9bc2e7f [common] input: define per-client streams
Extend input status with eight exported client-to-host stream
endpoints, matching the maximum number of LGMP clients.

Publish each endpoint descriptor, client binding, epoch, and lifecycle
flags. Require every input activation to keep its ordered records on a
single transport.

Retain the queue transport as a fallback and bump the input and
KVMFR protocol versions for the expanded status layout.
2026-08-15 14:38:16 +10:00
Geoffrey McRae
10b32cb883 [common] clipboard: define stream transport
Replace the single 1 MiB clipboard slot with a four-record 256 KiB
window while retaining a 1 MiB logical file-read limit.

Advertise transport capabilities and duplex stream descriptors in the
clipboard status. Make each claim select one data plane for its entire
owner generation so control and payload ordering cannot be mixed.

Bump the clipboard, KVMFR, and Helper mapping versions for the new
wire layouts and shared-memory geometry.
2026-08-15 14:38:16 +10:00
Geoffrey McRae
5ddaa98ea9 [common] protocol: define stream descriptors
Add a transport-neutral wire copy of the LGMP stream descriptor for
embedding in KVMFR subsystem status records.

Keep the common protocol independent of LGMP headers and assert the
field offsets and total size at both C and C++ integration points.
2026-08-15 14:38:16 +10:00
Geoffrey McRae
c861246d62 [common] event: consume auto-reset signals atomically 2026-08-15 13:06:49 +10:00
Geoffrey McRae
352c3c42b6 [common] clipboard: enlarge transfer buffers 2026-08-14 19:09:11 +10:00
Geoffrey McRae
dbf52cb405 [common] clipboard: define remote file datasets 2026-08-14 16:09:08 +10:00
Geoffrey McRae
b786167f72 [idd] clipboard: add direct synchronization 2026-08-14 10:22:37 +10:00
Geoffrey McRae
4602f20e62 [common] clipboard: define streamed clipboard ABIs 2026-08-14 10:06:34 +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
b411d345d0 [common] event: fix long Linux timeouts
Normalize absolute event deadlines with division and remainder, and widen
millisecond conversion before multiplying. This prevents multi-second
waits from producing EINVAL or wrapping to shorter delays.
2026-08-12 12:24:25 +10:00
Geoffrey McRae
ebc9d076ec [client] overlay: clean up partial initialization 2026-08-12 03:08:49 +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
7f4a14a543 [common] input: define LGMP input protocol
Reserve a dedicated LGMP queue for low-latency input reports and
endpoint status. Bump KVMFR for the new feature and define ordered
ownership messages with full-state mouse and keyboard payloads.

Use a 32-bit physical button mask so future HID buttons do not require
another wire format change.
2026-08-08 22:17:30 +10:00
Geoffrey McRae
f495e5b7ba [client] input: abstract guest input backends
Introduce LG_InputOps and route keyboard and mouse input through the
active video transport when it provides an input backend.

Keep SPICE as the fallback and force it while the SPICE display is
active. Add atomic shared/exclusive locking for safe backend changes.
2026-08-08 21:23:32 +10:00
Geoffrey McRae
0b744d2286 [common] kvmfr: report cadence hold and lead timing 2026-08-06 18:04:10 +10:00
Geoffrey McRae
515f4ba06f [client/host/idd/obs] scheduler: validate phase feedback
Bump KVMFR to version 28 and attach generation, epoch, and deadline
identities to cadence deliveries and their timing records.

Accept phase corrections only for the exact completed publication. Keep
VM and client clocks independent by exchanging relative phase errors.

Make submission, completion, and work-estimate accounting best effort
so scheduler state cannot delay GPU submission or frame publication.
2026-08-06 18:02:08 +10:00
Geoffrey McRae
05f3b39b43 [client] egl: snapshot DMA frames before release
Copy imported IVSHMEM frames into renderer-owned textures before
acknowledging their LGMP messages. Hold each lease until its copy fence
signals, and protect selected snapshots until rendering completes.

Track independent delivery lanes, drain acknowledgements on the frame
thread, and recover stale queue subscriptions after host timeouts.
2026-08-06 18:02:08 +10:00
Geoffrey McRae
c7ed04412e [client/idd/obs] scheduler: isolate timing owner delivery 2026-08-05 15:45:30 +10:00
Geoffrey McRae
97e7f439c2 [client/idd] align frame delivery to presentation 2026-08-04 13:49:07 +10:00
Geoffrey McRae
5626cfa55b [common] add frame scheduling protocol 2026-08-04 13:49:07 +10:00
Geoffrey McRae
e5315363d8 [common] debug: print backtraces on assertions 2026-08-04 11:01:55 +10:00
Geoffrey McRae
cb5b9ab292 [client] round overlay damage outward
Expand ImGui window damage to include its border and round both logical
window bounds and framebuffer-scaled bounds outward.

This prevents a one-pixel strip of stale desktop content when an
overlay window is resized at fractional positions or display scales.
2026-08-03 23:53:33 +10:00