Skip to content
  • Gert Wollny's avatar
    mesa/st: rework support for sRGB framebuffer attachements · 8f9dfb7d
    Gert Wollny authored
    
    
    For GLES sRGB framebuffer attachemnt support is provided in two steps:
    sRGB attachments like described in EXT_sRGB (and GLES 3.0) that enable
    linear to sRGB color space transformation automatically, and the ability
    to switch formats of the render target surface between sRGB and linear
    that introduces full support for EXT_framebuffer_sRGB.
    Set the according flags to reflect these two levels of sRGB support.
    
    As a difference between desktopm GL and GLES, on desktop GL for a sRGB
    framebuffer attachment the linear-sRGB conversion is turned off by default,
    and for GLES it is turned on. This needs to be taken into account when
    initally creating a surface, i.e. on desktop GL creation of a sRGB surface
    is preferred, but on GLES sRGB surfaces are only created when explicitely
    requested.
    
    v2: - Use the new CAPS name
    
    Signed-off-by: default avatarGert Wollny <gert.wollny@collabora.com>
    Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
    8f9dfb7d