_evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc)
{
GLfloat proj[16];
+ unsigned int i;
int w = 1, h = 1, m = 1, rot = 1, foc = 0;
EINA_SAFETY_ON_NULL_RETURN(gc);
gc->shared->ay = ay;
}
- glUseProgram(gc->shared->shader.rect.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.rect.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.font.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.font.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
- glUseProgram(gc->shared->shader.yuv.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.yuv.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.yuv_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.yuv_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
- glUseProgram(gc->shared->shader.yuy2.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.yuy2.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.yuy2_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.yuy2_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
- glUseProgram(gc->shared->shader.tex.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.tex.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.tex_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.tex_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
- glUseProgram(gc->shared->shader.img.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.img_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
- glUseProgram(gc->shared->shader.img_bgra.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img_bgra.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.img_bgra_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img_bgra_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.img_mask.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img_mask.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.filter_invert.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_invert.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.filter_invert_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_invert_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.filter_invert_bgra.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_invert_bgra.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.filter_invert_bgra_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_invert_bgra_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
- glUseProgram(gc->shared->shader.filter_greyscale.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_greyscale.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.filter_greyscale_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_greyscale_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.filter_greyscale_bgra.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_greyscale_bgra.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.filter_greyscale_bgra_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_greyscale_bgra_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
- glUseProgram(gc->shared->shader.filter_sepia.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_sepia.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.filter_sepia_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_sepia_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.filter_sepia_bgra.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_sepia_bgra.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.filter_sepia_bgra_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_sepia_bgra_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
-#if 0
- glUseProgram(gc->shared->shader.filter_blur_bgra_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_blur_bgra_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.filter_blur_bgra_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_blur_bgra_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.filter_blur_bgra_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_blur_bgra_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(gc->shared->shader.filter_blur_bgra_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_blur_bgra_nomul.prog, "mvp"), 1,
- GL_FALSE, proj);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-#endif
-
+ for (i = 0; i < SHADER_LAST; ++i)
+ {
+ glUseProgram(gc->shared->shader[i].prog);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader[i].prog, "mvp"), 1, GL_FALSE, proj);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ }
glUseProgram(gc->pipe[0].shader.cur_prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
if (!evas_gl_common_shader_program_init(shared)) goto error;
- glUseProgram(shared->shader.yuv.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniform1i(glGetUniformLocation(shared->shader.yuv.prog, "tex"), 0);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniform1i(glGetUniformLocation(shared->shader.yuv.prog, "texu"), 1);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniform1i(glGetUniformLocation(shared->shader.yuv.prog, "texv"), 2);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
- glUseProgram(shared->shader.yuy2.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniform1i(glGetUniformLocation(shared->shader.yuy2.prog, "tex"), 0);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniform1i(glGetUniformLocation(shared->shader.yuy2.prog, "texuv"), 1);
+#define SHADER_TEXTURE_ADD(Shared, Shader, Name) \
+ glUseProgram(Shared->shader[SHADER_##Shader].prog); \
+ GLERR(__FUNCTION__, __FILE__, __LINE__, ""); \
+ glUniform1i(glGetUniformLocation(Shared->shader[SHADER_##Shader].prog, #Name), Shared->shader[SHADER_##Shader].tex_count++); \
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUseProgram(shared->shader.yuv_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniform1i(glGetUniformLocation(shared->shader.yuv_nomul.prog, "tex"), 0);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniform1i(glGetUniformLocation(shared->shader.yuv_nomul.prog, "texu"), 1);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniform1i(glGetUniformLocation(shared->shader.yuv_nomul.prog, "texv"), 2);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ SHADER_TEXTURE_ADD(shared, YUV, tex);
+ SHADER_TEXTURE_ADD(shared, YUV, texu);
+ SHADER_TEXTURE_ADD(shared, YUV, texv);
- glUseProgram(shared->shader.yuy2_nomul.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniform1i(glGetUniformLocation(shared->shader.yuy2_nomul.prog, "tex"), 0);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniform1i(glGetUniformLocation(shared->shader.yuy2_nomul.prog, "texuv"), 1);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ SHADER_TEXTURE_ADD(shared, YUY2, tex);
+ SHADER_TEXTURE_ADD(shared, YUY2, texuv);
- glUseProgram(shared->shader.img_mask.prog);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniform1i(glGetUniformLocation(shared->shader.img_mask.prog, "tex"), 0);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glUniform1i(glGetUniformLocation(shared->shader.img_mask.prog, "texm"), 1);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ SHADER_TEXTURE_ADD(shared, YUV_NOMUL, tex);
+ SHADER_TEXTURE_ADD(shared, YUV_NOMUL, texu);
+ SHADER_TEXTURE_ADD(shared, YUV_NOMUL, texv);
+ SHADER_TEXTURE_ADD(shared, YUY2_NOMUL, tex);
+ SHADER_TEXTURE_ADD(shared, YUY2_NOMUL, texuv);
+ SHADER_TEXTURE_ADD(shared, IMG_MASK, tex);
+ SHADER_TEXTURE_ADD(shared, IMG_MASK, texm);
glUseProgram(gc->pipe[0].shader.cur_prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
if ((gc->shared) && (gc->shared->references == 0))
{
Evas_GL_Texture_Pool *pt;
+ int i;
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.rect));
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.font));
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.img));
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.img_nomul));
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.img_bgra));
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.img_bgra_nomul));
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.img_mask));
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.yuv));
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.yuv_nomul));
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.yuy2));
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.yuy2_nomul));
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.tex));
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.tex_nomul));
-
- evas_gl_common_shader_program_shutdown(&(gc->shared->shader.filter_invert));
+ for (i = 0; i < SHADER_LAST; ++i)
+ evas_gl_common_shader_program_shutdown(&(gc->shared->shader[i]));
while (gc->shared->images)
{
{
int pnum, nv, nc, nu, nt, i;
Eina_Bool blend = 0;
- GLuint prog = gc->shared->shader.rect.prog;
+ GLuint prog = gc->shared->shader[SHADER_RECT].prog;
int pn = 0;
if (a < 255) blend = 1;
{
int pnum, nv, nc, nu, nt, i;
Eina_Bool blend = 0;
- GLuint prog = gc->shared->shader.rect.prog;
+ GLuint prog = gc->shared->shader[SHADER_RECT].prog;
int pn = 0;
if (gc->dc->mask.mask)
int pnum, nv, nc, nu, nu2, nt, i;
GLfloat tx1, tx2, ty1, ty2;
Eina_Bool blend = 1;
- GLuint prog = gc->shared->shader.img.prog;
+ GLuint prog = gc->shared->shader[SHADER_IMG].prog;
int pn = 0;
if (!tex->alpha) blend = 0;
if (tex->pt->dyn.img)
{
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
- prog = gc->shared->shader.img_nomul.prog;
+ prog = gc->shared->shader[SHADER_IMG_NOMUL].prog;
else
- prog = gc->shared->shader.img.prog;
+ prog = gc->shared->shader[SHADER_IMG].prog;
}
else
{
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
- prog = gc->shared->shader.tex_nomul.prog;
+ prog = gc->shared->shader[SHADER_TEX_NOMUL].prog;
else
- prog = gc->shared->shader.tex.prog;
+ prog = gc->shared->shader[SHADER_TEX].prog;
}
}
else
if (tex->gc->shared->info.bgra)
{
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
- prog = gc->shared->shader.img_bgra_nomul.prog;
+ prog = gc->shared->shader[SHADER_IMG_BGRA_NOMUL].prog;
else
- prog = gc->shared->shader.img_bgra.prog;
+ prog = gc->shared->shader[SHADER_IMG_BGRA].prog;
}
else
{
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
- prog = gc->shared->shader.img_nomul.prog;
+ prog = gc->shared->shader[SHADER_IMG_NOMUL].prog;
else
- prog = gc->shared->shader.img.prog;
+ prog = gc->shared->shader[SHADER_IMG].prog;
}
}
GLfloat tx1, tx2, ty1, ty2;
GLfloat txm1, txm2, tym1, tym2;
Eina_Bool blend = 1;
- GLuint prog = gc->shared->shader.img_mask.prog;
+ GLuint prog = gc->shared->shader[SHADER_IMG_MASK].prog;
int pn = 0;
#if 0
if (tex->gc->shared->info.bgra)
{
- prog = gc->shared->shader.img_mask.prog;
+ prog = gc->shared->shader[SHADER_IMG_MASK].prog;
}
else
{
#warning Nash: FIXME: Need two shaders?
printf("Not good: Need other texture\n");
- prog = gc->shared->shader.img.prog;
+ prog = gc->shared->shader[SHADER_IMG].prog;
}
#endif
{
int pnum, nv, nc, nu, nt, i;
GLfloat tx1, tx2, ty1, ty2;
+ GLuint prog = gc->shared->shader[SHADER_FONT].prog;
int pn = 0;
again:
{
gc->pipe[pn].region.type = RTYPE_FONT;
gc->pipe[pn].shader.cur_tex = tex->pt->texture;
- gc->pipe[pn].shader.cur_prog = gc->shared->shader.font.prog;
+ gc->pipe[pn].shader.cur_prog = prog;
gc->pipe[pn].shader.smooth = 0;
gc->pipe[pn].shader.blend = 1;
gc->pipe[pn].shader.render_op = gc->dc->render_op;
{
if ((gc->pipe[i].region.type == RTYPE_FONT)
&& (gc->pipe[i].shader.cur_tex == tex->pt->texture)
- && (gc->pipe[i].shader.cur_prog == gc->shared->shader.font.prog)
+ && (gc->pipe[i].shader.cur_prog == prog)
&& (gc->pipe[i].shader.smooth == 0)
&& (gc->pipe[i].shader.blend == 1)
&& (gc->pipe[i].shader.render_op == gc->dc->render_op)
gc->state.top_pipe = pn;
gc->pipe[pn].region.type = RTYPE_FONT;
gc->pipe[pn].shader.cur_tex = tex->pt->texture;
- gc->pipe[pn].shader.cur_prog = gc->shared->shader.font.prog;
+ gc->pipe[pn].shader.cur_prog = prog;
gc->pipe[pn].shader.smooth = 0;
gc->pipe[pn].shader.blend = 1;
gc->pipe[pn].shader.render_op = gc->dc->render_op;
}
#else
if ((gc->pipe[pn].shader.cur_tex != tex->pt->texture)
- || (gc->pipe[pn].shader.cur_prog != gc->shared->shader.font.prog)
+ || (gc->pipe[pn].shader.cur_prog != prog)
|| (gc->pipe[pn].shader.smooth != 0)
|| (gc->pipe[pn].shader.blend != 1)
|| (gc->pipe[pn].shader.render_op != gc->dc->render_op)
{
shader_array_flush(gc);
gc->pipe[pn].shader.cur_tex = tex->pt->texture;
- gc->pipe[pn].shader.cur_prog = gc->shared->shader.font.prog;
+ gc->pipe[pn].shader.cur_prog = prog;
gc->pipe[pn].shader.smooth = 0;
gc->pipe[pn].shader.blend = 1;
gc->pipe[pn].shader.render_op = gc->dc->render_op;
int pnum, nv, nc, nu, nu2, nu3, nt, i;
GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2;
Eina_Bool blend = 0;
- GLuint prog = gc->shared->shader.yuv.prog;
+ GLuint prog = gc->shared->shader[SHADER_YUV].prog;
int pn = 0;
if (a < 255) blend = 1;
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
- prog = gc->shared->shader.yuv_nomul.prog;
+ prog = gc->shared->shader[SHADER_YUV_NOMUL].prog;
else
- prog = gc->shared->shader.yuv.prog;
+ prog = gc->shared->shader[SHADER_YUV].prog;
again:
vertex_array_size_check(gc, gc->state.top_pipe, 6);
{
if ((gc->pipe[i].region.type == RTYPE_YUV)
&& (gc->pipe[i].shader.cur_tex == tex->pt->texture)
- && (gc->pipe[i].shader.cur_prog == gc->shared->shader.font.prog)
+ && (gc->pipe[i].shader.cur_prog == prog)
&& (gc->pipe[i].shader.smooth == smooth)
&& (gc->pipe[i].shader.blend == blend)
&& (gc->pipe[i].shader.render_op == gc->dc->render_op)
int pnum, nv, nc, nu, nu2, nu3, nt, i;
GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2;
Eina_Bool blend = 0;
- GLuint prog = gc->shared->shader.yuy2.prog;
+ GLuint prog = gc->shared->shader[SHADER_YUY2].prog;
int pn = 0;
if (a < 255) blend = 1;
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
- prog = gc->shared->shader.yuy2_nomul.prog;
+ prog = gc->shared->shader[SHADER_YUY2_NOMUL].prog;
else
- prog = gc->shared->shader.yuy2.prog;
+ prog = gc->shared->shader[SHADER_YUY2].prog;
again:
vertex_array_size_check(gc, gc->state.top_pipe, 6);
{
if ((gc->pipe[i].region.type == RTYPE_YUY2)
&& (gc->pipe[i].shader.cur_tex == tex->pt->texture)
- && (gc->pipe[i].shader.cur_prog == gc->shared->shader.font.prog)
+ && (gc->pipe[i].shader.cur_prog == prog)
&& (gc->pipe[i].shader.smooth == smooth)
&& (gc->pipe[i].shader.blend == blend)
&& (gc->pipe[i].shader.render_op == gc->dc->render_op)
GLfloat tx[4], ty[4], t2x[4], t2y[4];
Eina_Bool blend = 1;
DATA32 cmul;
- GLuint prog = gc->shared->shader.img.prog;
+ GLuint prog = gc->shared->shader[SHADER_IMG].prog;
int pn = 0;
int flat = 0;
}
if (yuv)
{
- prog = gc->shared->shader.yuv.prog;
+ prog = gc->shared->shader[SHADER_YUV].prog;
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
{
if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
(p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
- prog = gc->shared->shader.yuv_nomul.prog;
+ prog = gc->shared->shader[SHADER_YUV_NOMUL].prog;
else
- prog = gc->shared->shader.yuv.prog;
+ prog = gc->shared->shader[SHADER_YUV].prog;
}
else
- prog = gc->shared->shader.yuv.prog;
+ prog = gc->shared->shader[SHADER_YUV].prog;
}
else if (yuy2)
{
- prog = gc->shared->shader.yuy2.prog;
+ prog = gc->shared->shader[SHADER_YUY2].prog;
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
{
if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
(p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
- prog = gc->shared->shader.yuy2_nomul.prog;
+ prog = gc->shared->shader[SHADER_YUY2_NOMUL].prog;
else
- prog = gc->shared->shader.yuy2.prog;
+ prog = gc->shared->shader[SHADER_YUY2].prog;
}
else
- prog = gc->shared->shader.yuy2.prog;
+ prog = gc->shared->shader[SHADER_YUY2].prog;
}
else
{
{
if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
(p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
- prog = gc->shared->shader.img_nomul.prog;
+ prog = gc->shared->shader[SHADER_IMG_NOMUL].prog;
else
- prog = gc->shared->shader.img.prog;
+ prog = gc->shared->shader[SHADER_IMG].prog;
}
else
- prog = gc->shared->shader.img.prog;
+ prog = gc->shared->shader[SHADER_IMG].prog;
}
else
{
{
if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
(p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
- prog = gc->shared->shader.tex_nomul.prog;
+ prog = gc->shared->shader[SHADER_TEX_NOMUL].prog;
else
- prog = gc->shared->shader.tex.prog;
+ prog = gc->shared->shader[SHADER_TEX].prog;
}
else
- prog = gc->shared->shader.tex.prog;
+ prog = gc->shared->shader[SHADER_TEX].prog;
}
}
else
{
if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
(p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
- prog = gc->shared->shader.img_bgra_nomul.prog;
+ prog = gc->shared->shader[SHADER_IMG_BGRA_NOMUL].prog;
else
- prog = gc->shared->shader.img_bgra.prog;
+ prog = gc->shared->shader[SHADER_IMG_BGRA].prog;
}
else
- prog = gc->shared->shader.img_bgra.prog;
+ prog = gc->shared->shader[SHADER_IMG_BGRA].prog;
}
else
{
{
if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
(p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
- prog = gc->shared->shader.img_nomul.prog;
+ prog = gc->shared->shader[SHADER_IMG_NOMUL].prog;
else
- prog = gc->shared->shader.img.prog;
+ prog = gc->shared->shader[SHADER_IMG].prog;
}
else
- prog = gc->shared->shader.img.prog;
+ prog = gc->shared->shader[SHADER_IMG].prog;
}
}
}
return 1;
}
+#define SHADER_SOURCE_LINE(Big, Small) \
+ { SHADER_##Big, &(shader_##Small##_vert_src), &(shader_##Small##_frag_src), #Small }
+
+#define SHADER_SOURCE_FILTER_LINE(Big, Small) \
+ { SHADER_##Big, &(shader_img_vert_src), &(shader_##Small##_frag_src), #Small }
+
+static const struct {
+ Evas_GL_Shader id;
+ Evas_GL_Program_Source *vert;
+ Evas_GL_Program_Source *frag;
+ const char *name;
+} _shaders_source[] = {
+ SHADER_SOURCE_LINE(RECT, rect),
+ SHADER_SOURCE_LINE(FONT, font),
+ SHADER_SOURCE_LINE(IMG, img),
+ SHADER_SOURCE_LINE(IMG_NOMUL, img_nomul),
+ SHADER_SOURCE_LINE(IMG_BGRA, img_bgra),
+ SHADER_SOURCE_LINE(IMG_BGRA_NOMUL, img_bgra_nomul),
+ SHADER_SOURCE_LINE(IMG_MASK, img_mask),
+ SHADER_SOURCE_LINE(YUV, yuv),
+ SHADER_SOURCE_LINE(YUV_NOMUL, yuv_nomul),
+ SHADER_SOURCE_LINE(YUY2, yuy2),
+ SHADER_SOURCE_LINE(YUY2_NOMUL, yuy2_nomul),
+ SHADER_SOURCE_LINE(TEX, tex),
+ SHADER_SOURCE_LINE(TEX_NOMUL, tex_nomul),
+ /* Most of the filters use the image fragment shader */
+ SHADER_SOURCE_FILTER_LINE(FILTER_INVERT, filter_invert),
+ SHADER_SOURCE_FILTER_LINE(FILTER_INVERT_NOMUL, filter_invert_nomul),
+ SHADER_SOURCE_FILTER_LINE(FILTER_INVERT_BGRA, filter_invert_bgra),
+ SHADER_SOURCE_FILTER_LINE(FILTER_INVERT_BGRA_NOMUL, filter_invert_bgra_nomul),
+ SHADER_SOURCE_FILTER_LINE(FILTER_GREYSCALE, filter_greyscale),
+ SHADER_SOURCE_FILTER_LINE(FILTER_GREYSCALE_NOMUL, filter_greyscale_nomul),
+ SHADER_SOURCE_FILTER_LINE(FILTER_GREYSCALE_BGRA, filter_greyscale_bgra),
+ SHADER_SOURCE_FILTER_LINE(FILTER_GREYSCALE_BGRA_NOMUL, filter_greyscale_bgra_nomul),
+ SHADER_SOURCE_FILTER_LINE(FILTER_SEPIA, filter_sepia),
+ SHADER_SOURCE_FILTER_LINE(FILTER_SEPIA_NOMUL, filter_sepia_nomul),
+ SHADER_SOURCE_FILTER_LINE(FILTER_SEPIA_BGRA, filter_sepia_bgra),
+ SHADER_SOURCE_FILTER_LINE(FILTER_SEPIA_BGRA_NOMUL, filter_sepia_bgra_nomul)/* , */
+ /* SHADER_SOURCE_LINE(FILTER_BLUR, filter_blur), */
+ /* SHADER_SOURCE_LINE(FILTER_BLUR_NOMUL, filter_blur_nomul), */
+ /* SHADER_SOURCE_LINE(FILTER_BLUR_BGRA, filter_blur_bgra), */
+ /* SHADER_SOURCE_LINE(FILTER_BLUR_BGRA_NOMUL, filter_blur_bgra_nomul) */
+};
+
static int
_evas_gl_common_shader_source_init(Evas_GL_Shared *shared)
{
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.rect),
- &(shader_rect_vert_src),
- &(shader_rect_frag_src),
- "rect")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.font),
- &(shader_font_vert_src),
- &(shader_font_frag_src),
- "font")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.img),
- &(shader_img_vert_src),
- &(shader_img_frag_src),
- "img")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.img_nomul),
- &(shader_img_nomul_vert_src),
- &(shader_img_nomul_frag_src),
- "img_nomul")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.img_bgra),
- &(shader_img_bgra_vert_src),
- &(shader_img_bgra_frag_src),
- "img_bgra")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.img_bgra_nomul),
- &(shader_img_bgra_nomul_vert_src),
- &(shader_img_bgra_nomul_frag_src),
- "img_bgra_nomul")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.img_mask),
- &(shader_img_mask_vert_src),
- &(shader_img_mask_frag_src),
- "img_mask")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.tex),
- &(shader_tex_vert_src),
- &(shader_tex_frag_src),
- "tex")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.tex_nomul),
- &(shader_tex_nomul_vert_src),
- &(shader_tex_nomul_frag_src),
- "tex_nomul")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.yuv),
- &(shader_yuv_vert_src),
- &(shader_yuv_frag_src),
- "yuv")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.yuy2),
- &(shader_yuy2_vert_src),
- &(shader_yuy2_frag_src),
- "yuy2")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.yuy2_nomul),
- &(shader_yuy2_nomul_vert_src),
- &(shader_yuy2_nomul_frag_src),
- "yuy2_nomul")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.yuv_nomul),
- &(shader_yuv_nomul_vert_src),
- &(shader_yuv_nomul_frag_src),
- "yuv_nomul")) return 0;
+ unsigned int i;
- /* Most of the filters use the image fragment shader */
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_invert),
- &(shader_img_vert_src),
- &(shader_filter_invert_frag_src),
- "filter_invert")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_invert_nomul),
- &(shader_img_vert_src),
- &(shader_filter_invert_nomul_frag_src),
- "filter_invert_nomul")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_invert_bgra),
- &(shader_img_vert_src),
- &(shader_filter_invert_bgra_frag_src),
- "filter_invert_bgra")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_invert_bgra_nomul),
- &(shader_img_vert_src),
- &(shader_filter_invert_bgra_nomul_frag_src),
- "filter_invert_bgra_nomul")) return 0;
-
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_sepia),
- &(shader_img_vert_src),
- &(shader_filter_sepia_frag_src),
- "filter_sepia")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_sepia_nomul),
- &(shader_img_vert_src),
- &(shader_filter_sepia_nomul_frag_src),
- "filter_sepia_nomul")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_sepia_bgra),
- &(shader_img_vert_src),
- &(shader_filter_sepia_bgra_frag_src),
- "filter_sepia_bgra")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_sepia_bgra_nomul),
- &(shader_img_vert_src),
- &(shader_filter_sepia_bgra_nomul_frag_src),
- "filter_sepia_bgra_nomul")) return 0;
-
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_greyscale),
- &(shader_img_vert_src),
- &(shader_filter_greyscale_frag_src),
- "filter_greyscale")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_greyscale_nomul),
- &(shader_img_vert_src),
- &(shader_filter_greyscale_nomul_frag_src),
- "filter_greyscale_nomul")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_greyscale_bgra),
- &(shader_img_vert_src),
- &(shader_filter_greyscale_bgra_frag_src),
- "filter_greyscale_bgra")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_greyscale_bgra_nomul),
- &(shader_img_vert_src),
- &(shader_filter_greyscale_bgra_nomul_frag_src),
- "filter_greyscale_bgra_nomul")) return 0;
-#if 0
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_blur),
- &(shader_filter_blur_vert_src),
- &(shader_filter_blur_frag_src),
- "filter_blur")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_blur_nomul),
- &(shader_filter_blur_vert_src),
- &(shader_filter_blur_nomul_frag_src),
- "filter_blur_nomul")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_blur_bgra),
- &(shader_filter_blur_vert_src),
- &(shader_filter_blur_bgra_frag_src),
- "filter_blur_bgra")) return 0;
- if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_blur_bgra_nomul),
- &(shader_filter_blur_vert_src),
- &(shader_filter_blur_bgra_nomul_frag_src),
- "filter_blur_bgra_nomul")) return 0;
-#endif
+ for (i = 0; i < sizeof (_shaders_source) / sizeof (_shaders_source[0]); ++i)
+ if (!_evas_gl_common_shader_program_source_init(&(shared->shader[_shaders_source[i].id]),
+ _shaders_source[i].vert,
+ _shaders_source[i].frag,
+ _shaders_source[i].name))
+ return 0;
return 1;
}
Eet_File *et = NULL;
char bin_dir_path[PATH_MAX];
char bin_file_path[PATH_MAX];
+ unsigned int i;
if (!_evas_gl_shader_dir_check(bin_dir_path, sizeof(bin_dir_path)))
return 0;
et = eet_open(bin_file_path, EET_FILE_MODE_READ);
if (!et) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.rect), "rect", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.font), "font", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.img), "img", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.img_nomul), "img_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.img_bgra), "img_bgra", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.img_bgra_nomul), "img_bgra_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.img_mask), "img_mask", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.tex), "tex", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.tex_nomul),"tex_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.yuv), "yuv", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.yuy2), "yuy2", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.yuv_nomul), "yuv_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.yuy2_nomul), "yuy2_nomul", et)) goto error;
-
- /* Most of the filters use the image fragment shader */
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_invert), "filter_invert", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_invert_nomul), "filter_invert_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_invert_bgra), "filter_invert_bgra", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_invert_bgra_nomul), "filter_invert_bgra_nomul", et)) goto error;
-
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_sepia), "filter_sepia", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_sepia_nomul), "filter_sepia_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_sepia_bgra), "filter_sepia_bgra", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_sepia_bgra_nomul), "filter_sepia_bgra_nomul", et)) goto error;
-
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_greyscale), "filter_greyscale", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_greyscale_nomul), "filter_greyscale_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_greyscale_bgra), "filter_greyscale_bgra", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_greyscale_bgra_nomul), "filter_greyscale_bgra_nomul", et)) goto error;
-#if 0
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_blur), "filter_blur", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_blur_nomul), "filter_blur_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_blur_bgra), "filter_blur_bgra", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_blur_bgra_nomul), "filter_blur_bgra_nomul", et)) goto error;
-#endif
+ for (i = 0; i < sizeof (_shaders_source) / sizeof (_shaders_source[0]); ++i)
+ if (!_evas_gl_common_shader_program_binary_init(&(shared->shader[_shaders_source[i].id]),
+ _shaders_source[i].name,
+ et))
+ goto error;
if (et) eet_close(et);
eet_shutdown();
char bin_dir_path[PATH_MAX];
char bin_file_path[PATH_MAX];
char tmp_file[PATH_MAX];
+ unsigned int i;
if (!_evas_gl_shader_dir_check(bin_dir_path, sizeof(bin_dir_path)))
res = _evas_gl_shader_file_mkpath(bin_dir_path);
et = eet_open(tmp_file, EET_FILE_MODE_WRITE);
if (!et) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.rect), "rect", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.font), "font", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.img), "img", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.img_nomul), "img_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.img_bgra), "img_bgra", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.img_bgra_nomul), "img_bgra_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.img_mask), "img_mask", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.tex), "tex", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.tex_nomul),"tex_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.yuv), "yuv", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.yuy2), "yuy2", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.yuv_nomul), "yuv_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.yuy2_nomul), "yuy2_nomul", et)) goto error;
- /* Most of the filters use the image fragment shader */
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_invert), "filter_invert", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_invert_nomul), "filter_invert_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_invert_bgra), "filter_invert_bgra", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_invert_bgra_nomul), "filter_invert_bgra_nomul", et)) goto error;
-
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_sepia), "filter_sepia", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_sepia_nomul), "filter_sepia_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_sepia_bgra), "filter_sepia_bgra", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_sepia_bgra_nomul), "filter_sepia_bgra_nomul", et)) goto error;
-
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_greyscale), "filter_greyscale", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_greyscale_nomul), "filter_greyscale_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_greyscale_bgra), "filter_greyscale_bgra", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_greyscale_bgra_nomul), "filter_greyscale_bgra_nomul", et)) goto error;
-#if 0
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_blur), "filter_blur", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_blur_nomul), "filter_blur_nomul", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_blur_bgra), "filter_blur_bgra", et)) goto error;
- if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_blur_bgra_nomul), "filter_blur_bgra_nomul", et)) goto error;
-#endif
+ for (i = 0; i < sizeof (_shaders_source) / sizeof (_shaders_source[0]); ++i)
+ if (!_evas_gl_common_shader_program_binary_save(&(shared->shader[_shaders_source[i].id]),
+ _shaders_source[i].name,
+ et))
+ goto error;
if (eet_close(et) != EET_ERROR_NONE) goto error;
if (rename(tmp_file,bin_file_path) < 0) goto error;