[PATCH weston 5/5] gl-renderer: use correct pixel shader for NV12 format uploaded to RG texture
Emil Velikov
emil.l.velikov at gmail.com
Mon Dec 4 17:08:29 UTC 2017
On 29 November 2017 at 14:25, Arnaud Vrac <rawoul at gmail.com> wrote:
> Signed-off-by: Arnaud Vrac <rawoul at gmail.com>
Please mention how you've spotted and/or verified this.
I'm ~90% this is correct, although I would check with the author.
Vincent, can you double check the patch/series [1]?
Fixes: 00a03d2f724 ("gl-renderer: add support of WL_SHM_FORMAT_NV12")
Cc: Vincent Abriou <vincent.abriou at st.com>
-Emil
> ---
> libweston/gl-renderer.c | 3 ++-
> 1 file cNphanged, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
> index 60a7bf06..4fffa78c 100644
> --- a/libweston/gl-renderer.c
> +++ b/libweston/gl-renderer.c
> @@ -1596,7 +1596,6 @@ gl_renderer_attach_shm(struct weston_surface *es, struct weston_buffer *buffer,
> }
> break;
> case WL_SHM_FORMAT_NV12:
> - gs->shader = &gr->texture_shader_y_xuxv;
> pitch = wl_shm_buffer_get_stride(shm_buffer);
> gl_pixel_type = GL_UNSIGNED_BYTE;
> num_planes = 2;
> @@ -1605,9 +1604,11 @@ gl_renderer_attach_shm(struct weston_surface *es, struct weston_buffer *buffer,
> gs->hsub[1] = 2;
> gs->vsub[1] = 2;
> if (gr->has_gl_texture_rg) {
> + gs->shader = &gr->texture_shader_y_uv;
> gl_format[0] = GL_R8_EXT;
> gl_format[1] = GL_RG8_EXT;
> } else {
> + gs->shader = &gr->texture_shader_y_xuxv;
> gl_format[0] = GL_LUMINANCE;
> gl_format[1] = GL_LUMINANCE_ALPHA;
> }
> --
> 2.15.0
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list