Skip to content

Commit 0c27b9c

Browse files
elmarcokraxel
authored andcommitted
vhost-user-gpu: glFlush before notifying clients
For similar reasons as commit 3af1671 ("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 <marcandre.lureau@redhat.com> Message-Id: <20210312100108.2706195-3-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
1 parent d2aea77 commit 0c27b9c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

contrib/vhost-user-gpu/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ if 'CONFIG_TOOLS' in config_host and 'CONFIG_VIRGL' in config_host \
22
and 'CONFIG_GBM' in config_host and 'CONFIG_LINUX' in config_host \
33
and pixman.found()
44
executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm.c'),
5-
dependencies: [qemuutil, pixman, gbm, virgl, vhost_user],
5+
dependencies: [qemuutil, pixman, gbm, virgl, vhost_user, opengl],
66
install: true,
77
install_dir: get_option('libexecdir'))
88

contrib/vhost-user-gpu/virgl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#include <virglrenderer.h>
1717
#include "virgl.h"
1818

19+
#include <epoxy/gl.h>
20+
1921
void
2022
vg_virgl_update_cursor_data(VuGpu *g, uint32_t resource_id,
2123
gpointer data)
@@ -372,6 +374,7 @@ virgl_cmd_resource_flush(VuGpu *g,
372374

373375
VUGPU_FILL_CMD(rf);
374376

377+
glFlush();
375378
if (!rf.resource_id) {
376379
g_debug("bad resource id for flush..?");
377380
return;

0 commit comments

Comments
 (0)