diff options
Diffstat (limited to 'ui/egl-helpers.c')
-rw-r--r-- | ui/egl-helpers.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c index 5503a79..e3f2872 100644 --- a/ui/egl-helpers.c +++ b/ui/egl-helpers.c @@ -295,6 +295,7 @@ bool egl_dmabuf_export_texture(uint32_t tex_id, int *fd, EGLint *offset, { EGLImageKHR image; EGLuint64KHR modifiers[DMABUF_MAX_PLANES]; + int i; image = eglCreateImageKHR(qemu_egl_display, eglGetCurrentContext(), EGL_GL_TEXTURE_2D_KHR, @@ -314,6 +315,11 @@ bool egl_dmabuf_export_texture(uint32_t tex_id, int *fd, EGLint *offset, *modifier = modifiers[0]; } + for (i = 0; i < *num_planes; i++) { + if (fd[i] < 0) { + return false; + } + } return true; } |