summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-26 11:43:21 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-26 11:44:38 +0900
commit473d4312416fb4e512de60b0bcf3014d7e4f85a1 (patch)
treed46ca2f11dce9c59bb63d8fa13c2b71883e63f5a
parent83f38d2b2c66d753f24f1c7af76870ff88e5aff6 (diff)
downloadefl-473d4312416fb4e512de60b0bcf3014d7e4f85a1.tar.gz
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
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c
index 8400593153..d8259eb9d5 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -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]);