diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2015-10-12 12:03:49 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-02-23 12:04:39 +0100 |
commit | 1e3165980c352f90d0f1295bfc4fbfa31193b13f (patch) | |
tree | b9a8eeb9f27bb23cfbbc232e31bf12be54f6d006 /include | |
parent | 014cb152b8219a2cd31ce6443f8708386ded751b (diff) |
egl-helpers: add functions for render nodes and dma-buf passing
Adds helpers to open a drm render node and create a opengl
context for it. Also add a helper to export a texture as
dma-buf.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/ui/egl-helpers.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h index 8c84398001..03fcf4bba2 100644 --- a/include/ui/egl-helpers.h +++ b/include/ui/egl-helpers.h @@ -3,10 +3,23 @@ #include <epoxy/gl.h> #include <epoxy/egl.h> +#include <gbm.h> extern EGLDisplay *qemu_egl_display; extern EGLConfig qemu_egl_config; +#ifdef CONFIG_OPENGL_DMABUF + +extern int qemu_egl_rn_fd; +extern struct gbm_device *qemu_egl_rn_gbm_dev; +extern EGLContext qemu_egl_rn_ctx; + +int qemu_egl_rendernode_open(void); +int egl_rendernode_init(void); +int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc); + +#endif + EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win); int qemu_egl_init_dpy(EGLNativeDisplayType dpy, bool gles, bool debug); |