Commit Graph

3869 Commits

Author SHA1 Message Date
Geoffrey McRae
5626cfa55b [common] add frame scheduling protocol 2026-08-04 13:49:07 +10:00
Geoffrey McRae
84d1427cab [idd] make mode filtering rebuilds thread safe 2026-08-04 13:49:07 +10:00
Geoffrey McRae
f0696e079f [idd] filter modes that exceed IVSHMEM capacity 2026-08-04 11:29:18 +10:00
Geoffrey McRae
99b4c1c3da [repos] cimplot: update to fix oob buffer access 2026-08-04 11:01:58 +10:00
Geoffrey McRae
e5315363d8 [common] debug: print backtraces on assertions 2026-08-04 11:01:55 +10:00
Geoffrey McRae
ad53a5e4ee [client] egl: stop aliasing damage tracking layouts
Pass damage rectangle arrays and counts explicitly to the EGL mesh
updater instead of casting DesktopDamage to DamageRects.
2026-08-04 10:54:45 +10:00
Geoffrey McRae
2aaf923e48 [client] preserve NaN timing plot gaps
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
Disable fast-math for the timing graph translation unit because its
bucket arrays use NaN values to break plot lines across empty intervals.

Keep fast-math enabled for remaining client sources while allowing
Clang's strict floating-point diagnostics to remain fatal.
2026-08-04 00:13:14 +10:00
Geoffrey McRae
2bb5c2e8c8 [client] tolerate generated GUI wrapper warnings
Keep warnings fatal for the GUI dependencies except for two known
issues in generated wrapper sources: an unused cimgui conversion helper
and cimplot's invalid internal FormatSpec conversion.

Scope the exceptions to their respective generated translation units so
warnings in ImGui, ImPlot, and the remaining wrappers stay fatal.
2026-08-04 00:08:21 +10:00
Geoffrey McRae
9025653a24 [client] limit overlay swaps to minimum render rate
Treat every completed swap as satisfying the interactive overlay
refresh requirement. Only force a JIT overlay render after the 60 Hz
deadline, and rearm the timer-based deadline after frame-driven swaps.

This prevents interactive overlays from adding redundant swaps when
incoming frames already keep the client at or above the required rate.
2026-08-03 23:53:33 +10:00
Geoffrey McRae
adf3101a1a [client] egl: fix non-DMA font atlas corruption
Unbind the streamed desktop pixel upload buffer before ImGui processes
CPU-backed font atlas updates.

This prevents atlas pointers from being interpreted as PBO offsets when
DMA is disabled, which caused newly requested glyphs to be missing.
2026-08-03 23:53:33 +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
Geoffrey McRae
fbe08d00ce [client] expose EGL stages in frame latency
Correlate received frames with the texture update actually consumed by
the renderer and retain damage until its token becomes renderable.

Split client latency into dispatch, import, queue, preparation, setup,
effects, desktop, composition, and swap stages in FRAME LATENCY.
Exclude diagnostic overlay work from composition and preserve client
wait time when producer timing is unavailable.

Publish joined samples through a bounded token queue, avoid sleeping
while producer timing is finalized, and correct Wayland photon units.
2026-08-03 23:53:33 +10:00
Geoffrey McRae
6109501eed [idd] select linear RGB24 packing automatically
Replace the texture-shaped RGB24 output with a linear raw buffer and
keep its packing, damage translation, and buffer copies inside the
RGB24 effect.

Benchmark full-frame native and packed processing and retain the faster
path for each source format. Preserve logical damage rectangles for
client updates and alternating framebuffer repair.

Return compute outputs to COMMON for COPY queue handoff and refresh
cached framebuffer sizes when switching packed and native layouts.
2026-08-03 23:53:33 +10:00
Geoffrey McRae
fa2769b332 [idd] isolate post-processing by framebuffer slot
Give each in-flight framebuffer a complete post-processing chain and
its own COMPUTE recording slot while retaining one physical queue.

Claim framebuffer ownership before submitting compute work, and use
the frame index for both COMPUTE and COPY recording state. Drain
in-flight work before reconfiguring either chain so COPY never
references replaced effect resources.

