From 62b6c492d59e956e30cb409c730b4f84d33f8f6e Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 29 Nov 2023 12:16:45 +0100 Subject: render/gles2: check external-only flag in get_or_create_buffer() If the external-only flag is set, then the EGLImage is only supported for use with GL_TEXTURE_EXTERNAL_OES texture targets. In particular, the EGLImage cannot be bound to a RBO. --- render/gles2/renderer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'render') diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index e61c276c..0797adc8 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -122,6 +122,11 @@ static struct wlr_gles2_buffer *get_or_create_buffer(struct wlr_gles2_renderer * goto error_buffer; } + if (external_only) { + wlr_log(WLR_ERROR, "DMA-BUF format is external-only"); + goto error_image; + } + push_gles2_debug(renderer); glGenRenderbuffers(1, &buffer->rbo); -- cgit v1.2.3