-
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