From 34d3d81528739f5338ce61ac1a96cfda0e9852ee Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Tue, 1 Aug 2023 15:15:28 -0300 Subject: xserver-xorg: Replace glamor inverse color patch Replace glamor patch for Ubuntu inverse color issue. Signed-off-by: Tom Hochstein Signed-off-by: Otavio Salvador --- ...or-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch | 42 ++++++++++++++++++++++ .../xorg-xserver/xserver-xorg_%.bbappend | 2 ++ 2 files changed, 44 insertions(+) create mode 100644 recipes-graphics/xorg-xserver/xserver-xorg/0001-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch 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 @@ +From c76f5d2c0a0dda534888025d7236465202884665 Mon Sep 17 00:00:00 2001 +From: Xianzhong +Date: Thu, 5 Aug 2021 16:57:43 +0800 +Subject: [PATCH] glamor: Fix fbo pixmap format with GL_BGRA_EXT + +Red and Blue channels are swizzled in GLES path, +Fix color inverse problem with ximagesink command: +gst-launch-1.0 videotestsrc pattern=6 num-buffers=1 ! video/x-raw,format=BGRx ! videoconvert ! ximagesink display=:0 -v + +This fix requires GL_EXT_texture_format_BGRA8888 extention, not applicable for upstream. + +Upstream-Status: Inappropriate + +Signed-off-by: Xianzhong +--- + glamor/glamor.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/glamor/glamor.c b/glamor/glamor.c +index 3450113e0..e327b9db8 100644 +--- a/glamor/glamor.c ++++ b/glamor/glamor.c +@@ -574,10 +574,17 @@ glamor_setup_formats(ScreenPtr screen) + + if (glamor_priv->is_gles) { + assert(X_BYTE_ORDER == X_LITTLE_ENDIAN); ++#if GL_EXT_texture_format_BGRA8888 ++ glamor_add_format(screen, 24, PICT_x8r8g8b8, ++ GL_BGRA_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE); ++ glamor_add_format(screen, 32, PICT_a8r8g8b8, ++ GL_BGRA_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE); ++#else + glamor_add_format(screen, 24, PICT_x8b8g8r8, + GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE); + glamor_add_format(screen, 32, PICT_a8b8g8r8, + GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE); ++#endif + } else { + glamor_add_format(screen, 24, PICT_x8r8g8b8, + GL_RGBA, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV); +-- +2.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}:" SRC_URI:append:use-mainline-bsp = " file://0001-Allow-to-enable-atomic-in-modesetting-DDX.patch" +SRC_URI:append:imxgpu = " file://0001-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch" + IMX_OPENGL_PKGCONFIGS_REMOVE = "" IMX_OPENGL_PKGCONFIGS_REMOVE:imxgpu = "glamor" OPENGL_PKGCONFIGS:remove:mx6-nxp-bsp = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" -- cgit v1.2.3-54-g00ecf