Convert FP16 scRGB captures to BT.2020 PQ before storing them in the
10-bit wire format. Preserve linear-light downsampling, publish the real
SDR white level and display metadata, and advance the format version when
those properties change.
Keep masked-color XOR operands on the untransformed logical path rather
than applying the color cursor shader. Preserve the white level delivered
with cursor updates instead of replacing it with frame SDR white during
format changes.
This keeps inverse-destination blending intact and ensures HDR cursor
brightness follows QueryHardwareCursor3.
Decode PQ/BT.2020 desktop pixels into an FP16 linear scRGB target before
compositing the color cursor, ImGui, damage overlay, and letterboxing.
Encode the damaged result to PQ once at the surface boundary. Keep logical
AND/XOR cursor masks in the encoded domain.
This preserves premultiplied cursor edges, prevents encoded-domain
blending, uses the Wayland output reference white for local overlays, and
keeps guest cursor white and display calibration independent from frame
SDR white. It also corrects HDR-to-SDR absolute luminance scaling, gamut
matrices, black handling, and buffer-age repair for the extra pass.
Suppress overlays when their conversion framebuffer is unavailable rather
than allowing unconverted sRGB draws into an HDR target.
Use named transfer constants for cursor shader state. Convert clipped
surface rectangles explicitly before using the frame-damage merge helper,
which avoids mixing its unsigned type with the EGL surface rectangle type.
Only advertise native PQ when the FP16 composition target is available.
SDR and native scRGB retain their direct single-pass paths.
Queue the display-server surface format while the renderer lock still
serializes the matching onFrameFormat update. This prevents the render
thread from presenting a frame in a new HDR encoding before the Wayland
image description transition has been queued.
Keep transform-only cursor messages independent from visibility and use
the cursor-specific SDR white level reported by IddCx.
Apply the Windows XYZ matrix, scalar, and transfer-domain LUT before
compositing colour and masked-colour cursors into OBS scRGB. Preserve
premultiplied alpha and leave monochrome logical masks unchanged.
Serialize asynchronous image-description state and publish compositor
capabilities safely across the Wayland and render threads.
Use the predefined Windows-scRGB description, query each output image
description for its configured reference white, and reapply HDR when the
surface moves to an output with different colour settings.
Request true floating-point EGL configs for scRGB and expose the native
encodings supported by the selected surface. Fall back to software HDR
mapping when the surface cannot represent the incoming wire format.
Resample PQ in linear light, keep SDR-only effects out of native PQ
chains, and consume the cursor-specific white level without changing
binary monochrome cursor mask operations.
Publish BT.2020 chromaticities in the virtual monitor EDID so
Windows receives a valid HDR colour volume.
Extend cursor messages with their IddCx SDR white level and an
explicit visibility-valid flag. Consumers can then calibrate cursors
without treating colour-transform-only messages as cursor hides.
Keep software HDR mapping enabled until the display server activates the
requested image description. Re-evaluate the state while rendering so
asynchronous readiness or failure updates the desktop, cursor, and overlay
together with a full redraw.
Publish HDR metadata through a locked request snapshot and wait for
image-description readiness before using it. Commit encoding changes with
matching content, preserve the active description during same-format
metadata replacements, and handle creation failures without protocol
errors.
Honor the IddCx 3x4 XYZ matrix and post-transfer LUT in the IDD
conversion pipeline. Carry transform changes to the client so EGL applies
the same calibration to hardware cursors, and invalidate the full frame
whenever calibration changes.
Handle DEFAULT, NEW, and UNCHANGED IDDCX HDR10 metadata states and
publish valid mastering metadata through KVMFR. Preserve the metadata
across post-processing without reallocating resources for
metadata-only changes.
Apply the same sampling margin to swap damage as buffer-age repair and
clip reported rectangles to the EGL surface. This ensures compositors
update every pixel affected by scaling or filtering.
Invalidate in-progress swap chain setup when IddCx unassigns the
monitor, and serialize replacement assignments so workers are
never started on abandoned handles.
Also initialize all worker dependencies before starting the processing
thread and treat teardown during SetDevice as normal cancellation.
This commit turns the icon handling into using a macro so we don't need to do
weird conversions from unsigned long (needed by X11) to uint32_t (needed by
Wayland).
Also simplified the error handling path on Wayland.
Preserve the requested display mode across intermediate swap chains when
rapid resolution changes cause replugs to be coalesced. Apply and clear
the mode only once the final replacement swap chain is ready.
Keep the replug lifecycle gated until the old swap chain has drained and
released its pending frame, and the replacement swap chain is fully
initialized. Coalesce additional requests into a follow-up replug to
prevent overlapping topology changes and IddCx release-frame timeout
bugchecks.
Drop frames when the LGMP queue is full instead of blocking
while holding an IddCx surface. Always finish every
acquired frame, including duplicate frame numbers, so
replug teardown cannot trigger the release-frame watchdog.