Copyright © 2021 Valve Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. This is a private Gamescope protocol. Regular Wayland clients must not use it. See override_window_content2. Xwayland creates a wl_surface for each X11 window. It sends a WL_SURFACE_ID client message to indicate the mapping between the X11 windows and the wl_surface objects. This request overrides this mapping for a given X11 window, allowing an X11 client to submit buffers via the Wayland protocol. The override only affects buffer submission. Everything else (e.g. input events) still uses Xwayland's WL_SURFACE_ID. x11_server is gotten by the GAMESCOPE_XWAYLAND_SERVER_ID property on the root window of the associated server. Provide swapchain feedback to the compositor. This is what the useless tearing protocol should have been. Absolutely not enough information in the final protocol to do what we want for SteamOS -- which is have the Allow Tearing toggle apply to *both* Mailbox + Immediate and NOT fifo, essentially acting as an override for tearing on/off for games. The upstream protocol is very useless for our usecase here. Provides image count ahead of time instead of needing to try and calculate it from an initial stall if we are doing low latency. Provides colorspace info for us to do HDR for both HDR10 PQ and scRGB. The upstream HDR efforts seem to have no interest in supporting scRGB but we *need* that so /shrug We can do it here now! Yipee! Swapchain feedback solves so many problems! :D Forward HDR metadata from Vulkan to the compositor. HDR Metadata Infoframe as per CTA 861.G spec. This is expected to match exactly with the spec. display_primary_*: Color Primaries of the Data. Specifies X and Y coordinates. These are coded as unsigned 16-bit values in units of 0.00002, where 0x0000 represents zero and 0xC350 represents 1.0000. white_point_*: White Point of Colorspace Data. Specifies X and Y coordinates. These are coded as unsigned 16-bit values in units of 0.00002, where 0x0000 represents zero and 0xC350 represents 1.0000. max_display_mastering_luminance: Max Mastering Display Luminance. This value is coded as an unsigned 16-bit value in units of 1 cd/m2, where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2. max_display_mastering_luminance: Min Mastering Display Luminance. This value is coded as an unsigned 16-bit value in units of 0.0001 cd/m2, where 0x0001 represents 0.0001 cd/m2 and 0xFFFF represents 6.5535 cd/m2. max_cll: Max Content Light Level. This value is coded as an unsigned 16-bit value in units of 1 cd/m2, where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2. max_fall: Max Frame Average Light Level. This value is coded as an unsigned 16-bit value in units of 1 cd/m2, where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2.