summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/xwayland
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2022-05-11 21:02:56 -0500
committerTom Hochstein <tom.hochstein@nxp.com>2022-05-11 21:34:35 -0500
commit8a19c8c576ede98c41f45773c2376ad69389907b (patch)
treeef9d2bcf3f52bcff19a09d5a68720fe479536405 /recipes-graphics/xwayland
parenta4f772cab24996be79e6dfc26f0b7a3c740468ca (diff)
downloadmeta-freescale-8a19c8c576ede98c41f45773c2376ad69389907b.tar.gz
xwayland: Add patch to fix fbo pixmap on glamor
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Diffstat (limited to 'recipes-graphics/xwayland')
-rw-r--r--recipes-graphics/xwayland/xwayland/0002-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch39
-rw-r--r--recipes-graphics/xwayland/xwayland_%.bbappend1
2 files changed, 40 insertions, 0 deletions
diff --git a/recipes-graphics/xwayland/xwayland/0002-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch b/recipes-graphics/xwayland/xwayland/0002-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch
new file mode 100644
index 00000000..1c6cf2ec
--- /dev/null
+++ b/recipes-graphics/xwayland/xwayland/0002-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch
@@ -0,0 +1,39 @@
1From 4508e54dae9d2884b2d6ccca13450b25d509cc9a Mon Sep 17 00:00:00 2001
2From: Xianzhong <xianzhong.li@nxp.com>
3Date: Thu, 5 Aug 2021 16:57:43 +0800
4Subject: [PATCH 3/3] 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 extension, not applicable for upstream.
11
12Upstream-Status: Inappropriate [embedded specific]
13Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
14---
15 glamor/glamor.c | 7 +++++++
16 1 file changed, 7 insertions(+)
17
18Index: xwayland-21.1.4/glamor/glamor.c
19===================================================================
20--- xwayland-21.1.4.orig/glamor/glamor.c
21+++ xwayland-21.1.4/glamor/glamor.c
22@@ -586,10 +586,17 @@ glamor_setup_formats(ScreenPtr screen)
23
24 if (glamor_priv->is_gles) {
25 assert(X_BYTE_ORDER == X_LITTLE_ENDIAN);
26+#if GL_EXT_texture_format_BGRA8888
27+ glamor_add_format(screen, 24, PICT_x8r8g8b8,
28+ GL_BGRA_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE, TRUE);
29+ glamor_add_format(screen, 32, PICT_a8r8g8b8,
30+ GL_BGRA_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE, TRUE);
31+#else
32 glamor_add_format(screen, 24, PICT_x8b8g8r8,
33 GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, TRUE);
34 glamor_add_format(screen, 32, PICT_a8b8g8r8,
35 GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, TRUE);
36+#endif
37 } else {
38 glamor_add_format(screen, 24, PICT_x8r8g8b8,
39 GL_RGBA, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, TRUE);
diff --git a/recipes-graphics/xwayland/xwayland_%.bbappend b/recipes-graphics/xwayland/xwayland_%.bbappend
index 211d07a2..69063121 100644
--- a/recipes-graphics/xwayland/xwayland_%.bbappend
+++ b/recipes-graphics/xwayland/xwayland_%.bbappend
@@ -2,6 +2,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
2 2
3SRC_URI:append:imxgpu = " \ 3SRC_URI:append:imxgpu = " \
4 file://0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch \ 4 file://0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch \
5 file://0002-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch \
5" 6"
6 7
7OPENGL_PKGCONFIGS:remove:imxgpu = "${OPENGL_PKGCONFIGS_REMOVE_IMXGPU}" 8OPENGL_PKGCONFIGS:remove:imxgpu = "${OPENGL_PKGCONFIGS_REMOVE_IMXGPU}"