Commit Graph

3960 Commits

Author SHA1 Message Date
Geoffrey McRae
0a04dc4964 [idd] d3d12: signal reusable command slots
Signal a per-slot event after callbacks finish and the command slot has
returned to the free state. This removes the one millisecond polling delay
when candidate state becomes visible just before its slot is reusable.
2026-08-06 18:02:07 +10:00
Geoffrey McRae
3e6c9197f1 [idd] capture: never wait on superseded frames
Drop an acquired frame immediately when both retained candidate slots are
unavailable. Waiting for up to 2 ms held the IddCx surface and
backpressured sources whose frame period was shorter than the wait.
2026-08-06 18:02:07 +10:00
Geoffrey McRae
4c1722feac [idd] scheduler: report actual acquired frame rate
Derive the source rate from unique frames observed over the actual log
interval. The old EWMA discarded intervals below 2 ms, capping the
reported rate at 500 Hz and understating high-rate sources.
2026-08-06 18:02:07 +10:00
Geoffrey McRae
997c690e04 [client] x11: serialize pointer grab state 2026-08-06 18:02:07 +10:00
Geoffrey McRae
023430da31 [client] input: defer pointer exit until release 2026-08-06 18:02:07 +10:00
Geoffrey McRae
142dc2bcef [client] input: track pointer confinement state 2026-08-06 18:02:07 +10:00
Geoffrey McRae
1baa5a3710 [client] input: gate motion on active capture 2026-08-06 18:02:07 +10:00
Geoffrey McRae
a2a185a95b [client] input: fix rotated cursor scaling 2026-08-06 18:02:07 +10:00
Geoffrey McRae
bbb168aafd [client] input: round warps past viewport edges 2026-08-06 18:02:07 +10:00
Geoffrey McRae
b0b9b395ea [client] tests: cover mouse exit geometry 2026-08-06 13:43:33 +10:00
Geoffrey McRae
385de6a70e [client] tests: cover mouse exit sequencing 2026-08-06 13:40:29 +10:00
Geoffrey McRae
dbf44d9df2 [client] tests: cover Wayland motion ordering 2026-08-06 13:19:27 +10:00
Geoffrey McRae
e9a16ef523 [client] input: add cursor transition diagnostics
Add opt-in sequence-numbered tracing across the core and Wayland
mouse paths.
2026-08-06 13:19:27 +10:00
Geoffrey McRae
49341a240d [idd] scheduler: pipeline timing owner deliveries
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
Allow the timing owner to keep one delivery pending on each independent
owner queue instead of waiting for the client to release every frame.

Count shared fallback deliveries against the same two-frame limit and
match republished frames across all active lanes. This hides the client
release round trip without allowing a third delivery for the owner.
2026-08-06 10:18:14 +10:00
Geoffrey McRae
3add7d066f [idd] logging: remove misleading swapchain noise 2026-08-06 05:58:28 +10:00
Geoffrey McRae
057fb4d40a [idd] swapchain: bind device before pipeline setup 2026-08-06 05:43:29 +10:00
Geoffrey McRae
770bce4ec0 [idd] adapter: defer render selection until initialization
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-08-06 05:04:22 +10:00
Geoffrey McRae
650636ccee [idd] capture: retain frames in linear 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
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 retained frame candidates in the final linear transport layout.
Prepare texture output in local DEFAULT buffers before cadence holding.
Then publish full frames with a single buffer copy.

Keep partial damage on matching pitched layouts and leave effect-owned
buffer copies unchanged. This moves detiling out of the
deadline-critical IVSHMEM or readback transfer.
2026-08-05 22:08:38 +10:00
Geoffrey McRae
ab25601a61 [idd] rgb24: compare stable candidate timings
Ignore allocation alignment when matching retained candidate resources.
D3D12 may resolve automatic alignment requests in GetDesc.
Comparing that value recreated the candidate for every benchmark sample.

Measure native and packed over matching wall-clock intervals.
Use preparation and publication intervals, excluding the cadence hold.
This avoids mixing GPU timestamps with fallback timing. The CPU IVSHMEM
copy is included only on indirect systems.
2026-08-05 21:45:45 +10:00
Geoffrey McRae
f073099950 [idd] capture: retire published pending damage
Track damage received after each retained candidate snapshot. When a
candidate is submitted successfully, replace the global pending set
with its trailing damage instead of requiring the source generation
to remain unchanged.

This lets published full-frame damage retire while preserving newer
partial or full updates.
2026-08-05 20:58:02 +10:00
Geoffrey McRae
ff5b43173a [idd] rgb24: isolate benchmark samples from cadence
Run effect timing samples only when the retained candidate pipeline is idle
and force each completed sample to publish immediately. This prevents work
from superseded candidates from being charged to a surviving sample.

