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.
This commit is contained in:
Simon Ser 2023-11-29 12:16:45 +01:00 committed by Alexander Orzechowski
parent 9118226634
commit 62b6c492d5
1 changed files with 5 additions and 0 deletions

View File

@ -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);