• Pekka Paalanen's avatar
    renderer/native: Valid formats for secondary dumb buffers · 442dcc78
    Pekka Paalanen authored
    When setting up an output on a secondary GPU with the CPU copy mode,
    allocate the dumb buffers with a DRM format that is advertised supported
    instead of hardcoding a format.
    
    Particularly, DisplayLink devices do not quite yet support the hardcoded
    DRM_FORMAT_XBGR8888. The proprietary driver stack actually ignores the
    format assuming it is DRM_FORMAT_XRGB8888 which results the display
    having red and blue channels swapped. This patch fixes the color swap
    right now, while taking advantage if the driver adds support for XBGR
    later.
    
    The preferred_formats ordering is somewhat arbitrary. Here it is written
    from glReadPixels point of view, based on my benchmarks on Intel Haswell
    Desktop machine. This ordering prefers the format that was hardcoded
    before.
    
    GNOME/mutter!341
    442dcc78
Name
Last commit
Last update
.gitlab-ci Loading commit data...
clutter Loading commit data...
cogl Loading commit data...
data Loading commit data...
doc Loading commit data...
po Loading commit data...
src Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
COPYING Loading commit data...
NEWS Loading commit data...
README.md Loading commit data...
config.h.meson Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...
mutter.doap Loading commit data...