egl-helpers: add dmabuf import support

Add helper function to import a dma-buf as opengl texture.
Also add a helper to release the texture again.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20171010135453.6704-5-kraxel@redhat.com
This commit is contained in:
Gerd Hoffmann 2017-10-10 15:54:51 +02:00
parent 2e1d70b9e0
commit 86c0522c63
2 changed files with 49 additions and 0 deletions

View file

@ -33,6 +33,9 @@ extern EGLContext qemu_egl_rn_ctx;
int egl_rendernode_init(const char *rendernode);
int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc);
void egl_dmabuf_import_texture(QemuDmaBuf *dmabuf);
void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf);
#endif
EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win);