[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/9] vhost-user-gpu: glFlush before notifying clients
From: |
Gerd Hoffmann |
Subject: |
[PULL 2/9] vhost-user-gpu: glFlush before notifying clients |
Date: |
Fri, 26 Mar 2021 13:49:25 +0100 |
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>
Message-Id: <20210312100108.2706195-3-marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@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 8bb3c563d975..9e6660c7ab87 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 2fc2320b52fe..0ce1515a10e5 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.30.2
- [PULL 0/9] Fixes 20210326 patches, Gerd Hoffmann, 2021/03/26
- [PULL 1/9] usb: Remove "-usbdevice ccid", Gerd Hoffmann, 2021/03/26
- [PULL 3/9] vhost-user-gpu: fix vugbm_device_init fallback, Gerd Hoffmann, 2021/03/26
- [PULL 2/9] vhost-user-gpu: glFlush before notifying clients,
Gerd Hoffmann <=
- [PULL 5/9] hw/usb/hcd-ehci-sysbus: Free USBPacket on instance finalize(), Gerd Hoffmann, 2021/03/26
- [PULL 6/9] s390x: move S390_ADAPTER_SUPPRESSIBLE, Gerd Hoffmann, 2021/03/26
- [PULL 4/9] vhost-user-gpu: fix cursor move/update, Gerd Hoffmann, 2021/03/26
- [PULL 7/9] s390x: add have_virtio_ccw, Gerd Hoffmann, 2021/03/26
- [PULL 9/9] hw/usb/hcd-ehci: Fix crash when showing help of EHCI devices, Gerd Hoffmann, 2021/03/26
- [PULL 8/9] s390x: modularize virtio-gpu-ccw, Gerd Hoffmann, 2021/03/26
- Re: [PULL 0/9] Fixes 20210326 patches, Peter Maydell, 2021/03/26