[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/24] ui: add qemu_egl_has_dmabuf helper
From: |
Gerd Hoffmann |
Subject: |
[PULL 18/24] ui: add qemu_egl_has_dmabuf helper |
Date: |
Fri, 5 Feb 2021 07:56:14 +0100 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210204105232.834642-15-marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
include/ui/egl-helpers.h | 1 +
ui/egl-helpers.c | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h
index 94a4b3e6f3bd..5b1f7fafe0bc 100644
--- a/include/ui/egl-helpers.h
+++ b/include/ui/egl-helpers.h
@@ -51,5 +51,6 @@ EGLSurface qemu_egl_init_surface_x11(EGLContext ectx,
EGLNativeWindowType win);
int qemu_egl_init_dpy_x11(EGLNativeDisplayType dpy, DisplayGLMode mode);
int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy, DisplayGLMode mode);
EGLContext qemu_egl_init_ctx(void);
+bool qemu_egl_has_dmabuf(void);
#endif /* EGL_HELPERS_H */
diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c
index 7c530c2825be..73fe61f87819 100644
--- a/ui/egl-helpers.c
+++ b/ui/egl-helpers.c
@@ -441,6 +441,16 @@ int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy,
DisplayGLMode mode)
#endif
}
+bool qemu_egl_has_dmabuf(void)
+{
+ if (qemu_egl_display == EGL_NO_DISPLAY) {
+ return false;
+ }
+
+ return epoxy_has_egl_extension(qemu_egl_display,
+ "EGL_EXT_image_dma_buf_import");
+}
+
EGLContext qemu_egl_init_ctx(void)
{
static const EGLint ctx_att_core[] = {
--
2.29.2
- [PULL 01/24] hw/display/qxl: Fix bad printf format specifiers, (continued)
- [PULL 01/24] hw/display/qxl: Fix bad printf format specifiers, Gerd Hoffmann, 2021/02/05
- [PULL 12/24] ui: annotate DCLOps callback requirements, Gerd Hoffmann, 2021/02/05
- [PULL 08/24] vhost-user-gpu: handle display-info in a callback, Gerd Hoffmann, 2021/02/05
- [PULL 15/24] ui: add an optional get_flags callback to GraphicHwOps, Gerd Hoffmann, 2021/02/05
- [PULL 07/24] vhost-user-gpu: use an extandable state enum for commands, Gerd Hoffmann, 2021/02/05
- [PULL 11/24] ui: add gd_gl_area_scanout_disable, Gerd Hoffmann, 2021/02/05
- [PULL 17/24] ui: check hw requirements during DCL registration, Gerd Hoffmann, 2021/02/05
- [PULL 23/24] chardev: check if the chardev is registered for yanking, Gerd Hoffmann, 2021/02/05
- [PULL 10/24] ui: remove gl_ctx_get_current, Gerd Hoffmann, 2021/02/05
- [PULL 24/24] tests: add some virtio-gpu & vhost-user-gpu acceptance test, Gerd Hoffmann, 2021/02/05
- [PULL 18/24] ui: add qemu_egl_has_dmabuf helper,
Gerd Hoffmann <=
- [PULL 16/24] ui: add a DCLOps callback to check dmabuf support, Gerd Hoffmann, 2021/02/05
- [PULL 06/24] vhost-user-gpu: handle vhost-user-gpu features in a callback, Gerd Hoffmann, 2021/02/05
- [PULL 21/24] virtio-gpu: avoid re-entering cmdq processing, Gerd Hoffmann, 2021/02/05
- [PULL 22/24] display/ui: add a callback to indicate GL state is flushed, Gerd Hoffmann, 2021/02/05
- [PULL 05/24] vhost-user-gpu: check backend for EDID support, Gerd Hoffmann, 2021/02/05
- [PULL 19/24] ui: check gtk-egl dmabuf support, Gerd Hoffmann, 2021/02/05
- [PULL 20/24] ui: add egl dmabuf import to gtkglarea, Gerd Hoffmann, 2021/02/05
- Re: [PULL 00/24] Vga ui 20210205 patches, Peter Maydell, 2021/02/05