Require both chains to contain the same effects, preserve pending
damage, and release ownership on every pre-copy failure path.
2026-08-03 23:53:33 +10:00
Geoffrey McRae
ff4ca7d786 [idd] serialize framebuffer copies on one queue
Replace the rotating D3D12 copy queues with two framebuffer-bound
recording slots on one physical COPY queue. Keep allocator, command
list, query range, callback state, and fence target independent per
slot.

Submit source waits, execution, and signaling on the shared timeline.
Track framebuffer ownership through completion and serialize LGMP
publication around the last successfully published frame.
2026-08-03 23:53:33 +10:00
Geoffrey McRae
843207c628 [idd] coalesce framebuffer copy damage
Combine the previous and current frame damage before recording copy
commands. Remove contained regions, merge beneficial overlaps, and use
one full-frame copy when partial work reaches the full surface size.

This prevents a previous full-frame update from being copied again
alongside the current damage.
2026-08-03 23:53:33 +10:00
Geoffrey McRae
24be0a8869 [host] measure ready time at framebuffer publication
Exclude command queue reset and cleanup from the ready stage, and keep
the wall-clock residual only as the legacy timing fallback.
2026-08-03 23:53:33 +10:00
Geoffrey McRae
aa289fa022 [client/host/idd] correct frame timing attribution
Use calibrated copy-queue timestamps to separate source and effect
waits from the actual framebuffer copy.

Exclude producer readiness waits from client import timing so the
same interval is not counted in both Copy and Import.
2026-08-03 23:53:33 +10:00
Geoffrey McRae
c8e4b97c3c [idd] skip copies for static frames
Treat IddCx's single empty dirty rectangle as no image update instead
of promoting it to full damage.

Preserve pending damage and format changes, and fall back to full damage
when legacy move regions are present.
2026-08-03 23:53:33 +10:00
Geoffrey McRae
4f39270736 [client] add ImPlot and rework latency graphs 2026-08-03 23:53:33 +10:00
Geoffrey McRae
7533c855c2 [client/host/idd/lgmp] add additional timing metrics 2026-08-03 23:53:33 +10:00
Amit Mendapara
3035fa6282 [client] wayland: fix double xdg_toplevel role assignment in libdecor path
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
libdecor_decorate() already creates an xdg_surface and xdg_toplevel
internally for the frame. Calling xdg_surface_get_toplevel() again on
that same xdg_surface just to fetch the toplevel for icon handling
assigns the xdg_toplevel role to the underlying wl_surface a second
time, which is a protocol violation.

On GNOME Shell 50 (mutter) this is no longer tolerated: mutter
terminates the Wayland connection ("WL: error in client
communication"), and since libdecor_shellInit() waits for the initial
configure with a blocking, error-less libdecor_dispatch(-1) loop, the
client hangs forever with no window and no diagnostic output. This
made -DENABLE_LIBDECOR=ON (the default when libdecor-0 is present)
appear completely broken on current GNOME/Wayland.

Use libdecor_frame_get_xdg_toplevel() instead, which returns the
xdg_toplevel libdecor already owns, without requesting a second role
assignment.

Require libdecor-0 >= 0.1.1, which is available in Debian oldstable,
so the new accessor is guaranteed by the build dependency.
2026-08-03 19:36:21 +10:00
Geoffrey McRae
e671bfd4e7 [client] tests: dont use fast math
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
Clang C and C++ produce slightly different powf rounding with fast math,
for testing disable it.
2026-08-01 16:48:16 +10:00
Geoffrey McRae
82ced18015 [idd] driver: initialize messages to zero 2026-08-01 16:29:18 +10:00
Geoffrey McRae
c5459dec5b [idd] driver/helper: dont allow resolutions that wont fit in ram 2026-08-01 16:28:24 +10:00
Geoffrey McRae
98bde6cf36 [idd] edid: ensure the edid mode list is static 2026-08-01 16:03:07 +10:00
Geoffrey McRae
47905ec65e [client] spice: update to properly support all cursor types 2026-08-01 15:43:30 +10:00
Geoffrey McRae
fab9961c49 [client] egl: fix streamed texture post-processing race
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
2026-07-31 14:15:17 +10:00
Geoffrey McRae
08993d3e1e [client] core: use portable alloc_sprintf instead of asprintf
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
2026-07-31 14:01:08 +10:00
Geoffrey McRae
07133e0a69 [client] tests: fix release build of font test 2026-07-31 13:58:48 +10:00
Geoffrey McRae
f370153c4d [github] tests: improve test coverage by testing all build variants 2026-07-31 13:48:16 +10:00
Geoffrey McRae
1a2e92beae [client] tests: replace test defines with the unified ENABLE_TEST define 2026-07-31 13:35:50 +10:00
Geoffrey McRae
9a3d994204 [client] tests: add stb font compatibility coverage 2026-07-31 13:25:17 +10:00
Geoffrey McRae
66547fc090 [client] font: skip stb-incompatible UI font faces 2026-07-31 13:25:00 +10:00
Geoffrey McRae
b421eca5d9 [client] tests: fix copyright headers 2026-07-31 13:13:11 +10:00
Geoffrey McRae
6fe0bc807a [client] tests: add lgmp transport tests and update github workflow 2026-07-31 13:08:30 +10:00
Geoffrey McRae
9417a71264 [client] lgmp: fix timeout due to improper handling of pause/resume 2026-07-31 12:57:09 +10:00
Geoffrey McRae
33c81d2cf5 [client] audio: enable building without audio support
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 / render-tests (push) Has been cancelled
Fixes #1183
2026-07-30 16:16:04 +10:00
Geoffrey McRae
f6ad9e29d1 [client] spice: updated PureSpice to fix validation regressions 2026-07-30 15:53:12 +10:00
Geoffrey McRae
ab1d26d2cc [doc] words: add contributor names to words.txt 2026-07-30 15:35:40 +10:00
Geoffrey McRae
d61cc12d97 [github] update to use node 24 2026-07-30 15:27:49 +10:00
Geoffrey McRae
74ae4f543e [client] tests: add framebuffer rendering validation
Add an optional EGL framebuffer capture path for the test transport.
Capture the fully composed frame before presentation and retain its
surface format and HDR state for validation.

Add GoogleTest integration tests which run the production client
under a headless Weston compositor and compare every output pixel
against an independent reference implementation.

The matrix covers BGRA, RGBA, BGR32, RGB24, PQ RGBA10 and scRGB
RGBA16F with full, moving, overlapping, maximum-count, invalid, null
and zero-area damage rectangles. Validate HDR-to-SDR conversion and
native HDR output metadata when supported by the compositor.

Keep tests opt-in through ENABLE_RENDER_TESTS and document how to run
the software and native HDR tiers.
2026-07-30 15:23:03 +10:00
Geoffrey McRae
a1fc3d20d3 [client] wayland: allow seatless operation for github CI testing 2026-07-30 15:23:03 +10:00
Geoffrey McRae
5c5a2f15d8 [client] egl: fix RGB24 odd pitch defect 2026-07-30 15:14:29 +10:00
Geoffrey McRae
8828e640ab [common] rects: fix unaligned avx memcpy implementation 2026-07-30 15:14:29 +10:00
Geoffrey McRae
f5dee45adc [client] renderers: only rebuild the font atlas if marked dirty 2026-07-30 15:14:29 +10:00
Geoffrey McRae
9657ac7aa2 [client] lgmp: dont validate the device if the transport is not selected 2026-07-30 15:14:29 +10:00
Geoffrey McRae
4f02eda913 [client] overlay: add ImGui support for non-latin characters 2026-07-30 12:39:47 +10:00
Geoffrey McRae
f3155647d2 [client] wayland: serialize surface commits with EGL swaps
NVIDIA's Wayland EGL implementation sets explicit-sync acquire and
release points while presenting a frame. The requests emitted by
eglSwapBuffers and its final surface commit must be treated as one
logical transaction.

The pointer-warp path can commit the main surface from the input
thread while the render thread is inside eglSwapBuffers. If this
occurs between the explicit-sync requests, the cursor commit applies
incomplete pending state and the compositor disconnects the client
with:

  explicit sync is used, but no release point is set

Add a surface lock and hold it across EGL presentation. Use the same
lock for direct commits, frame callback registration, and
pointer-constraint updates, replacing the narrower confinement lock.
This prevents another thread from splitting the EGL transaction and
removes the need for __NV_DISABLE_EXPLICIT_SYNC=1.
2026-07-30 11:09:07 +10:00
Geoffrey McRae
a9b8f437d4 [client] overlay: show layout-translated hotkey labels
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
Related to #1298
2026-07-30 10:30:47 +10:00