mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
ui: Create sync objects and fences only for blobs
Create sync objects and fences only for dmabufs that are blobs. Once a fence is created (after glFlush) and is signalled, graphic_hw_gl_flushed() will be called and virtio-gpu cmd processing will be resumed. Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Message-Id: <20210914211837.3229977-4-vivek.kasireddy@intel.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
committed by
Gerd Hoffmann
parent
121abaf3e6
commit
65b847d284
13
ui/gtk.c
13
ui/gtk.c
@ -36,6 +36,7 @@
|
||||
#include "qapi/qapi-commands-machine.h"
|
||||
#include "qapi/qapi-commands-misc.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "qemu/main-loop.h"
|
||||
|
||||
#include "ui/console.h"
|
||||
#include "ui/gtk.h"
|
||||
@ -583,6 +584,18 @@ static void gd_gl_release_dmabuf(DisplayChangeListener *dcl,
|
||||
#endif
|
||||
}
|
||||
|
||||
void gd_hw_gl_flushed(void *vcon)
|
||||
{
|
||||
VirtualConsole *vc = vcon;
|
||||
QemuDmaBuf *dmabuf = vc->gfx.guest_fb.dmabuf;
|
||||
|
||||
graphic_hw_gl_block(vc->gfx.dcl.con, false);
|
||||
graphic_hw_gl_flushed(vc->gfx.dcl.con);
|
||||
qemu_set_fd_handler(dmabuf->fence_fd, NULL, NULL, NULL);
|
||||
close(dmabuf->fence_fd);
|
||||
dmabuf->fence_fd = -1;
|
||||
}
|
||||
|
||||
/** DisplayState Callbacks (opengl version) **/
|
||||
|
||||
static const DisplayChangeListenerOps dcl_gl_area_ops = {
|
||||
|
Reference in New Issue
Block a user