aboutsummaryrefslogtreecommitdiff
path: root/render/gles2
diff options
context:
space:
mode:
Diffstat (limited to 'render/gles2')
-rw-r--r--render/gles2/renderer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index 523c5bd5..cba338a1 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -10,6 +10,7 @@
#include <wlr/render/interface.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_matrix.h>
+#include <wlr/types/wlr_linux_dmabuf_v1.h>
#include <wlr/util/log.h>
#include "render/gles2.h"
@@ -364,6 +365,15 @@ static bool gles2_init_wl_display(struct wlr_renderer *wlr_renderer,
} else {
wlr_log(WLR_INFO, "EGL_WL_bind_wayland_display is not supported");
}
+
+ if (renderer->egl->exts.image_dmabuf_import_ext) {
+ if (wlr_linux_dmabuf_v1_create(wl_display, wlr_renderer) == NULL) {
+ return false;
+ }
+ } else {
+ wlr_log(WLR_INFO, "EGL_EXT_image_dma_buf_import is not supported");
+ }
+
return true;
}