Skip to content
  • Thomas Hellstrom's avatar
    glx: Duplicate relevant fbconfigs for compositing visuals · 91c42093
    Thomas Hellstrom authored and Adam Jackson's avatar Adam Jackson committed
    Previously, before GLX_OML_swap_method was fixed, both the X server and
    client ignored the swapMethod fbconfig value, which meant that, if the dri
    driver thought it exposed more than one swapMethod, it actually just
    exported a duplicated set of fbconfigs. When fixing GLX_OML_swap_method
    and restricting the choice for built-in visuals to a single swap method
    that meant we didn't have that many fbconfigs to choose from when pairing
    the compositing visual with an fbconfig, resulting in the fbconfig paired
    with the compositing visual becoming too restrictive for some applications,
    (at least for kwin). This problem would also happen if the dri driver
    only exposed a single swap method to begin with.
    
    So, to make sure the compositing visual gets a good enough fbconfig,
    duplicate fbconfigs that are suitable for compositing visuals and make
    sure these duplicated fbconfigs can be used only by compositing visuals.
    For duplicated fbconfigs not paired with a compositing visual, construct
    new compositing visuals, making compositing clients able to choose visuals
    / fbconfig more adapted to their needs.
    
    This is in some sense equivalent to adding a new "TRUECOLOR_COMPOSITING"
    GLX visualtype.
    
    Fixes: 4486d199 ("glx: Fix visual fbconfig matching with respect to
                          swap method")
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102806
    
    
    Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
    Tested-By: default avatarNick Sarnie <commendsarnex@gmail.com>
    Tested-by: default avatarFredrik Höglund <fredrik@kde.org>
    Reviewed-by: default avatarAdam Jackson <ajax@redhat.com>
    (cherry picked from commit f84e59a4)
    91c42093