[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/27] vhost-user-gpu: glFlush before notifying clients
From: |
marcandre . lureau |
Subject: |
[PATCH 02/27] vhost-user-gpu: glFlush before notifying clients |
Date: |
Fri, 12 Mar 2021 14:00:43 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
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 <marcandre.lureau@redhat.com>
---
contrib/vhost-user-gpu/virgl.c | 3 +++
contrib/vhost-user-gpu/meson.build | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
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 <virglrenderer.h>
#include "virgl.h"
+#include <epoxy/gl.h>
+
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;
diff --git a/contrib/vhost-user-gpu/meson.build
b/contrib/vhost-user-gpu/meson.build
index 2fc2320b52..0ce1515a10 100644
--- a/contrib/vhost-user-gpu/meson.build
+++ b/contrib/vhost-user-gpu/meson.build
@@ -2,7 +2,7 @@ if 'CONFIG_TOOLS' in config_host and 'CONFIG_VIRGL' in
config_host \
and 'CONFIG_GBM' in config_host and 'CONFIG_LINUX' in config_host \
and pixman.found()
executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm.c'),
- dependencies: [qemuutil, pixman, gbm, virgl, vhost_user],
+ dependencies: [qemuutil, pixman, gbm, virgl, vhost_user, opengl],
install: true,
install_dir: get_option('libexecdir'))
--
2.29.0
- [PATCH 00/27] Add D-Bus display backend, marcandre . lureau, 2021/03/12
- [PATCH 01/27] ui: fold qemu_alloc_display in only caller, marcandre . lureau, 2021/03/12
- [PATCH 02/27] vhost-user-gpu: glFlush before notifying clients,
marcandre . lureau <=
- [PATCH 03/27] vhost-user-gpu: fix vugbm_device_init fallback, marcandre . lureau, 2021/03/12
- [PATCH 04/27] vhost-user-gpu: fix cursor move/update, marcandre . lureau, 2021/03/12
- [PATCH 05/27] ui: factor out qemu_console_set_display_gl_ctx(), marcandre . lureau, 2021/03/12
- [PATCH 06/27] ui: associate GL context outside of display listener registration, marcandre . lureau, 2021/03/12
- [PATCH 07/27] ui: make gl_block use a counter, marcandre . lureau, 2021/03/12
- [PATCH 08/27] ui: add a gl-unblock warning timer, marcandre . lureau, 2021/03/12
- [PATCH 09/27] ui: simplify gl unblock & flush, marcandre . lureau, 2021/03/12