All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] spice: flush on GL update before notifying client
@ 2021-02-16  9:20 marcandre.lureau
  2021-02-16  9:20 ` [PATCH 2/2] spice: flush drawing " marcandre.lureau
  2021-02-17 12:37 ` [PATCH 1/2] spice: flush on GL update " Gerd Hoffmann
  0 siblings, 2 replies; 3+ messages in thread
From: marcandre.lureau @ 2021-02-16  9:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, kraxel

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Since the introduction of spice/virgl support in commit
474114b7 ("spice: add opengl/virgl/dmabuf support"), the drawing isn't
being flushed before notifying the client. This results in
outdated/sluggish drawing on client side, in particular when using the
Linux console.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 ui/spice-display.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui/spice-display.c b/ui/spice-display.c
index 6f32b66a6e..d562c64084 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -1087,6 +1087,7 @@ static void qemu_spice_gl_update(DisplayChangeListener *dcl,
 
     trace_qemu_spice_gl_update(ssd->qxl.id, w, h, x, y);
     qemu_spice_gl_block(ssd, true);
+    glFlush();
     cookie = (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_GL_DRAW_DONE, 0);
     spice_qxl_gl_draw_async(&ssd->qxl, x, y, w, h, cookie);
 }
-- 
2.29.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] spice: flush drawing before notifying client
  2021-02-16  9:20 [PATCH 1/2] spice: flush on GL update before notifying client marcandre.lureau
@ 2021-02-16  9:20 ` marcandre.lureau
  2021-02-17 12:37 ` [PATCH 1/2] spice: flush on GL update " Gerd Hoffmann
  1 sibling, 0 replies; 3+ messages in thread
From: marcandre.lureau @ 2021-02-16  9:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, kraxel

From: Marc-André Lureau <marcandre.lureau@redhat.com>

This solves the client having slow/outdated VGA/2D console. It's a
regression introduced when the code was switched to render it via opengl
in commit 4423184376d ("spice/gl: render DisplaySurface via opengl")

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 ui/spice-display.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui/spice-display.c b/ui/spice-display.c
index d562c64084..ad93b953a9 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -846,6 +846,7 @@ static void spice_gl_refresh(DisplayChangeListener *dcl)
     graphic_hw_update(dcl->con);
     if (ssd->gl_updates && ssd->have_surface) {
         qemu_spice_gl_block(ssd, true);
+        glFlush();
         cookie = (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_GL_DRAW_DONE, 0);
         spice_qxl_gl_draw_async(&ssd->qxl, 0, 0,
                                 surface_width(ssd->ds),
-- 
2.29.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] spice: flush on GL update before notifying client
  2021-02-16  9:20 [PATCH 1/2] spice: flush on GL update before notifying client marcandre.lureau
  2021-02-16  9:20 ` [PATCH 2/2] spice: flush drawing " marcandre.lureau
@ 2021-02-17 12:37 ` Gerd Hoffmann
  1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2021-02-17 12:37 UTC (permalink / raw)
  To: marcandre.lureau; +Cc: qemu-devel

On Tue, Feb 16, 2021 at 01:20:55PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Since the introduction of spice/virgl support in commit
> 474114b7 ("spice: add opengl/virgl/dmabuf support"), the drawing isn't
> being flushed before notifying the client. This results in
> outdated/sluggish drawing on client side, in particular when using the
> Linux console.

> +    glFlush();

Nice catch.  Older mesa versions must have been less picky on correct
flushing, it used to work fine a while ago.

Both patches queued up for UI.

thanks,
  Gerd



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-17 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16  9:20 [PATCH 1/2] spice: flush on GL update before notifying client marcandre.lureau
2021-02-16  9:20 ` [PATCH 2/2] spice: flush drawing " marcandre.lureau
2021-02-17 12:37 ` [PATCH 1/2] spice: flush on GL update " Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.