ui/gtk: fix passing y0_top parameter to scanout
authorErico Nunes <ernunes@redhat.com>
Mon, 20 Feb 2023 17:56:05 +0000 (18:56 +0100)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Sun, 28 May 2023 09:08:25 +0000 (13:08 +0400)
The dmabuf->y0_top flag is passed to .dpy_gl_scanout_dmabuf(), however
in the gtk ui both implementations dropped it when doing the next
scanout_texture call.

Fixes flipped linux console using vhost-user-gpu with the gtk ui
display.

Signed-off-by: Erico Nunes <ernunes@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230220175605.43759-1-ernunes@redhat.com>

ui/gtk-egl.c
ui/gtk-gl-area.c

index e84431790c9ba06b31d6e2d9a4abaf8ffae16e0d..557668e4182b188a8549b0fcd4e1892bc1d79c0c 100644 (file)
@@ -256,7 +256,7 @@ void gd_egl_scanout_dmabuf(DisplayChangeListener *dcl,
     }
 
     gd_egl_scanout_texture(dcl, dmabuf->texture,
-                           false, dmabuf->width, dmabuf->height,
+                           dmabuf->y0_top, dmabuf->width, dmabuf->height,
                            0, 0, dmabuf->width, dmabuf->height);
 
     if (dmabuf->allow_fences) {
index 7696df1f6bc4ce2b4185ddb6cde0fbfc762ef77a..c384a1516b3dfeb83bc6a5abb3eb706dec21a724 100644 (file)
@@ -298,7 +298,7 @@ void gd_gl_area_scanout_dmabuf(DisplayChangeListener *dcl,
     }
 
     gd_gl_area_scanout_texture(dcl, dmabuf->texture,
-                               false, dmabuf->width, dmabuf->height,
+                               dmabuf->y0_top, dmabuf->width, dmabuf->height,
                                0, 0, dmabuf->width, dmabuf->height);
 
     if (dmabuf->allow_fences) {