Include the indirect CPU copy to IVSHMEM in the measured copy stage while
preserving the wall-clock fallback when GPU timestamps are unavailable.
2026-08-05 20:48:50 +10:00
Geoffrey McRae
13a34b383d [client] egl: retain damage until texture is drawable
Treat a failed desktop texture bind as an incomplete render so full target
restoration remains latched until a frame can actually be drawn.

Carry retired damage into the pending record when the drawable texture does
not contain it, closing the publication gap between texture slots and their
matching damage metadata.
2026-08-05 18:04:26 +10:00
Geoffrey McRae
3e08d1f34f [obs] dmabuf: blit imports into owned textures 2026-08-05 17:25:23 +10:00
Geoffrey McRae
2147567586 [obs] dmabuf: snapshot frames before release 2026-08-05 17:11:20 +10:00
Geoffrey McRae
f95c8f0660 [idd] scheduler: pace secondary frame delivery 2026-08-05 17:10:35 +10:00
Geoffrey McRae
c7ed04412e [client/idd/obs] scheduler: isolate timing owner delivery 2026-08-05 15:45:30 +10:00
Geoffrey McRae
0b9b805530 [idd] scheduler: retain frames for publication deadlines
Prepare each acquired content frame into one of two private GPU
candidates so the IddCx frame can be released without copying it to
IVSHMEM immediately.

Wake a high-resolution publisher at the client deadline and send the
newest completed candidate. Preserve accumulated damage across
superseded candidates, include the scheduling hold in end-to-end timing,
and keep transport work on the existing physical copy queue.
2026-08-05 12:38:07 +10:00
Geoffrey McRae
afb80e0ae4 [client] overlay: render splash fade from monotonic time
Move splash transitions onto the render thread and derive opacity from
elapsed monotonic time. Pace active animation at a display-compatible
minimum of 60 Hz while allowing incoming frames to satisfy that demand.

Reset the splash cleanly across reconnects and latch state changes with
the full-frame restoration decision.
2026-08-05 11:58:32 +10:00
Geoffrey McRae
12f6485e52 [client/obs] scheduler: correct phase feedback
Only report the client queue lead when JIT rendering provides a valid
measurement. Clamp linear phase errors instead of wrapping them into the
opposite direction at half of a refresh period.

Timestamp OBS frames after the shared framebuffer becomes ready.
2026-08-05 11:52:44 +10:00
Geoffrey McRae
2c74f4a0f9 [client] display: use trusted nominal cadence
Always track Wayland surface outputs alongside fractional scaling and use
RandR modes for X11 cadence. Remove render-derived feedback so a
throttled client cannot teach the producer to remain throttled.

Release scheduling after nominal output timing remains unavailable.
2026-08-05 11:50:48 +10:00
Geoffrey McRae
bca59df783 [client] wayland: use nominal refresh for frame demand
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
Use the current wl_output mode for the requested producer cadence.
Presentation feedback can follow a slower VRR cadence, feeding that low
update rate back into the IDD. Select the fastest nominal mode when a
window spans multiple outputs.
2026-08-05 10:53:52 +10:00
Geoffrey McRae
d815ef87d5 [client] overlay: restore every splash fade frame
Mark the active fade as requiring a fully restored render target.
This also covers guest-driven renders between animation ticks so they
cannot blend over stale splash content.
2026-08-05 10:53:52 +10:00
Geoffrey McRae
606a06535e [client] overlay: keep the splash fade on fresh buffers
Fully invalidate the render target when the full-screen splash changes.
This restores the desktop before alpha blending and prevents stale fade
states from cycling between swapchain buffers when guest updates are
sparse.
2026-08-05 10:24:57 +10:00
Geoffrey McRae
d0fa4a8ddd [idd] scheduler: publish frames after guest cadence breaks
Discard the learned guest arrival period when a frame follows a gap
much larger than expected. Force that frame through and relearn the
arrival rate so sparse updates are not held for a frame that never
arrives.
2026-08-05 10:24:57 +10:00
Geoffrey McRae
55f373b4ff [obs] report video cadence over LGMP
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-08-04 14:21:29 +10:00
Geoffrey McRae
5be46121a2 [client/idd] preserve frame timing across reconnects 2026-08-04 13:49:07 +10:00
Geoffrey McRae
5ebc208d43 [client/idd] harden demand-driven frame delivery 2026-08-04 13:49:07 +10:00
Geoffrey McRae
97e7f439c2 [client/idd] align frame delivery to presentation 2026-08-04 13:49:07 +10:00
Geoffrey McRae
32ced2f24a [idd] publish the latest frame before its deadline 2026-08-04 13:49:07 +10:00
Geoffrey McRae
1176e78a7f [idd] elect the fastest frame timing client 2026-08-04 13:49:07 +10:00
Geoffrey McRae
b23430b9a8 [client] report presentation cadence over LGMP 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
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