aboutsummaryrefslogtreecommitdiff
path: root/include/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-06-18 13:21:41 +0200
committerGerd Hoffmann <kraxel@redhat.com>2018-06-26 13:48:49 +0200
commit54d208ffdae20fd2bee745a037607a762d3a82a9 (patch)
tree2cc5d2d839d530b1db608194eeb97aea4ffe3e55 /include/ui
parent595123df1d54ed8fbab9e1a73d5a58c5bb71058f (diff)
Add gles support to egl-helpers, wire up in egl-headless and gtk.
Add support for OpenGL ES to egl-helpers. Wire up the new option for egl-headless and gtk UIs. egl-headless actually works fine. gtk hits a not-yet implemented code path in libEGL when trying to use gles mode: libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering. (This is mesa 17.2.3). Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Message-id: 20180618112141.23398-1-kraxel@redhat.com
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/egl-helpers.h7
-rw-r--r--include/ui/gtk.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h
index 747233ce58..9db7293bdb 100644
--- a/include/ui/egl-helpers.h
+++ b/include/ui/egl-helpers.h
@@ -7,6 +7,7 @@
extern EGLDisplay *qemu_egl_display;
extern EGLConfig qemu_egl_config;
+extern DisplayGLMode qemu_egl_mode;
typedef struct egl_fb {
int width;
@@ -34,7 +35,7 @@ extern int qemu_egl_rn_fd;
extern struct gbm_device *qemu_egl_rn_gbm_dev;
extern EGLContext qemu_egl_rn_ctx;
-int egl_rendernode_init(const char *rendernode);
+int egl_rendernode_init(const char *rendernode, DisplayGLMode mode);
int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc);
void egl_dmabuf_import_texture(QemuDmaBuf *dmabuf);
@@ -44,8 +45,8 @@ void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf);
EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win);
-int qemu_egl_init_dpy_x11(EGLNativeDisplayType dpy);
-int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy);
+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);
#endif /* EGL_HELPERS_H */
diff --git a/include/ui/gtk.h b/include/ui/gtk.h
index 2922fc64b2..a79780afc7 100644
--- a/include/ui/gtk.h
+++ b/include/ui/gtk.h
@@ -127,7 +127,7 @@ void gd_egl_release_dmabuf(DisplayChangeListener *dcl,
QemuDmaBuf *dmabuf);
void gd_egl_scanout_flush(DisplayChangeListener *dcl,
uint32_t x, uint32_t y, uint32_t w, uint32_t h);
-void gtk_egl_init(void);
+void gtk_egl_init(DisplayGLMode mode);
int gd_egl_make_current(DisplayChangeListener *dcl,
QEMUGLContext ctx);