evas gl common - fix nv12 text upload with upack row length

we segv'd because our testure width was wrong... i was row span
length in bytes and we use luminance+alpha texture... this fixes it.

@fix
This commit is contained in:
Carsten Haitzler 2017-02-26 11:43:21 +09:00
parent 83f38d2b2c
commit 473d431241
1 changed files with 1 additions and 1 deletions

View File

@ -2203,7 +2203,7 @@ evas_gl_common_texture_nv12_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned
return;
_tex_sub_2d(tex->gc, 0, 0, w, h, tex->pt->format, tex->pt->dataformat, rows[0]);
glBindTexture(GL_TEXTURE_2D, tex->ptuv->texture);
glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[h + 1] - rows[h]);
glPixelStorei(GL_UNPACK_ROW_LENGTH, (rows[h + 1] - rows[h]) / 2);
if (!_tex_2d(tex->gc, tex->ptuv->intformat, w / 2, h / 2, tex->ptuv->format, tex->ptuv->dataformat))
return;
_tex_sub_2d(tex->gc, 0, 0, w / 2, h / 2, tex->ptuv->format, tex->ptuv->dataformat, rows[h]);