Hi Arnaud, On 12/04/2017 06:15 PM, Arnaud Vrac wrote: > On Mon, Dec 4, 2017 at 6:08 PM, Emil Velikov <emil.l.veli...@gmail.com> wrote: >> On 29 November 2017 at 14:25, Arnaud Vrac <raw...@gmail.com> wrote: >>> Signed-off-by: Arnaud Vrac <raw...@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]? > > I'm also not 100% sure about this one, I found all three drivers I > mentionned on the cover letter displayed the wrong colors for NV12 > with R/G textures. This just seemed the logical fix after reading the > pixel shaders code. > > I'll mention this in the commit message. >
Your patch looks good. I had no way to test has_gl_texture_rg when I submit 00a03d2f724 ("gl-renderer: add support of WL_SHM_FORMAT_NV12") Thanks for testing it and correcting it. Reviewed-by: Vincent Abriou <vincent.abr...@st.com> BR Vincent > Thanks, > -Arnaud > >> >> Fixes: 00a03d2f724 ("gl-renderer: add support of WL_SHM_FORMAT_NV12") >> Cc: Vincent Abriou <vincent.abr...@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@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel