diff --git a/0001-wayland-dma-buf-Fix-32bpp-channel-order-inversion.patch b/0001-wayland-dma-buf-Fix-32bpp-channel-order-inversion.patch new file mode 100644 index 0000000..93093a8 --- /dev/null +++ b/0001-wayland-dma-buf-Fix-32bpp-channel-order-inversion.patch @@ -0,0 +1,45 @@ +From 51f867457faf8cf660080e64c148a8470af26e45 Mon Sep 17 00:00:00 2001 +From: Daniel Stone +Date: Thu, 24 Aug 2017 10:14:31 +0100 +Subject: [PATCH] wayland-dma-buf: Fix 32bpp channel order inversion + +Apparently my understanding of Cogl pixel formats, or at least their +use, was somewhat shaky. + +Un-invert the inversion of the DRM FourCC -> Cogl pixel format mapping +when creating dmabufs from clients, fixing inverted channel ordering +seen from GL clients, e.g. gold highlights in gtk4-demo when using the +GSK GL backend when they should be blue. + +https://bugzilla.gnome.org/show_bug.cgi?id=786677 +Signed-off-by: Daniel Stone +--- + src/wayland/meta-wayland-dma-buf.c | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/src/wayland/meta-wayland-dma-buf.c b/src/wayland/meta-wayland-dma-buf.c +index 93bf32beb..e5d2f7c35 100644 +--- a/src/wayland/meta-wayland-dma-buf.c ++++ b/src/wayland/meta-wayland-dma-buf.c +@@ -83,16 +83,13 @@ meta_wayland_dma_buf_buffer_attach (MetaWaylandBuffer *buffer, + if (buffer->texture) + return TRUE; + +- /* DRM_FORMAT_* enums consider the entire pixel as a single packed quantity, +- * with little-endian ordering. COGL_PIXEL_FORMAT_* is in byte order when +- * each channel is an 8-byte unit. Hence these have order swapped. */ + switch (dma_buf->drm_format) + { + case DRM_FORMAT_XRGB8888: +- cogl_format = COGL_PIXEL_FORMAT_BGR_888; ++ cogl_format = COGL_PIXEL_FORMAT_RGB_888; + break; + case DRM_FORMAT_ARGB8888: +- cogl_format = COGL_PIXEL_FORMAT_BGRA_8888_PRE; ++ cogl_format = COGL_PIXEL_FORMAT_ARGB_8888_PRE; + break; + case DRM_FORMAT_ARGB2101010: + cogl_format = COGL_PIXEL_FORMAT_ARGB_2101010_PRE; +-- +2.13.5 + diff --git a/mutter.spec b/mutter.spec index f83e671..411c0f6 100644 --- a/mutter.spec +++ b/mutter.spec @@ -6,7 +6,7 @@ Name: mutter Version: 3.25.91 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Window and compositing manager based on Clutter License: GPLv2+ @@ -15,6 +15,8 @@ URL: http://www.gnome.org Source0: http://download.gnome.org/sources/%{name}/3.25/%{name}-%{version}.tar.xz Patch0: startup-notification.patch +# https://bugzilla.gnome.org/show_bug.cgi?id=786677 +Patch1: 0001-wayland-dma-buf-Fix-32bpp-channel-order-inversion.patch BuildRequires: chrpath BuildRequires: pango-devel @@ -50,7 +52,7 @@ BuildRequires: xkeyboard-config-devel BuildRequires: zenity BuildRequires: desktop-file-utils # Bootstrap requirements -BuildRequires: gtk-doc gnome-common gettext-devel +BuildRequires: gtk-doc gnome-common gettext-devel git BuildRequires: libcanberra-devel BuildRequires: gsettings-desktop-schemas-devel >= %{gsettings_desktop_schemas_version} BuildRequires: automake, autoconf, libtool @@ -110,8 +112,7 @@ The %{name}-tests package contains tests that can be used to verify the functionality of the installed %{name} package. %prep -%setup -q -%patch0 -p1 +%autosetup -S git %build autoreconf -f -i @@ -184,6 +185,10 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_datadir}/mutter/tests %changelog +* Thu Aug 24 2017 Bastien Nocera - 3.25.91-2 ++ mutter-3.25.91-2 +- Fix inverted red and blue channels with newer Mesa + * Tue Aug 22 2017 Florian Müllner - 3.25.91-1 - Update to 3.25.91