diff options
Diffstat (limited to 'render')
-rw-r--r-- | render/gles2/renderer.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index f064eeb4..fce0906d 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -94,6 +94,11 @@ static const struct wlr_addon_interface buffer_addon_impl = { }; GLuint gles2_buffer_get_fbo(struct wlr_gles2_buffer *buffer) { + if (buffer->external_only) { + wlr_log(WLR_ERROR, "DMA-BUF format is external-only"); + return 0; + } + if (buffer->fbo) { return buffer->fbo; } @@ -148,18 +153,12 @@ static struct wlr_gles2_buffer *get_or_create_buffer(struct wlr_gles2_renderer * goto error_buffer; } - bool external_only; buffer->image = wlr_egl_create_image_from_dmabuf(renderer->egl, - &dmabuf, &external_only); + &dmabuf, &buffer->external_only); if (buffer->image == EGL_NO_IMAGE_KHR) { goto error_buffer; } - if (external_only) { - wlr_log(WLR_ERROR, "DMA-BUF format is external-only"); - goto error_image; - } - wlr_addon_init(&buffer->addon, &wlr_buffer->addons, renderer, &buffer_addon_impl); |