render: gles2: Add NV12 GLES2 buffers

Rendering to NV12 buffers is not directly supported in GL ES2.0, but can
be implemented by rendering in 2 passes to 2 different EGL images.

This change makes provisions for multiple EGL images inside a
wlr_gles2_buffer and adds a special case for mapping NV12 buffers to
multiple EGL images.

Signed-off-by: Andri Yngvason <andri@yngvason.is>
This commit is contained in:
Andri Yngvason 2026-04-16 13:44:19 +00:00
parent 2283e05c30
commit c074f6e83f
4 changed files with 66 additions and 28 deletions

View file

@ -327,7 +327,7 @@ struct wlr_gles2_render_pass *begin_gles2_buffer_pass(struct wlr_gles2_buffer *b
}
}
GLint fbo = gles2_buffer_get_fbo(buffer);
GLint fbo = gles2_buffer_get_fbo(buffer, 0);
if (!fbo) {
return NULL;
}