Evas GL common: Fix masking of maps based on RGB+A textures
That's like a case that will never happen. Apply a map on an image loaded from an ETC1_ALPHA image. Oh, and also add a mask on top of that.
This commit is contained in:
parent
34bb3bb9a5
commit
be40389bea
|
@ -2442,6 +2442,7 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
|
||||||
Evas_GL_Shader shader = SHADER_IMG;
|
Evas_GL_Shader shader = SHADER_IMG;
|
||||||
Eina_Bool utexture = EINA_FALSE;
|
Eina_Bool utexture = EINA_FALSE;
|
||||||
Eina_Bool uvtexture = EINA_FALSE;
|
Eina_Bool uvtexture = EINA_FALSE;
|
||||||
|
Eina_Bool use_texa = EINA_FALSE;
|
||||||
Shader_Type type;
|
Shader_Type type;
|
||||||
int pn = 0, i;
|
int pn = 0, i;
|
||||||
int flat = 0, nomul = 0;
|
int flat = 0, nomul = 0;
|
||||||
|
@ -2480,6 +2481,10 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
|
||||||
type = SHD_NV12;
|
type = SHD_NV12;
|
||||||
uvtexture = EINA_TRUE;
|
uvtexture = EINA_TRUE;
|
||||||
break;
|
break;
|
||||||
|
case EVAS_COLORSPACE_ETC1_ALPHA:
|
||||||
|
type = SHD_RGB_A_PAIR;
|
||||||
|
use_texa = EINA_TRUE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
type = SHD_MAP;
|
type = SHD_MAP;
|
||||||
break;
|
break;
|
||||||
|
@ -2489,13 +2494,6 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
|
||||||
mtex, NULL, &nomul);
|
mtex, NULL, &nomul);
|
||||||
prog = gc->shared->shader[shader].prog;
|
prog = gc->shared->shader[shader].prog;
|
||||||
|
|
||||||
/* FIXME: Add RGB+A support, as well as YUV map masking
|
|
||||||
* Print error messages for easier debugging... */
|
|
||||||
if (cspace == EVAS_COLORSPACE_ETC1_ALPHA)
|
|
||||||
ERR("Proper support for ETC1+Alpha maps is not implemented!");
|
|
||||||
else if (mtex && (utexture || uvtexture))
|
|
||||||
ERR("Support for YUV or ETC1+Alpha map masking is not implemented!");
|
|
||||||
|
|
||||||
x = w = (p[0].x >> FP);
|
x = w = (p[0].x >> FP);
|
||||||
y = h = (p[0].y >> FP);
|
y = h = (p[0].y >> FP);
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
|
@ -2599,7 +2597,7 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
|
||||||
gc->pipe[pn].array.use_texuv2 = (utexture || uvtexture) ? 1 : 0;
|
gc->pipe[pn].array.use_texuv2 = (utexture || uvtexture) ? 1 : 0;
|
||||||
gc->pipe[pn].array.use_texuv3 = (utexture) ? 1 : 0;
|
gc->pipe[pn].array.use_texuv3 = (utexture) ? 1 : 0;
|
||||||
gc->pipe[pn].array.use_mask = !!mtex;
|
gc->pipe[pn].array.use_mask = !!mtex;
|
||||||
gc->pipe[pn].array.use_texa = 0;
|
gc->pipe[pn].array.use_texa = use_texa;
|
||||||
gc->pipe[pn].array.use_texsam = 0;
|
gc->pipe[pn].array.use_texsam = 0;
|
||||||
|
|
||||||
pipe_region_expand(gc, pn, x, y, w, h);
|
pipe_region_expand(gc, pn, x, y, w, h);
|
||||||
|
|
Loading…
Reference in New Issue