Skip to content

opengl/gltexture: use image stride when uploading

Gabriel Souza Franco requested to merge work/gbs/upload-stride into master

Some clients might send buffers with stride larger than its width. Check for this and set GL_UNPACK_ROW_LENGTH as necessary. In case this is not supported (GL ES), pack the bytes first using a CPU copy.

See-also: https://github.com/mpv-player/mpv/issues/13961


Before After
Screenshot_20240811_205815 Screenshot_20240811_210239

Merge request reports