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 <daniels@collabora.com>
dev
Daniel Stone 3 years ago committed by Pekka Paalanen
parent 4161948da9
commit 742f10f32c
  1. 2
      libweston/renderer-gl/gl-renderer.c

@ -1824,7 +1824,7 @@ gl_renderer_flush_damage(struct weston_surface *surface,
glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT,
r.x1 / gb->hsub[j]); r.x1 / gb->hsub[j]);
glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT,
r.y1 / gb->hsub[j]); r.y1 / gb->vsub[j]);
glTexSubImage2D(GL_TEXTURE_2D, 0, glTexSubImage2D(GL_TEXTURE_2D, 0,
r.x1 / gb->hsub[j], r.x1 / gb->hsub[j],
r.y1 / gb->vsub[j], r.y1 / gb->vsub[j],

Loading…
Cancel
Save