[weston 2/2] gl-renderer: add support of WL_SHM_FORMAT_NV12

Daniel Stone daniel at fooishbar.org
Mon Oct 3 13:01:55 UTC 2016

Hi Vincent,

On 5 August 2016 at 10:21, Vincent Abriou <vincent.abriou at st.com> wrote:
> This patch allow weston to accept WL_SHM_FORMAT_NV12 buffers.
> It has been tested on top of weston-1.11

Both of these patches have some quite long lines: could you please
wrap to 80 characters?

> @@ -1352,6 +1353,9 @@ gl_renderer_attach_shm(struct weston_surface *es, struct weston_buffer *buffer,
>         buffer->height = wl_shm_buffer_get_height(shm_buffer);
>         num_planes = 1;
> +       gl_format[0] = GL_LUMINANCE;
> +       gl_format[1] = GL_LUMINANCE;
> +       gl_format[2] = GL_LUMINANCE;

It would be good to use GL_R8/RG8_EXT here rather than
LUMINANCE/LUMINANCE_ALPHA here (if GL_EXT_texture_rg is present), as I
remember the latter two being deprecated and/or having odd sampling
semantics. Also, you might as well just remove this magic up-front
initialisation anyway, since most formats don't use LUMINANCE.

With those fixed, for the series:
Reviewed-by: Daniel Stone <daniels at collabora.com>


More information about the wayland-devel mailing list