diff options
author | Shinwoo Kim <cinoo.kim@samsung.com> | 2021-07-28 13:39:37 +0900 |
---|---|---|
committer | Shinwoo Kim <cinoo.kim@samsung.com> | 2021-07-28 14:48:46 +0900 |
commit | e9a73c5b81e6cd90b17f5db5196c6690ff3326f0 (patch) | |
tree | 62964046f0872fc7f00d4ed35ee7f42398625189 /src/modules | |
parent | a5a35217292e73f0ed14d21f29d09e93a08b9ee1 (diff) | |
download | efl-e9a73c5b81e6cd90b17f5db5196c6690ff3326f0.tar.gz |
evas gl: bind texture with external target for map
Summary:
egl images created using tbm surface for native surface set use
GL_TEXTURE_EXTERNA_OES as texture target, so we should bind to
this target when rendering. Or there is a GL_INVALID_OPERATION
error on glBindTexture in function _orig_shader_array_flush.
Thia patch follows logic of following commit;
7db0e20 evas/gl: Bind texture with external target for tbm surface
Reviewers: Hermet, raster, jsuya, herb
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12286
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/evas/engines/gl_common/evas_gl_context.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index e76b27a012..2c07ea6d7e 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -2954,6 +2954,13 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc, int nomul = 0, yinvert = 0; Eina_Bool flat = EINA_FALSE; Eina_Bool blend = EINA_FALSE; + int tex_target = GL_TEXTURE_2D; + + if (tex->im) + { + if (tex->im->native.target == GL_TEXTURE_EXTERNAL_OES) + tex_target = GL_TEXTURE_EXTERNAL_OES; + } if (!(gc->dc->render_op == EVAS_RENDER_COPY) && ((a < 255) || (tex->alpha) || (!!mtex))) blend = EINA_TRUE; @@ -3071,7 +3078,7 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc, gc->pipe[pn].region.type = SHD_MAP; gc->pipe[pn].shader.prog = prog; gc->pipe[pn].shader.cur_tex = tex->pt->texture; - gc->pipe[pn].shader.tex_target = GL_TEXTURE_2D; + gc->pipe[pn].shader.tex_target = tex_target; if (utexture) { |