diff options
author | Akihiko Odaki | 2021-02-23 07:03:07 +0100 |
---|---|---|
committer | Gerd Hoffmann | 2021-03-04 09:35:30 +0100 |
commit | bc6a3565c89243f0aaa24bac6dc37fb52b16d5c5 (patch) | |
tree | c67c6b57bd5832fbf17c70bc2fae1d9c91d54b91 /include/ui | |
parent | ui/cocoa: Fix stride resolution of pixman image (diff) | |
download | qemu-bc6a3565c89243f0aaa24bac6dc37fb52b16d5c5.tar.gz qemu-bc6a3565c89243f0aaa24bac6dc37fb52b16d5c5.tar.xz qemu-bc6a3565c89243f0aaa24bac6dc37fb52b16d5c5.zip |
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 'include/ui')
-rw-r--r-- | include/ui/egl-helpers.h | 9 | ||||
-rw-r--r-- | include/ui/spice-display.h | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h index 5b1f7fafe0..f1bf8f97fc 100644 --- a/include/ui/egl-helpers.h +++ b/include/ui/egl-helpers.h @@ -3,7 +3,9 @@ #include <epoxy/gl.h> #include <epoxy/egl.h> +#ifdef CONFIG_GBM #include <gbm.h> +#endif #include "ui/console.h" #include "ui/shader.h" @@ -31,7 +33,7 @@ void egl_texture_blit(QemuGLShader *gls, egl_fb *dst, egl_fb *src, bool flip); void egl_texture_blend(QemuGLShader *gls, egl_fb *dst, egl_fb *src, bool flip, int x, int y, double scale_x, double scale_y); -#ifdef CONFIG_OPENGL_DMABUF +#ifdef CONFIG_GBM extern int qemu_egl_rn_fd; extern struct gbm_device *qemu_egl_rn_gbm_dev; @@ -48,8 +50,13 @@ void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf); EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, EGLNativeWindowType win); +#if defined(CONFIG_X11) || defined(CONFIG_GBM) + int qemu_egl_init_dpy_x11(EGLNativeDisplayType dpy, DisplayGLMode mode); int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy, DisplayGLMode mode); + +#endif + EGLContext qemu_egl_init_ctx(void); bool qemu_egl_has_dmabuf(void); diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h index 4a47ffdd4c..ed298d58f0 100644 --- a/include/ui/spice-display.h +++ b/include/ui/spice-display.h @@ -27,7 +27,7 @@ #include "ui/qemu-pixman.h" #include "ui/console.h" -#if defined(CONFIG_OPENGL_DMABUF) +#if defined(CONFIG_OPENGL) && defined(CONFIG_GBM) # if SPICE_SERVER_VERSION >= 0x000d01 /* release 0.13.1 */ # define HAVE_SPICE_GL 1 # include "ui/egl-helpers.h" |