From 0c27b9c5687fd276e26c3a95ca6d89f792fc7a1c Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 12 Mar 2021 14:00:43 +0400 Subject: vhost-user-gpu: glFlush before notifying clients MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For similar reasons as commit 3af1671852 ("spice: flush on GL update before notifying client"), vhost-user-gpu must ensure the GL state is flushed before sharing its rendering result. Signed-off-by: Marc-André Lureau Message-Id: <20210312100108.2706195-3-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann --- contrib/vhost-user-gpu/virgl.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'contrib/vhost-user-gpu/virgl.c') diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c index 8bb3c563d9..9e6660c7ab 100644 --- a/contrib/vhost-user-gpu/virgl.c +++ b/contrib/vhost-user-gpu/virgl.c @@ -16,6 +16,8 @@ #include #include "virgl.h" +#include + void vg_virgl_update_cursor_data(VuGpu *g, uint32_t resource_id, gpointer data) @@ -372,6 +374,7 @@ virgl_cmd_resource_flush(VuGpu *g, VUGPU_FILL_CMD(rf); + glFlush(); if (!rf.resource_id) { g_debug("bad resource id for flush..?"); return; -- cgit 1.4.1