From 742f10f32c2ee265a3d3b7b512a724ebb72dc276 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 28 Apr 2022 14:34:43 +0100 Subject: [PATCH] gl-renderer: Use vsub for y offset in SHM If we're doing partial uploads from SHM buffers, we need to use the vertical subsampling factor rather than the horizontal for secondary planes. Signed-off-by: Daniel Stone --- libweston/renderer-gl/gl-renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c index 7000920a..2d9f1917 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -1824,7 +1824,7 @@ gl_renderer_flush_damage(struct weston_surface *surface, glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, r.x1 / gb->hsub[j]); glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, - r.y1 / gb->hsub[j]); + r.y1 / gb->vsub[j]); glTexSubImage2D(GL_TEXTURE_2D, 0, r.x1 / gb->hsub[j], r.y1 / gb->vsub[j],