From: Emmanuel Gil Peyrot <emmanuel.pey...@collabora.com> Makes frame packing modes work, the normal-sized buffer was way too small to contain both images.
Signed-off-by: Emmanuel Gil Peyrot <linkma...@linkmauve.fr> --- libweston/compositor-drm.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index c0f1ebee..1d28d09d 100644 --- a/libweston/compositor-drm.c +++ b/libweston/compositor-drm.c @@ -62,6 +62,7 @@ #include "presentation-time-server-protocol.h" #include "linux-dmabuf.h" #include "linux-dmabuf-unstable-v1-server-protocol.h" +#include "stereoscopy-unstable-v1-server-protocol.h" #ifndef DRM_CAP_TIMESTAMP_MONOTONIC #define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 @@ -2642,9 +2643,17 @@ drm_output_init_egl(struct drm_output *output, struct drm_backend *b) }; int n_formats = 1; + int32_t width = output->base.current_mode->width; + int32_t height = output->base.current_mode->height; + + /* This layout has two full-size buffers, with a hole of 1/24th of + * their height at the middle. */ + if (output->base.stereoscopy_layout == ZWP_STEREOSCOPY_V1_LAYOUT_FRAME_PACKING) + height = height * 2 + height / 24; + output->gbm_surface = gbm_surface_create(b->gbm, - output->base.current_mode->width, - output->base.current_mode->height, + width, + height, format[0], GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING); -- 2.15.0 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel