mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-22 10:50:15 -10:00
The 8-bit SDR swapchain takes B8G8R8A8_UNORM in the sRGB colour space whenever the surface lists it, and the first 8-bit UNORM format only when it does not. B8G8R8A8 maps to DRM XRGB8888, which every primary plane scans out, so a compositor can give a fullscreen window direct scanout regardless of the order the driver lists its formats in (the NVIDIA Wayland WSI lists R8G8B8A8 first, which mutter cannot put on the plane). See #19841. The choice lives in gfx/common/vulkan_surface_format.h; the samples/gfx/vulkan_surface_format lane checks it against RGBA-first, BGRA-first, wide-first and BGRA-less format lists.