summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien Lahoudere <fabien.lahoudere@collabora.co.uk>2017-11-02 00:22:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-05 22:56:32 +0000
commit148920f3971de0f44ac4dd3c85c29983862c5318 (patch)
tree8ea006d21ed4494e504a6bbe7063baaaf68e599e
parent14c0d992152ce27ee616558cafb408ed008d936e (diff)
downloadopenembedded-core-148920f3971de0f44ac4dd3c85c29983862c5318.tar.gz
weston: Bump version to 3.0.0
Update weston release to 3.0.0. Two patches added: - fix-missing-header.patch: fix a build issue when musl is used as libc. - weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch: fix display issue with YUV420/I420 format, that could result in a crash. Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/wayland/weston/fix-missing-header.patch30
-rw-r--r--meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch55
-rw-r--r--meta/recipes-graphics/wayland/weston_3.0.0.bb (renamed from meta/recipes-graphics/wayland/weston_2.0.0.bb)17
3 files changed, 94 insertions, 8 deletions
diff --git a/meta/recipes-graphics/wayland/weston/fix-missing-header.patch b/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
new file mode 100644
index 0000000000..55c0d4fd0f
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
@@ -0,0 +1,30 @@
+On the musl C library, tests/timespec-text.c does not build, with the
+following error:
+
+ In file included from tests/timespec-test.c:36:0:
+ ./shared/timespec-util.h:41:21: warning: ‘struct timespec’ declared
+ inside parameter list will not be visible outside of this definition
+ or declaration
+ timespec_sub(struct timespec *r,
+ ^~~~~~~~
+ [...]
+
+Indeed, struct timespec is defined in time.h, so we must include it.
+
+Upstream-Status: Backport [fa41bdfbc0b962fd73b89f01aab1a5370c9c28eb]
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
+
+Index: weston-3.0.0/shared/timespec-util.h
+===================================================================
+--- weston-3.0.0.orig/shared/timespec-util.h
++++ weston-3.0.0/shared/timespec-util.h
+@@ -28,6 +28,7 @@
+
+ #include <stdint.h>
+ #include <assert.h>
++#include <time.h>
+
+ #define NSEC_PER_SEC 1000000000
+
diff --git a/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch
new file mode 100644
index 0000000000..b3e1d06f57
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch
@@ -0,0 +1,55 @@
+Multi-plane sub-sampled textures have partial width/height, e.g.
+YUV420/I420 has a full-size Y plane, followed by a half-width/height U
+plane, and a half-width/height V plane.
+
+zwp_linux_dmabuf_v1 allows clients to pass an explicit pitch for each
+plane, but for wl_shm this must be inferred. gl-renderer was correctly
+accounting for the width and height when subsampling, but the pitch was
+being taken as the pitch for the first plane.
+
+This does not match the requirements for GStreamer's waylandsink, in
+particular, as well as other clients. Fix the SHM upload path to
+correctly set the pitch for each plane, according to subsampling.
+
+Tested with:
+ $ gst-launch-1.0 videotestsrc ! waylandsink
+
+Upstream-Status: Backport [https://patchwork.freedesktop.org/patch/180767/]
+
+Signed-off-by: Daniel Stone <daniels@collabora.com>
+Fixes: fdeefe42418 ("gl-renderer: add support of WL_SHM_FORMAT_YUV420")
+Reported-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103063
+
+---
+ libweston/gl-renderer.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
+index 244ce309..40bf0bb6 100644
+--- a/libweston/gl-renderer.c
++++ b/libweston/gl-renderer.c
+@@ -1445,14 +1445,13 @@ gl_renderer_flush_damage(struct weston_surface *surface)
+ goto done;
+ }
+
+- glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch);
+-
+ if (gs->needs_full_upload) {
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0);
+ wl_shm_buffer_begin_access(buffer->shm_buffer);
+ for (j = 0; j < gs->num_textures; j++) {
+ glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
++ glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
+ glTexImage2D(GL_TEXTURE_2D, 0,
+ gs->gl_format[j],
+ gs->pitch / gs->hsub[j],
+@@ -1477,6 +1476,7 @@ gl_renderer_flush_damage(struct weston_surface *surface)
+ glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, r.y1);
+ for (j = 0; j < gs->num_textures; j++) {
+ glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
++ glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
+ glTexSubImage2D(GL_TEXTURE_2D, 0,
+ r.x1 / gs->hsub[j],
+ r.y1 / gs->vsub[j],
diff --git a/meta/recipes-graphics/wayland/weston_2.0.0.bb b/meta/recipes-graphics/wayland/weston_3.0.0.bb
index 8160f5556d..ad0cdc2b0f 100644
--- a/meta/recipes-graphics/wayland/weston_2.0.0.bb
+++ b/meta/recipes-graphics/wayland/weston_3.0.0.bb
@@ -9,12 +9,13 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://weston.png \
file://weston.desktop \
file://0001-make-error-portable.patch \
- file://0001-configure.ac-Fix-wayland-protocols-path.patch \
file://xwayland.weston-start \
file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
+ file://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch \
+ file://fix-missing-header.patch \
"
-SRC_URI[md5sum] = "15f38945942bf2a91fe2687145fb4c7d"
-SRC_URI[sha256sum] = "b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8"
+SRC_URI[md5sum] = "9c42a4c51a1b9f35d040fa9d45ada36d"
+SRC_URI[sha256sum] = "cde1d55e8dd70c3cbb3d1ec72f60e60000041579caa1d6a262bd9c35e93723a5"
inherit autotools pkgconfig useradd distro_features_check
# depends on virtual/egl
@@ -76,7 +77,7 @@ PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
do_install_append() {
# Weston doesn't need the .la files to load modules, so wipe them
- rm -f ${D}/${libdir}/libweston-2/*.la
+ rm -f ${D}/${libdir}/libweston-3/*.la
# If X11, ship a desktop file to launch it
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
@@ -93,16 +94,16 @@ do_install_append() {
}
PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
- libweston-2 ${PN}-examples"
+ libweston-3 ${PN}-examples"
FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
-FILES_libweston-2 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-2/*.so"
-SUMMARY_libweston-2 = "Helper library for implementing 'wayland window managers'."
+FILES_libweston-3 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-3/*.so"
+SUMMARY_libweston-3 = "Helper library for implementing 'wayland window managers'."
FILES_${PN}-examples = "${bindir}/*"
-FILES_${PN}-xwayland = "${libdir}/libweston-2/xwayland.so"
+FILES_${PN}-xwayland = "${libdir}/libweston-3/xwayland.so"
RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
RDEPENDS_${PN} += "xkeyboard-config"