diff options
author | Arnaud Vrac <rawoul@gmail.com> | 2017-11-29 15:25:35 +0100 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2017-12-11 09:34:26 +0000 |
commit | 340d25b76f918d21d1ce75beb62be5686f26f8d3 (patch) | |
tree | 23055cfbc5b6a8314c31ae9dcd53aa26d829b73b | |
parent | 49a8d9997b1e65b15bf069c061f366740b2a1222 (diff) |
gl-renderer: use correct pixel shader for NV12 format uploaded to RG texture
Signed-off-by: Arnaud Vrac <rawoul@gmail.com>
Fixes: 00a03d2f724 ("gl-renderer: add support of WL_SHM_FORMAT_NV12")
Reviewed-by: Daniel Stone <daniels@collabora.com>
-rw-r--r-- | libweston/gl-renderer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c index 8726c340..5a4b83cd 100644 --- a/libweston/gl-renderer.c +++ b/libweston/gl-renderer.c @@ -1597,7 +1597,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; @@ -1606,9 +1605,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; } |