diff options
author | Akihiko Odaki <akihiko.odaki@gmail.com> | 2021-02-23 15:03:07 +0900 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2021-03-04 09:35:30 +0100 |
commit | bc6a3565c89243f0aaa24bac6dc37fb52b16d5c5 (patch) | |
tree | c67c6b57bd5832fbf17c70bc2fae1d9c91d54b91 /ui/egl-helpers.c | |
parent | d9c32b8f7f5f05511d77a1ec1d1d35bf7bff2961 (diff) |
configure: Improve OpenGL dependency detections
This has the following visible changes:
- GBM is required only for OpenGL dma-buf.
- X11 is explicitly required by gtk-egl.
- EGL is now mandatory for the OpenGL displays.
The last one needs some detailed description. Before this change,
EGL was tested only for OpenGL dma-buf with the check of
EGL_MESA_image_dma_buf_export. However, all of the OpenGL
displays depend on EGL and EGL_MESA_image_dma_buf_export is always
defined by epoxy's EGL interface.
Therefore, it makes more sense to always check the presence of EGL
and say the OpenGL displays are available along with OpenGL dma-buf
if it is present.
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20210223060307.87736-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/egl-helpers.c')
-rw-r--r-- | ui/egl-helpers.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c index 73fe61f878..6d0cb2b5cb 100644 --- a/ui/egl-helpers.c +++ b/ui/egl-helpers.c @@ -140,7 +140,7 @@ void egl_texture_blend(QemuGLShader *gls, egl_fb *dst, egl_fb *src, bool flip, /* ---------------------------------------------------------------------- */ -#ifdef CONFIG_OPENGL_DMABUF +#ifdef CONFIG_GBM int qemu_egl_rn_fd; struct gbm_device *qemu_egl_rn_gbm_dev; @@ -287,7 +287,7 @@ void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf) dmabuf->texture = 0; } -#endif /* CONFIG_OPENGL_DMABUF */ +#endif /* CONFIG_GBM */ /* ---------------------------------------------------------------------- */ @@ -315,6 +315,8 @@ EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, EGLNativeWindowType win) /* ---------------------------------------------------------------------- */ +#if defined(CONFIG_X11) || defined(CONFIG_GBM) + /* * Taken from glamor_egl.h from the Xorg xserver, which is MIT licensed * @@ -441,6 +443,8 @@ int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy, DisplayGLMode mode) #endif } +#endif + bool qemu_egl_has_dmabuf(void) { if (qemu_egl_display == EGL_NO_DISPLAY) { |