HDR support in Wayland/Weston

Adam Jackson ajax at redhat.com
Fri Mar 1 20:52:12 UTC 2019


On Fri, 2019-03-01 at 12:10 +0200, Pekka Paalanen wrote:
> On Thu, 28 Feb 2019 18:28:33 -0700
> Chris Murphy <lists at colorremedies.com> wrote:
> 
> > I'm curious how legacy applications including games used to manipulate
> > actual hardware LUT in a video card, if the application asked the
> > client to do it, in which case it still could do that?
> 
> Hi Chris,
> 
> right now, in no case.
> 
> It would probably be possible to enhance Xwayland (the X server) to
> implement whatever X11 offers as protocol for LUT manipulation, and
> forward that to a Wayland display server (compositor) using a new
> Wayland protocol extension where Xwayland attached that LUT to all
> Xwayland wl_surfaces. Then the Wayland compositor would apply the LUT
> per wl_surface.

X kinda has three mechanisms for this. The first one, that nobody
really uses, is setting the colormap for a DirectColor visual. The
second, which games typically use, is setting per-channel gamma
(implicitly for the whole screen) as single floating-point values with
the xf86vidmode extension. The third, which desktop environments
sometimes use to try to make distinct displays look similar, is setting
per-crtc gamma as 256 (or whatever) stops per channel with the RANDR
extension.

All of these are effectively the program specifying its transformation
to what it hopes is linear in device space. The sample server happens
to implement all three as global state, but that's an implementation
detail. It would be straightforward to give each Xwayland client the
illusion of complete control if we wanted.

- ajax



More information about the wayland-devel mailing list