summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2023-08-01 15:15:28 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2023-08-01 15:37:49 -0300
commit34d3d81528739f5338ce61ac1a96cfda0e9852ee (patch)
tree474f8dfa5691e2109b69087b77b9e5802b318e81
parenteab0d16ba5a60e02cc1779093b89437fe86ff903 (diff)
downloadmeta-freescale-topic/upgrade-graphics.tar.gz
xserver-xorg: Replace glamor inverse color patchtopic/upgrade-graphics
Replace glamor patch for Ubuntu inverse color issue. Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r--recipes-graphics/xorg-xserver/xserver-xorg/0001-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch42
-rw-r--r--recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend2
2 files changed, 44 insertions, 0 deletions
diff --git a/recipes-graphics/xorg-xserver/xserver-xorg/0001-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch b/recipes-graphics/xorg-xserver/xserver-xorg/0001-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch
new file mode 100644
index 00000000..d7166522
--- /dev/null
+++ b/recipes-graphics/xorg-xserver/xserver-xorg/0001-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch
@@ -0,0 +1,42 @@
1From c76f5d2c0a0dda534888025d7236465202884665 Mon Sep 17 00:00:00 2001
2From: Xianzhong <xianzhong.li@nxp.com>
3Date: Thu, 5 Aug 2021 16:57:43 +0800
4Subject: [PATCH] glamor: Fix fbo pixmap format with GL_BGRA_EXT
5
6Red and Blue channels are swizzled in GLES path,
7Fix color inverse problem with ximagesink command:
8gst-launch-1.0 videotestsrc pattern=6 num-buffers=1 ! video/x-raw,format=BGRx ! videoconvert ! ximagesink display=:0 -v
9
10This fix requires GL_EXT_texture_format_BGRA8888 extention, not applicable for upstream.
11
12Upstream-Status: Inappropriate
13
14Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
15---
16 glamor/glamor.c | 7 +++++++
17 1 file changed, 7 insertions(+)
18
19diff --git a/glamor/glamor.c b/glamor/glamor.c
20index 3450113e0..e327b9db8 100644
21--- a/glamor/glamor.c
22+++ b/glamor/glamor.c
23@@ -574,10 +574,17 @@ glamor_setup_formats(ScreenPtr screen)
24
25 if (glamor_priv->is_gles) {
26 assert(X_BYTE_ORDER == X_LITTLE_ENDIAN);
27+#if GL_EXT_texture_format_BGRA8888
28+ glamor_add_format(screen, 24, PICT_x8r8g8b8,
29+ GL_BGRA_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE);
30+ glamor_add_format(screen, 32, PICT_a8r8g8b8,
31+ GL_BGRA_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE);
32+#else
33 glamor_add_format(screen, 24, PICT_x8b8g8r8,
34 GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE);
35 glamor_add_format(screen, 32, PICT_a8b8g8r8,
36 GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE);
37+#endif
38 } else {
39 glamor_add_format(screen, 24, PICT_x8r8g8b8,
40 GL_RGBA, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV);
41--
422.17.1
diff --git a/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
index 161df049..cf1c3a50 100644
--- a/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
+++ b/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
@@ -2,6 +2,8 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
2 2
3SRC_URI:append:use-mainline-bsp = " file://0001-Allow-to-enable-atomic-in-modesetting-DDX.patch" 3SRC_URI:append:use-mainline-bsp = " file://0001-Allow-to-enable-atomic-in-modesetting-DDX.patch"
4 4
5SRC_URI:append:imxgpu = " file://0001-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch"
6
5IMX_OPENGL_PKGCONFIGS_REMOVE = "" 7IMX_OPENGL_PKGCONFIGS_REMOVE = ""
6IMX_OPENGL_PKGCONFIGS_REMOVE:imxgpu = "glamor" 8IMX_OPENGL_PKGCONFIGS_REMOVE:imxgpu = "glamor"
7OPENGL_PKGCONFIGS:remove:mx6-nxp-bsp = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" 9OPENGL_PKGCONFIGS:remove:mx6-nxp-bsp = "${IMX_OPENGL_PKGCONFIGS_REMOVE}"