aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/render
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-06-05 15:13:32 +0200
committerSimon Ser <contact@emersion.fr>2020-06-06 08:59:38 +0200
commita3ba82885ca038fc1e51775cac7ce5ada3bad0e1 (patch)
treebd2f21968b175932a772f3f45bd80c2525b8ed58 /include/wlr/render
parent363bf44a353ca0ce7e9d48476fb187d8da037483 (diff)
render: choose DMA-BUF texture target via eglQueryDmaBufModifiersEXT
EGL_EXT_image_dma_buf_import_modifiers tells us whether we should use GL_TEXTURE_2D or GL_TEXTURE_EXTERNAL_OES. Using the right texture target can fix some failures and/or improve performance on some drivers. This does the same as a Weston commit [1]. [1]: https://gitlab.freedesktop.org/wayland/weston/commit/40c519a3e613 Closes: https://github.com/swaywm/wlroots/issues/2173
Diffstat (limited to 'include/wlr/render')
-rw-r--r--include/wlr/render/egl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h
index 627e9aaf..98435d91 100644
--- a/include/wlr/render/egl.h
+++ b/include/wlr/render/egl.h
@@ -65,6 +65,7 @@ struct wlr_egl {
struct wl_display *wl_display;
struct wlr_drm_format_set dmabuf_formats;
+ EGLBoolean **external_only_dmabuf_formats;
};
// TODO: Allocate and return a wlr_egl
@@ -106,7 +107,7 @@ EGLImageKHR wlr_egl_create_image_from_wl_drm(struct wlr_egl *egl,
* of the dmabuf with wlr_egl_check_import_dmabuf once first.
*/
EGLImageKHR wlr_egl_create_image_from_dmabuf(struct wlr_egl *egl,
- struct wlr_dmabuf_attributes *attributes);
+ struct wlr_dmabuf_attributes *attributes, bool *external_only);
/**
* Get the available dmabuf formats