summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-02-26 22:05:19 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-02-26 22:07:30 +0900
commit683e5d7d0848b0b044eca151c61ad2254dac2e63 (patch)
treec30f745ce96bdddbbec9899d2fd313ee9e97bf5e
parentb726563a9e127963c0df0058525aff636e876a9d (diff)
Fix evas GL common engine to have a shader to do oversampling on
downscaling. This makes quality much better and "at best" equates to a 16 point sample (2x2 linear interpolation samples, where a linear interpolation sample equates to a 2x2 sample). This will have perfomance impact, but the quality is worth it and makes it closer to software downscaling in quality. It supports 2x2, 2x1 and 1x2 oversampling. YUV not done, nor image mask (font shaders not needed).
-rw-r--r--ChangeLog11
-rw-r--r--NEWS1
-rw-r--r--src/Makefile_Evas.am147
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_common.h35
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c225
-rw-r--r--[-rwxr-xr-x]src/modules/evas/engines/gl_common/evas_gl_core.c0
-rw-r--r--[-rwxr-xr-x]src/modules/evas/engines/gl_common/evas_gl_core.h0
-rw-r--r--[-rwxr-xr-x]src/modules/evas/engines/gl_common/evas_gl_core_private.h0
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_shader.c601
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c23
-rwxr-xr-xsrc/modules/evas/engines/gl_common/shader/compile.sh42
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.h17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.shd17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.h21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.shd21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_frag.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_frag.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.h17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.shd17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_vert.h21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_vert.shd21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.h17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.shd17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.h21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.shd21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_frag.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_frag.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.h17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.shd17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_vert.h21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_vert.shd21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.h20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.shd20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.h19
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.shd19
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.h20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.shd20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.h23
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.shd23
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_frag.h20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_frag.shd20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.h19
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.shd19
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.h20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.shd20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_vert.h23
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_vert.shd23
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_frag.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_frag.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.h17
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd17
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_vert.h21
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_vert.shd21
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_frag.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_frag.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.h17
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd17
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_vert.h21
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_vert.shd21
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_frag.h20
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_frag.shd20
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.h19
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd19
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.h20
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd20
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_vert.h23
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_vert.shd23
83 files changed, 2262 insertions, 203 deletions
diff --git a/ChangeLog b/ChangeLog
index 3504de1cd2..69be09eb60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
12013-02-26 Carsten Haitzler (The Rasterman)
2
3 * Fix evas GL common engine to have a shader to do oversampling on
4 downscaling. This makes quality much better and "at best"
5 equates to a 16 point sample (2x2 linear interpolation samples,
6 where a linear interpolation sample equates to a 2x2 sample). This
7 will have perfomance impact, but the quality is worth it and
8 makes it closer to software downscaling in quality. It supports
9 2x2, 2x1 and 1x2 oversampling. YUV not done, nor image mask
10 (font shaders not needed).
11
12013-02-23 ChunEon Park (Hermet) 122013-02-23 ChunEon Park (Hermet)
2 13
3 * Evas cache: remove the freed worker from the pthread worker list when it's failed to create a new thread so as not to access it if a thread is working newly. 14 * Evas cache: remove the freed worker from the pthread worker list when it's failed to create a new thread so as not to access it if a thread is working newly.
diff --git a/NEWS b/NEWS
index 88792906c5..2bfd3763a5 100644
--- a/NEWS
+++ b/NEWS
@@ -113,6 +113,7 @@ Improvements:
113 * eina: Eina_Tiler now take tile size into account. 113 * eina: Eina_Tiler now take tile size into account.
114 * edje: reduce memory consumption of Edje program handler. 114 * edje: reduce memory consumption of Edje program handler.
115 * eina, evas: improved support for 64bits system. 115 * eina, evas: improved support for 64bits system.
116 * Evas GL engine downscale quality in smooth mode much improved with multisampling up to effectively 16x16 via shaders.
116 117
117Fixes: 118Fixes:
118 * Fix a memory leak in ecore_con_dns when using ecore_con_server_connect 119 * Fix a memory leak in ecore_con_dns when using ecore_con_server_connect
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 0a72fef71e..b1bc1b0c5c 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -442,80 +442,143 @@ modules/evas/engines/gl_common/evas_gl_core.h \
442modules/evas/engines/gl_common/evas_gl_core_private.h \ 442modules/evas/engines/gl_common/evas_gl_core_private.h \
443modules/evas/engines/gl_common/evas_gl_api.c \ 443modules/evas/engines/gl_common/evas_gl_api.c \
444modules/evas/engines/gl_common/evas_gl_api_ext.c \ 444modules/evas/engines/gl_common/evas_gl_api_ext.c \
445modules/evas/engines/gl_common/shader/rect_frag.h \
446modules/evas/engines/gl_common/shader/rect_vert.h \
447modules/evas/engines/gl_common/shader/font_frag.h \ 445modules/evas/engines/gl_common/shader/font_frag.h \
448modules/evas/engines/gl_common/shader/font_vert.h \ 446modules/evas/engines/gl_common/shader/font_vert.h \
449modules/evas/engines/gl_common/shader/img_frag.h \ 447modules/evas/engines/gl_common/shader/img_12_bgra_frag.h \
450modules/evas/engines/gl_common/shader/img_vert.h \ 448modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.h \
451modules/evas/engines/gl_common/shader/img_nomul_frag.h \ 449modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.h \
452modules/evas/engines/gl_common/shader/img_nomul_vert.h \ 450modules/evas/engines/gl_common/shader/img_12_bgra_vert.h \
451modules/evas/engines/gl_common/shader/img_12_frag.h \
452modules/evas/engines/gl_common/shader/img_12_nomul_frag.h \
453modules/evas/engines/gl_common/shader/img_12_nomul_vert.h \
454modules/evas/engines/gl_common/shader/img_12_vert.h \
455modules/evas/engines/gl_common/shader/img_21_bgra_frag.h \
456modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.h \
457modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.h \
458modules/evas/engines/gl_common/shader/img_21_bgra_vert.h \
459modules/evas/engines/gl_common/shader/img_21_frag.h \
460modules/evas/engines/gl_common/shader/img_21_nomul_frag.h \
461modules/evas/engines/gl_common/shader/img_21_nomul_vert.h \
462modules/evas/engines/gl_common/shader/img_21_vert.h \
463modules/evas/engines/gl_common/shader/img_22_bgra_frag.h \
464modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.h \
465modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.h \
466modules/evas/engines/gl_common/shader/img_22_bgra_vert.h \
467modules/evas/engines/gl_common/shader/img_22_frag.h \
468modules/evas/engines/gl_common/shader/img_22_nomul_frag.h \
469modules/evas/engines/gl_common/shader/img_22_nomul_vert.h \
470modules/evas/engines/gl_common/shader/img_22_vert.h \
453modules/evas/engines/gl_common/shader/img_bgra_frag.h \ 471modules/evas/engines/gl_common/shader/img_bgra_frag.h \
454modules/evas/engines/gl_common/shader/img_bgra_vert.h \
455modules/evas/engines/gl_common/shader/img_bgra_nomul_frag.h \ 472modules/evas/engines/gl_common/shader/img_bgra_nomul_frag.h \
456modules/evas/engines/gl_common/shader/img_bgra_nomul_vert.h \ 473modules/evas/engines/gl_common/shader/img_bgra_nomul_vert.h \
474modules/evas/engines/gl_common/shader/img_bgra_vert.h \
475modules/evas/engines/gl_common/shader/img_frag.h \
457modules/evas/engines/gl_common/shader/img_mask_frag.h \ 476modules/evas/engines/gl_common/shader/img_mask_frag.h \
458modules/evas/engines/gl_common/shader/img_mask_vert.h \ 477modules/evas/engines/gl_common/shader/img_mask_vert.h \
478modules/evas/engines/gl_common/shader/img_nomul_frag.h \
479modules/evas/engines/gl_common/shader/img_nomul_vert.h \
480modules/evas/engines/gl_common/shader/img_vert.h \
481modules/evas/engines/gl_common/shader/nv12_frag.h \
482modules/evas/engines/gl_common/shader/nv12_nomul_frag.h \
459modules/evas/engines/gl_common/shader/nv12_nomul_vert.h \ 483modules/evas/engines/gl_common/shader/nv12_nomul_vert.h \
460modules/evas/engines/gl_common/shader/nv12_vert.h \ 484modules/evas/engines/gl_common/shader/nv12_vert.h \
461modules/evas/engines/gl_common/shader/nv12_nomul_frag.h \ 485modules/evas/engines/gl_common/shader/rect_frag.h \
462modules/evas/engines/gl_common/shader/nv12_frag.h \ 486modules/evas/engines/gl_common/shader/rect_vert.h \
463modules/evas/engines/gl_common/shader/yuv_frag.h \ 487modules/evas/engines/gl_common/shader/tex_12_frag.h \
464modules/evas/engines/gl_common/shader/yuv_vert.h \ 488modules/evas/engines/gl_common/shader/tex_12_nomul_frag.h \
465modules/evas/engines/gl_common/shader/yuv_nomul_frag.h \ 489modules/evas/engines/gl_common/shader/tex_12_nomul_vert.h \
466modules/evas/engines/gl_common/shader/yuv_nomul_vert.h \ 490modules/evas/engines/gl_common/shader/tex_12_vert.h \
491modules/evas/engines/gl_common/shader/tex_21_frag.h \
492modules/evas/engines/gl_common/shader/tex_21_nomul_frag.h \
493modules/evas/engines/gl_common/shader/tex_21_nomul_vert.h \
494modules/evas/engines/gl_common/shader/tex_21_vert.h \
495modules/evas/engines/gl_common/shader/tex_22_frag.h \
496modules/evas/engines/gl_common/shader/tex_22_nomul_frag.h \
497modules/evas/engines/gl_common/shader/tex_22_nomul_vert.h \
498modules/evas/engines/gl_common/shader/tex_22_vert.h \
467modules/evas/engines/gl_common/shader/tex_frag.h \ 499modules/evas/engines/gl_common/shader/tex_frag.h \
468modules/evas/engines/gl_common/shader/tex_vert.h \
469modules/evas/engines/gl_common/shader/tex_nomul_frag.h \ 500modules/evas/engines/gl_common/shader/tex_nomul_frag.h \
470modules/evas/engines/gl_common/shader/tex_nomul_vert.h \ 501modules/evas/engines/gl_common/shader/tex_nomul_vert.h \
502modules/evas/engines/gl_common/shader/tex_vert.h \
503modules/evas/engines/gl_common/shader/yuv_frag.h \
504modules/evas/engines/gl_common/shader/yuv_nomul_frag.h \
505modules/evas/engines/gl_common/shader/yuv_nomul_vert.h \
506modules/evas/engines/gl_common/shader/yuv_vert.h \
471modules/evas/engines/gl_common/shader/yuy2_frag.h \ 507modules/evas/engines/gl_common/shader/yuy2_frag.h \
472modules/evas/engines/gl_common/shader/yuy2_vert.h \
473modules/evas/engines/gl_common/shader/yuy2_nomul_frag.h \ 508modules/evas/engines/gl_common/shader/yuy2_nomul_frag.h \
474modules/evas/engines/gl_common/shader/yuy2_nomul_vert.h 509modules/evas/engines/gl_common/shader/yuy2_nomul_vert.h \
510modules/evas/engines/gl_common/shader/yuy2_vert.h
511
475EXTRA_DIST += \ 512EXTRA_DIST += \
476modules/evas/engines/gl_common/shader/compile.sh \ 513modules/evas/engines/gl_common/shader/compile.sh \
477modules/evas/engines/gl_common/shader/make-c-str.sh \ 514modules/evas/engines/gl_common/shader/make-c-str.sh \
478modules/evas/engines/gl_common/shader/rect_frag.shd \
479modules/evas/engines/gl_common/shader/rect_vert.shd \
480modules/evas/engines/gl_common/shader/font_frag.shd \ 515modules/evas/engines/gl_common/shader/font_frag.shd \
481modules/evas/engines/gl_common/shader/font_vert.shd \ 516modules/evas/engines/gl_common/shader/font_vert.shd \
482modules/evas/engines/gl_common/shader/img_frag.shd \ 517modules/evas/engines/gl_common/shader/img_12_bgra_frag.shd \
483modules/evas/engines/gl_common/shader/img_vert.shd \ 518modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.shd \
484modules/evas/engines/gl_common/shader/img_nomul_frag.shd \ 519modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.shd \
485modules/evas/engines/gl_common/shader/img_nomul_vert.shd \ 520modules/evas/engines/gl_common/shader/img_12_bgra_vert.shd \
486modules/evas/engines/gl_common/shader/img_bgra_vert.shd \ 521modules/evas/engines/gl_common/shader/img_12_frag.shd \
522modules/evas/engines/gl_common/shader/img_12_nomul_frag.shd \
523modules/evas/engines/gl_common/shader/img_12_nomul_vert.shd \
524modules/evas/engines/gl_common/shader/img_12_vert.shd \
525modules/evas/engines/gl_common/shader/img_21_bgra_frag.shd \
526modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.shd \
527modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.shd \
528modules/evas/engines/gl_common/shader/img_21_bgra_vert.shd \
529modules/evas/engines/gl_common/shader/img_21_frag.shd \
530modules/evas/engines/gl_common/shader/img_21_nomul_frag.shd \
531modules/evas/engines/gl_common/shader/img_21_nomul_vert.shd \
532modules/evas/engines/gl_common/shader/img_21_vert.shd \
533modules/evas/engines/gl_common/shader/img_22_bgra_frag.shd \
534modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.shd \
535modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.shd \
536modules/evas/engines/gl_common/shader/img_22_bgra_vert.shd \
537modules/evas/engines/gl_common/shader/img_22_frag.shd \
538modules/evas/engines/gl_common/shader/img_22_nomul_frag.shd \
539modules/evas/engines/gl_common/shader/img_22_nomul_vert.shd \
540modules/evas/engines/gl_common/shader/img_22_vert.shd \
487modules/evas/engines/gl_common/shader/img_bgra_frag.shd \ 541modules/evas/engines/gl_common/shader/img_bgra_frag.shd \
488modules/evas/engines/gl_common/shader/img_bgra_vert.shd \
489modules/evas/engines/gl_common/shader/img_bgra_nomul_frag.shd \ 542modules/evas/engines/gl_common/shader/img_bgra_nomul_frag.shd \
490modules/evas/engines/gl_common/shader/img_bgra_nomul_vert.shd \ 543modules/evas/engines/gl_common/shader/img_bgra_nomul_vert.shd \
491modules/evas/engines/gl_common/shader/img_mask_frag.h \ 544modules/evas/engines/gl_common/shader/img_bgra_vert.shd \
545modules/evas/engines/gl_common/shader/img_frag.shd \
492modules/evas/engines/gl_common/shader/img_mask_frag.shd \ 546modules/evas/engines/gl_common/shader/img_mask_frag.shd \
493modules/evas/engines/gl_common/shader/img_mask_vert.h \
494modules/evas/engines/gl_common/shader/img_mask_vert.shd \ 547modules/evas/engines/gl_common/shader/img_mask_vert.shd \
495modules/evas/engines/gl_common/shader/yuv_frag.shd \ 548modules/evas/engines/gl_common/shader/img_nomul_frag.shd \
496modules/evas/engines/gl_common/shader/yuv_vert.shd \ 549modules/evas/engines/gl_common/shader/img_nomul_vert.shd \
497modules/evas/engines/gl_common/shader/yuv_nomul_frag.shd \ 550modules/evas/engines/gl_common/shader/img_vert.shd \
498modules/evas/engines/gl_common/shader/yuv_nomul_vert.shd \
499modules/evas/engines/gl_common/shader/tex_frag.shd \
500modules/evas/engines/gl_common/shader/tex_vert.shd \
501modules/evas/engines/gl_common/shader/tex_nomul_frag.shd \
502modules/evas/engines/gl_common/shader/tex_nomul_vert.shd \
503modules/evas/engines/gl_common/shader/nv12_frag.h \
504modules/evas/engines/gl_common/shader/nv12_frag.shd \ 551modules/evas/engines/gl_common/shader/nv12_frag.shd \
505modules/evas/engines/gl_common/shader/nv12_nomul_frag.h \
506modules/evas/engines/gl_common/shader/nv12_nomul_frag.shd \ 552modules/evas/engines/gl_common/shader/nv12_nomul_frag.shd \
507modules/evas/engines/gl_common/shader/nv12_nomul_vert.h \
508modules/evas/engines/gl_common/shader/nv12_nomul_vert.shd \ 553modules/evas/engines/gl_common/shader/nv12_nomul_vert.shd \
509modules/evas/engines/gl_common/shader/nv12_vert.h \
510modules/evas/engines/gl_common/shader/nv12_vert.shd \ 554modules/evas/engines/gl_common/shader/nv12_vert.shd \
511modules/evas/engines/gl_common/shader/yuy2_frag.h \ 555modules/evas/engines/gl_common/shader/rect_frag.shd \
556modules/evas/engines/gl_common/shader/rect_vert.shd \
557modules/evas/engines/gl_common/shader/tex_12_frag.shd \
558modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd \
559modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd \
560modules/evas/engines/gl_common/shader/tex_12_vert.shd \
561modules/evas/engines/gl_common/shader/tex_21_frag.shd \
562modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd \
563modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd \
564modules/evas/engines/gl_common/shader/tex_21_vert.shd \
565modules/evas/engines/gl_common/shader/tex_22_frag.shd \
566modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd \
567modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd \
568modules/evas/engines/gl_common/shader/tex_22_vert.shd \
569modules/evas/engines/gl_common/shader/tex_frag.shd \
570modules/evas/engines/gl_common/shader/tex_nomul_frag.shd \
571modules/evas/engines/gl_common/shader/tex_nomul_vert.shd \
572modules/evas/engines/gl_common/shader/tex_vert.shd \
573modules/evas/engines/gl_common/shader/yuv_frag.shd \
574modules/evas/engines/gl_common/shader/yuv_nomul_frag.shd \
575modules/evas/engines/gl_common/shader/yuv_nomul_vert.shd \
576modules/evas/engines/gl_common/shader/yuv_vert.shd \
512modules/evas/engines/gl_common/shader/yuy2_frag.shd \ 577modules/evas/engines/gl_common/shader/yuy2_frag.shd \
513modules/evas/engines/gl_common/shader/yuy2_nomul_frag.h \
514modules/evas/engines/gl_common/shader/yuy2_nomul_frag.shd \ 578modules/evas/engines/gl_common/shader/yuy2_nomul_frag.shd \
515modules/evas/engines/gl_common/shader/yuy2_nomul_vert.h \
516modules/evas/engines/gl_common/shader/yuy2_nomul_vert.shd \ 579modules/evas/engines/gl_common/shader/yuy2_nomul_vert.shd \
517modules/evas/engines/gl_common/shader/yuy2_vert.h \
518modules/evas/engines/gl_common/shader/yuy2_vert.shd 580modules/evas/engines/gl_common/shader/yuy2_vert.shd
581
519if EVAS_STATIC_BUILD_GL_COMMON 582if EVAS_STATIC_BUILD_GL_COMMON
520lib_evas_libevas_la_SOURCES += $(GL_COMMON_SOURCES) 583lib_evas_libevas_la_SOURCES += $(GL_COMMON_SOURCES)
521lib_evas_libevas_la_LIBADD += @evas_engine_gl_common_libs@ 584lib_evas_libevas_la_LIBADD += @evas_engine_gl_common_libs@
diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h
index 1910a463da..01f06c2b78 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -117,6 +117,7 @@
117#define SHAD_TEXUV2 3 117#define SHAD_TEXUV2 3
118#define SHAD_TEXUV3 4 118#define SHAD_TEXUV3 4
119#define SHAD_TEXM 5 119#define SHAD_TEXM 5
120#define SHAD_TEXSAM 6
120 121
121typedef struct _Evas_GL_Program Evas_GL_Program; 122typedef struct _Evas_GL_Program Evas_GL_Program;
122typedef struct _Evas_GL_Program_Source Evas_GL_Program_Source; 123typedef struct _Evas_GL_Program_Source Evas_GL_Program_Source;
@@ -132,19 +133,44 @@ typedef struct _Evas_GL_Polygon_Point Evas_GL_Polygon_Point;
132typedef enum { 133typedef enum {
133 SHADER_RECT, 134 SHADER_RECT,
134 SHADER_FONT, 135 SHADER_FONT,
136
137 SHADER_IMG_MASK,
138
135 SHADER_IMG, 139 SHADER_IMG,
136 SHADER_IMG_NOMUL, 140 SHADER_IMG_NOMUL,
137 SHADER_IMG_BGRA, 141 SHADER_IMG_BGRA,
138 SHADER_IMG_BGRA_NOMUL, 142 SHADER_IMG_BGRA_NOMUL,
139 SHADER_IMG_MASK, 143 SHADER_TEX,
144 SHADER_TEX_NOMUL,
145
146 SHADER_IMG_21,
147 SHADER_IMG_21_NOMUL,
148 SHADER_IMG_21_BGRA,
149 SHADER_IMG_21_BGRA_NOMUL,
150 SHADER_TEX_21,
151 SHADER_TEX_21_NOMUL,
152
153 SHADER_IMG_12,
154 SHADER_IMG_12_NOMUL,
155 SHADER_IMG_12_BGRA,
156 SHADER_IMG_12_BGRA_NOMUL,
157 SHADER_TEX_12,
158 SHADER_TEX_12_NOMUL,
159
160 SHADER_IMG_22,
161 SHADER_IMG_22_NOMUL,
162 SHADER_IMG_22_BGRA,
163 SHADER_IMG_22_BGRA_NOMUL,
164 SHADER_TEX_22,
165 SHADER_TEX_22_NOMUL,
166
140 SHADER_YUV, 167 SHADER_YUV,
141 SHADER_YUV_NOMUL, 168 SHADER_YUV_NOMUL,
142 SHADER_YUY2, 169 SHADER_YUY2,
143 SHADER_YUY2_NOMUL, 170 SHADER_YUY2_NOMUL,
144 SHADER_NV12, 171 SHADER_NV12,
145 SHADER_NV12_NOMUL, 172 SHADER_NV12_NOMUL,
146 SHADER_TEX, 173/*
147 SHADER_TEX_NOMUL,
148 SHADER_FILTER_INVERT, 174 SHADER_FILTER_INVERT,
149 SHADER_FILTER_INVERT_NOMUL, 175 SHADER_FILTER_INVERT_NOMUL,
150 SHADER_FILTER_INVERT_BGRA, 176 SHADER_FILTER_INVERT_BGRA,
@@ -157,6 +183,7 @@ typedef enum {
157 SHADER_FILTER_SEPIA_NOMUL, 183 SHADER_FILTER_SEPIA_NOMUL,
158 SHADER_FILTER_SEPIA_BGRA, 184 SHADER_FILTER_SEPIA_BGRA,
159 SHADER_FILTER_SEPIA_BGRA_NOMUL, 185 SHADER_FILTER_SEPIA_BGRA_NOMUL,
186 */
160 /* SHADER_FILTER_BLUR, */ 187 /* SHADER_FILTER_BLUR, */
161 /* SHADER_FILTER_BLUR_NOMUL, */ 188 /* SHADER_FILTER_BLUR_NOMUL, */
162 /* SHADER_FILTER_BLUR_BGRA, */ 189 /* SHADER_FILTER_BLUR_BGRA, */
@@ -328,6 +355,7 @@ struct _Evas_Engine_GL_Context
328 GLfloat *texuv2; 355 GLfloat *texuv2;
329 GLfloat *texuv3; 356 GLfloat *texuv3;
330 GLfloat *texm; 357 GLfloat *texm;
358 GLfloat *texsam;
331 Eina_Bool line: 1; 359 Eina_Bool line: 1;
332 Eina_Bool use_vertex : 1; 360 Eina_Bool use_vertex : 1;
333 Eina_Bool use_color : 1; 361 Eina_Bool use_color : 1;
@@ -335,6 +363,7 @@ struct _Evas_Engine_GL_Context
335 Eina_Bool use_texuv2 : 1; 363 Eina_Bool use_texuv2 : 1;
336 Eina_Bool use_texuv3 : 1; 364 Eina_Bool use_texuv3 : 1;
337 Eina_Bool use_texm : 1; 365 Eina_Bool use_texm : 1;
366 Eina_Bool use_texsam : 1;
338 Evas_GL_Image *im; 367 Evas_GL_Image *im;
339 GLuint buffer; 368 GLuint buffer;
340 int buffer_alloc; 369 int buffer_alloc;
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 ba75a43c06..dc0c4be423 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -812,6 +812,7 @@ evas_gl_common_context_free(Evas_Engine_GL_Context *gc)
812 if (gc->pipe[i].array.texm) free(gc->pipe[i].array.texm); 812 if (gc->pipe[i].array.texm) free(gc->pipe[i].array.texm);
813 if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2); 813 if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2);
814 if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3); 814 if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3);
815 if (gc->pipe[i].array.texsam) free(gc->pipe[i].array.texsam);
815 } 816 }
816 } 817 }
817 818
@@ -1047,32 +1048,43 @@ evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc,
1047#define PUSH_TEXM(n, u, v) \ 1048#define PUSH_TEXM(n, u, v) \
1048 gc->pipe[n].array.texm[nm++] = u; \ 1049 gc->pipe[n].array.texm[nm++] = u; \
1049 gc->pipe[n].array.texm[nm++] = v 1050 gc->pipe[n].array.texm[nm++] = v
1051#define PUSH_TEXSAM(n, x, y) \
1052 gc->pipe[n].array.texsam[ns++] = x; \
1053 gc->pipe[n].array.texsam[ns++] = y
1050 1054
1051 1055
1052static inline void 1056static inline void
1053array_alloc(Evas_Engine_GL_Context *gc, int n) 1057array_alloc(Evas_Engine_GL_Context *gc, int n)
1054{ 1058{
1055 gc->havestuff = EINA_TRUE; 1059 gc->havestuff = EINA_TRUE;
1056 if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc) return; 1060 if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc)
1061 {
1062#define ALOC(field, type, size) \
1063 if ((gc->pipe[n].array.use_##field) && (!gc->pipe[n].array.field)) \
1064 gc->pipe[n].array.field = \
1065 malloc(gc->pipe[n].array.alloc * sizeof(type) * size)
1066 ALOC(vertex, GLshort, 3);
1067 ALOC(color, GLubyte, 4);
1068 ALOC(texuv, GLfloat, 2);
1069 ALOC(texm, GLfloat, 2);
1070 ALOC(texuv2, GLfloat, 2);
1071 ALOC(texuv3, GLfloat, 2);
1072 ALOC(texsam, GLfloat, 2);
1073 return;
1074 }
1057 gc->pipe[n].array.alloc += 6 * 1024; 1075 gc->pipe[n].array.alloc += 6 * 1024;
1058 if (gc->pipe[n].array.use_vertex) 1076#define RALOC(field, type, size) \
1059 gc->pipe[n].array.vertex = realloc(gc->pipe[n].array.vertex, 1077 if (gc->pipe[n].array.use_##field) \
1060 gc->pipe[n].array.alloc * sizeof(GLshort) * 3); 1078 gc->pipe[n].array.field = realloc \
1061 if (gc->pipe[n].array.use_color) 1079 (gc->pipe[n].array.field, \
1062 gc->pipe[n].array.color = realloc(gc->pipe[n].array.color, 1080 gc->pipe[n].array.alloc * sizeof(type) * size)
1063 gc->pipe[n].array.alloc * sizeof(GLubyte) * 4); 1081 RALOC(vertex, GLshort, 3);
1064 if (gc->pipe[n].array.use_texuv) 1082 RALOC(color, GLubyte, 4);
1065 gc->pipe[n].array.texuv = realloc(gc->pipe[n].array.texuv, 1083 RALOC(texuv, GLfloat, 2);
1066 gc->pipe[n].array.alloc * sizeof(GLfloat) * 2); 1084 RALOC(texm, GLfloat, 2);
1067 if (gc->pipe[n].array.use_texm) 1085 RALOC(texuv2, GLfloat, 2);
1068 gc->pipe[n].array.texm = realloc(gc->pipe[n].array.texm, 1086 RALOC(texuv3, GLfloat, 2);
1069 gc->pipe[n].array.alloc * sizeof(GLfloat) * 2); 1087 RALOC(texsam, GLfloat, 2);
1070 if (gc->pipe[n].array.use_texuv2)
1071 gc->pipe[n].array.texuv2 = realloc(gc->pipe[n].array.texuv2,
1072 gc->pipe[n].array.alloc * sizeof(GLfloat) * 2);
1073 if (gc->pipe[n].array.use_texuv3)
1074 gc->pipe[n].array.texuv3 = realloc(gc->pipe[n].array.texuv3,
1075 gc->pipe[n].array.alloc * sizeof(GLfloat) * 2);
1076} 1088}
1077 1089
1078#ifdef GLPIPES 1090#ifdef GLPIPES
@@ -1304,6 +1316,8 @@ evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
1304 gc->pipe[pn].array.use_texuv = 0; 1316 gc->pipe[pn].array.use_texuv = 0;
1305 gc->pipe[pn].array.use_texuv2 = 0; 1317 gc->pipe[pn].array.use_texuv2 = 0;
1306 gc->pipe[pn].array.use_texuv3 = 0; 1318 gc->pipe[pn].array.use_texuv3 = 0;
1319 gc->pipe[pn].array.use_texm = 0;
1320 gc->pipe[pn].array.use_texsam = 0;
1307 1321
1308 pnum = gc->pipe[pn].array.num; 1322 pnum = gc->pipe[pn].array.num;
1309 nv = pnum * 3; nc = pnum * 4; 1323 nv = pnum * 3; nc = pnum * 4;
@@ -1325,6 +1339,8 @@ evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
1325 gc->pipe[pn].array.use_texuv = 0; 1339 gc->pipe[pn].array.use_texuv = 0;
1326 gc->pipe[pn].array.use_texuv2 = 0; 1340 gc->pipe[pn].array.use_texuv2 = 0;
1327 gc->pipe[pn].array.use_texuv3 = 0; 1341 gc->pipe[pn].array.use_texuv3 = 0;
1342 gc->pipe[pn].array.use_texm = 0;
1343 gc->pipe[pn].array.use_texsam = 0;
1328} 1344}
1329 1345
1330void 1346void
@@ -1362,6 +1378,8 @@ again:
1362 gc->pipe[pn].array.use_texuv = 0; 1378 gc->pipe[pn].array.use_texuv = 0;
1363 gc->pipe[pn].array.use_texuv2 = 0; 1379 gc->pipe[pn].array.use_texuv2 = 0;
1364 gc->pipe[pn].array.use_texuv3 = 0; 1380 gc->pipe[pn].array.use_texuv3 = 0;
1381 gc->pipe[pn].array.use_texm = 0;
1382 gc->pipe[pn].array.use_texsam = 0;
1365 } 1383 }
1366 else 1384 else
1367 { 1385 {
@@ -1408,6 +1426,8 @@ again:
1408 gc->pipe[pn].array.use_texuv = 0; 1426 gc->pipe[pn].array.use_texuv = 0;
1409 gc->pipe[pn].array.use_texuv2 = 0; 1427 gc->pipe[pn].array.use_texuv2 = 0;
1410 gc->pipe[pn].array.use_texuv3 = 0; 1428 gc->pipe[pn].array.use_texuv3 = 0;
1429 gc->pipe[pn].array.use_texm = 0;
1430 gc->pipe[pn].array.use_texsam = 0;
1411 } 1431 }
1412 } 1432 }
1413#else 1433#else
@@ -1438,6 +1458,8 @@ again:
1438 gc->pipe[pn].array.use_texuv = 0; 1458 gc->pipe[pn].array.use_texuv = 0;
1439 gc->pipe[pn].array.use_texuv2 = 0; 1459 gc->pipe[pn].array.use_texuv2 = 0;
1440 gc->pipe[pn].array.use_texuv3 = 0; 1460 gc->pipe[pn].array.use_texuv3 = 0;
1461 gc->pipe[pn].array.use_texm = 0;
1462 gc->pipe[pn].array.use_texsam = 0;
1441#endif 1463#endif
1442 1464
1443 pipe_region_expand(gc, pn, x, y, w, h); 1465 pipe_region_expand(gc, pn, x, y, w, h);
@@ -1469,11 +1491,11 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
1469 int r, int g, int b, int a, 1491 int r, int g, int b, int a,
1470 Eina_Bool smooth, Eina_Bool tex_only) 1492 Eina_Bool smooth, Eina_Bool tex_only)
1471{ 1493{
1472 int pnum, nv, nc, nu, i; 1494 int pnum, nv, nc, nu, ns, i;
1473 GLfloat tx1, tx2, ty1, ty2; 1495 GLfloat tx1, tx2, ty1, ty2;
1474 Eina_Bool blend = 1; 1496 Eina_Bool blend = 1;
1475 GLuint prog = gc->shared->shader[SHADER_IMG].prog; 1497 GLuint prog = gc->shared->shader[SHADER_IMG].prog;
1476 int pn = 0; 1498 int pn = 0, sam = 0;
1477 1499
1478 if (!tex->alpha) blend = 0; 1500 if (!tex->alpha) blend = 0;
1479 if (a < 255) blend = 1; 1501 if (a < 255) blend = 1;
@@ -1486,26 +1508,110 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
1486 { 1508 {
1487 if (tex->pt->dyn.img) 1509 if (tex->pt->dyn.img)
1488 { 1510 {
1489 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, 1511 if ((smooth) && ((sw >= (w * 2)) && (sh >= (h * 2))))
1490 SHADER_IMG_BGRA_NOMUL, SHADER_IMG_BGRA)].prog; 1512 {
1513 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1514 SHADER_IMG_22_BGRA_NOMUL, SHADER_IMG_22_BGRA)].prog;
1515 sam = 1;
1516 }
1517 else if ((smooth) && (sw >= (w * 2)))
1518 {
1519 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1520 SHADER_IMG_21_BGRA_NOMUL, SHADER_IMG_21_BGRA)].prog;
1521 sam = 1;
1522 }
1523 else if ((smooth) && (sh >= (h * 2)))
1524 {
1525 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1526 SHADER_IMG_12_BGRA_NOMUL, SHADER_IMG_12_BGRA)].prog;
1527 sam = 1;
1528 }
1529 else
1530 {
1531 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1532 SHADER_IMG_BGRA_NOMUL, SHADER_IMG_BGRA)].prog;
1533 }
1491 } 1534 }
1492 else 1535 else
1493 { 1536 {
1494 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, 1537 if ((smooth) && ((sw >= (w * 2)) && (sh >= (h * 2))))
1495 SHADER_TEX_NOMUL, SHADER_TEX)].prog; 1538 {
1539 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1540 SHADER_TEX_22_NOMUL, SHADER_TEX_22)].prog;
1541 sam = 1;
1542 }
1543 else if ((smooth) && (sw >= (w * 2)))
1544 {
1545 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1546 SHADER_TEX_21_NOMUL, SHADER_TEX_21)].prog;
1547 sam = 1;
1548 }
1549 else if ((smooth) && (sh >= (h * 2)))
1550 {
1551 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1552 SHADER_TEX_12_NOMUL, SHADER_TEX_12)].prog;
1553 sam = 1;
1554 }
1555 else
1556 {
1557 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1558 SHADER_TEX_NOMUL, SHADER_TEX)].prog;
1559 }
1496 } 1560 }
1497 } 1561 }
1498 else 1562 else
1499 { 1563 {
1500 if (tex->gc->shared->info.bgra) 1564 if (tex->gc->shared->info.bgra)
1501 { 1565 {
1502 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, 1566 if ((smooth) && ((sw >= (w * 2)) && (sh >= (h * 2))))
1503 SHADER_IMG_BGRA_NOMUL, SHADER_IMG_BGRA)].prog; 1567 {
1568 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1569 SHADER_IMG_22_BGRA_NOMUL, SHADER_IMG_22_BGRA)].prog;
1570 sam = 1;
1571 }
1572 else if ((smooth) && (sw >= (w * 2)))
1573 {
1574 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1575 SHADER_IMG_21_BGRA_NOMUL, SHADER_IMG_21_BGRA)].prog;
1576 sam = 1;
1577 }
1578 else if ((smooth) && (sh >= (h * 2)))
1579 {
1580 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1581 SHADER_IMG_12_BGRA_NOMUL, SHADER_IMG_12_BGRA)].prog;
1582 sam = 1;
1583 }
1584 else
1585 {
1586 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1587 SHADER_IMG_BGRA_NOMUL, SHADER_IMG_BGRA)].prog;
1588 }
1504 } 1589 }
1505 else 1590 else
1506 { 1591 {
1507 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, 1592 if ((smooth) && ((sw >= (w * 2)) && (sh >= (h * 2))))
1508 SHADER_IMG_NOMUL, SHADER_IMG)].prog; 1593 {
1594 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1595 SHADER_IMG_22_NOMUL, SHADER_IMG_22)].prog;
1596 sam = 1;
1597 }
1598 else if ((smooth) && (sw >= (w * 2)))
1599 {
1600 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1601 SHADER_IMG_21_NOMUL, SHADER_IMG_21)].prog;
1602 sam = 1;
1603 }
1604 else if ((smooth) && (sh >= (h * 2)))
1605 {
1606 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1607 SHADER_IMG_12_NOMUL, SHADER_IMG_12)].prog;
1608 sam = 1;
1609 }
1610 else
1611 {
1612 prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
1613 SHADER_IMG_NOMUL, SHADER_IMG)].prog;
1614 }
1509 } 1615 }
1510 } 1616 }
1511 1617
@@ -1535,11 +1641,13 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
1535 gc->pipe[pn].array.use_texuv = 1; 1641 gc->pipe[pn].array.use_texuv = 1;
1536 gc->pipe[pn].array.use_texuv2 = 0; 1642 gc->pipe[pn].array.use_texuv2 = 0;
1537 gc->pipe[pn].array.use_texuv3 = 0; 1643 gc->pipe[pn].array.use_texuv3 = 0;
1644 gc->pipe[pn].array.use_texm = 0;
1645 gc->pipe[pn].array.use_texsam = sam;
1538 1646
1539 pipe_region_expand(gc, pn, x, y, w, h); 1647 pipe_region_expand(gc, pn, x, y, w, h);
1540 1648
1541 pnum = gc->pipe[pn].array.num; 1649 pnum = gc->pipe[pn].array.num;
1542 nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; 1650 nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; ns = pnum * 2;
1543 gc->pipe[pn].array.num += 6; 1651 gc->pipe[pn].array.num += 6;
1544 array_alloc(gc, pn); 1652 array_alloc(gc, pn);
1545 1653
@@ -1574,6 +1682,20 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
1574 PUSH_TEXUV(pn, tx2, ty2); 1682 PUSH_TEXUV(pn, tx2, ty2);
1575 PUSH_TEXUV(pn, tx1, ty2); 1683 PUSH_TEXUV(pn, tx1, ty2);
1576 1684
1685 if (sam)
1686 {
1687 double samx = (double)(sw) / (double)(tex->pt->w * w * 4);
1688 double samy = (double)(sh) / (double)(tex->pt->h * h * 4);
1689
1690 PUSH_TEXSAM(pn, samx, samy);
1691 PUSH_TEXSAM(pn, samx, samy);
1692 PUSH_TEXSAM(pn, samx, samy);
1693
1694 PUSH_TEXSAM(pn, samx, samy);
1695 PUSH_TEXSAM(pn, samx, samy);
1696 PUSH_TEXSAM(pn, samx, samy);
1697 }
1698
1577 // if nomul... dont need this 1699 // if nomul... dont need this
1578 for (i = 0; i < 6; i++) 1700 for (i = 0; i < 6; i++)
1579 { 1701 {
@@ -1639,6 +1761,7 @@ evas_gl_common_context_image_mask_push(Evas_Engine_GL_Context *gc,
1639 gc->pipe[pn].array.use_texuv2 = 0; 1761 gc->pipe[pn].array.use_texuv2 = 0;
1640 gc->pipe[pn].array.use_texuv3 = 0; 1762 gc->pipe[pn].array.use_texuv3 = 0;
1641 gc->pipe[pn].array.use_texm = 1; 1763 gc->pipe[pn].array.use_texm = 1;
1764 gc->pipe[pn].array.use_texsam = 0;
1642 1765
1643 pipe_region_expand(gc, pn, x, y, w, h); 1766 pipe_region_expand(gc, pn, x, y, w, h);
1644 1767
@@ -1745,6 +1868,8 @@ evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
1745 gc->pipe[pn].array.use_texuv = 1; 1868 gc->pipe[pn].array.use_texuv = 1;
1746 gc->pipe[pn].array.use_texuv2 = 0; 1869 gc->pipe[pn].array.use_texuv2 = 0;
1747 gc->pipe[pn].array.use_texuv3 = 0; 1870 gc->pipe[pn].array.use_texuv3 = 0;
1871 gc->pipe[pn].array.use_texm = 0;
1872 gc->pipe[pn].array.use_texsam = 0;
1748 1873
1749 pipe_region_expand(gc, pn, x, y, w, h); 1874 pipe_region_expand(gc, pn, x, y, w, h);
1750 1875
@@ -1836,6 +1961,8 @@ evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc,
1836 gc->pipe[pn].array.use_texuv = 1; 1961 gc->pipe[pn].array.use_texuv = 1;
1837 gc->pipe[pn].array.use_texuv2 = 1; 1962 gc->pipe[pn].array.use_texuv2 = 1;
1838 gc->pipe[pn].array.use_texuv3 = 1; 1963 gc->pipe[pn].array.use_texuv3 = 1;
1964 gc->pipe[pn].array.use_texm = 0;
1965 gc->pipe[pn].array.use_texsam = 0;
1839 1966
1840 pipe_region_expand(gc, pn, x, y, w, h); 1967 pipe_region_expand(gc, pn, x, y, w, h);
1841 1968
@@ -1938,6 +2065,8 @@ evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc,
1938 gc->pipe[pn].array.use_texuv = 1; 2065 gc->pipe[pn].array.use_texuv = 1;
1939 gc->pipe[pn].array.use_texuv2 = 1; 2066 gc->pipe[pn].array.use_texuv2 = 1;
1940 gc->pipe[pn].array.use_texuv3 = 0; 2067 gc->pipe[pn].array.use_texuv3 = 0;
2068 gc->pipe[pn].array.use_texm = 0;
2069 gc->pipe[pn].array.use_texsam = 0;
1941 2070
1942 pipe_region_expand(gc, pn, x, y, w, h); 2071 pipe_region_expand(gc, pn, x, y, w, h);
1943 2072
@@ -2034,6 +2163,8 @@ evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc,
2034 gc->pipe[pn].array.use_texuv = 1; 2163 gc->pipe[pn].array.use_texuv = 1;
2035 gc->pipe[pn].array.use_texuv2 = 1; 2164 gc->pipe[pn].array.use_texuv2 = 1;
2036 gc->pipe[pn].array.use_texuv3 = 0; 2165 gc->pipe[pn].array.use_texuv3 = 0;
2166 gc->pipe[pn].array.use_texm = 0;
2167 gc->pipe[pn].array.use_texsam = 0;
2037 2168
2038 pipe_region_expand(gc, pn, x, y, w, h); 2169 pipe_region_expand(gc, pn, x, y, w, h);
2039 2170
@@ -2276,6 +2407,8 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
2276 gc->pipe[pn].array.use_texuv = 1; 2407 gc->pipe[pn].array.use_texuv = 1;
2277 gc->pipe[pn].array.use_texuv2 = (utexture || uvtexture) ? 1 : 0; 2408 gc->pipe[pn].array.use_texuv2 = (utexture || uvtexture) ? 1 : 0;
2278 gc->pipe[pn].array.use_texuv3 = (utexture) ? 1 : 0; 2409 gc->pipe[pn].array.use_texuv3 = (utexture) ? 1 : 0;
2410 gc->pipe[pn].array.use_texm = 0;
2411 gc->pipe[pn].array.use_texsam = 0;
2279 2412
2280 pipe_region_expand(gc, pn, x, y, w, h); 2413 pipe_region_expand(gc, pn, x, y, w, h);
2281 2414
@@ -2582,6 +2715,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
2582 unsigned char *texuv2_ptr = NULL; 2715 unsigned char *texuv2_ptr = NULL;
2583 unsigned char *texuv3_ptr = NULL; 2716 unsigned char *texuv3_ptr = NULL;
2584 unsigned char *texm_ptr = NULL; 2717 unsigned char *texm_ptr = NULL;
2718 unsigned char *texsam_ptr = NULL;
2585 2719
2586 if (glsym_glMapBuffer && glsym_glUnmapBuffer) 2720 if (glsym_glMapBuffer && glsym_glUnmapBuffer)
2587 { 2721 {
@@ -2596,11 +2730,11 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
2596 texuv2_ptr = texuv_ptr + TEX_SIZE; 2730 texuv2_ptr = texuv_ptr + TEX_SIZE;
2597 texuv3_ptr = texuv2_ptr + TEX_SIZE; 2731 texuv3_ptr = texuv2_ptr + TEX_SIZE;
2598 texm_ptr = texuv3_ptr + TEX_SIZE; 2732 texm_ptr = texuv3_ptr + TEX_SIZE;
2599# define END_POINTER (texm_ptr + TEX_SIZE) 2733 texsam_ptr = texm_ptr + TEX_SIZE;
2734# define END_POINTER (texsam_ptr + TEX_SIZE)
2600 2735
2601 glBindBuffer(GL_ARRAY_BUFFER, gc->pipe[i].array.buffer); 2736 glBindBuffer(GL_ARRAY_BUFFER, gc->pipe[i].array.buffer);
2602 if ((gc->pipe[i].array.buffer_alloc < (long)END_POINTER) || 2737 if ((gc->pipe[i].array.buffer_alloc < (long)END_POINTER) ||
2603
2604 (gc->pipe[i].array.buffer_use >= (ARRAY_BUFFER_USE + ARRAY_BUFFER_USE_SHIFT * i))) 2738 (gc->pipe[i].array.buffer_use >= (ARRAY_BUFFER_USE + ARRAY_BUFFER_USE_SHIFT * i)))
2605 { 2739 {
2606 glBufferData(GL_ARRAY_BUFFER, (long)END_POINTER, NULL, GL_STATIC_DRAW); 2740 glBufferData(GL_ARRAY_BUFFER, (long)END_POINTER, NULL, GL_STATIC_DRAW);
@@ -2624,6 +2758,8 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
2624 memcpy(x + (unsigned long)texuv3_ptr, gc->pipe[i].array.texuv3, TEX_SIZE); 2758 memcpy(x + (unsigned long)texuv3_ptr, gc->pipe[i].array.texuv3, TEX_SIZE);
2625 if (gc->pipe[i].array.use_texm) 2759 if (gc->pipe[i].array.use_texm)
2626 memcpy(x + (unsigned long)texm_ptr, gc->pipe[i].array.texm, TEX_SIZE); 2760 memcpy(x + (unsigned long)texm_ptr, gc->pipe[i].array.texm, TEX_SIZE);
2761 if (gc->pipe[i].array.use_texsam)
2762 memcpy(x + (unsigned long)texsam_ptr, gc->pipe[i].array.texsam, TEX_SIZE);
2627 glsym_glUnmapBuffer(GL_ARRAY_BUFFER); 2763 glsym_glUnmapBuffer(GL_ARRAY_BUFFER);
2628 } 2764 }
2629 } 2765 }
@@ -2635,6 +2771,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
2635 texuv2_ptr = (unsigned char *)gc->pipe[i].array.texuv2; 2771 texuv2_ptr = (unsigned char *)gc->pipe[i].array.texuv2;
2636 texuv3_ptr = (unsigned char *)gc->pipe[i].array.texuv3; 2772 texuv3_ptr = (unsigned char *)gc->pipe[i].array.texuv3;
2637 texm_ptr = (unsigned char *)gc->pipe[i].array.texm; 2773 texm_ptr = (unsigned char *)gc->pipe[i].array.texm;
2774 texsam_ptr = (unsigned char *)gc->pipe[i].array.texsam;
2638 } 2775 }
2639 glVertexAttribPointer(SHAD_VERTEX, 3, GL_SHORT, GL_FALSE, 0, (void *)vertex_ptr); 2776 glVertexAttribPointer(SHAD_VERTEX, 3, GL_SHORT, GL_FALSE, 0, (void *)vertex_ptr);
2640 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 2777 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
@@ -2685,6 +2822,17 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
2685 { 2822 {
2686 glDisableVertexAttribArray(SHAD_TEXM); 2823 glDisableVertexAttribArray(SHAD_TEXM);
2687 } 2824 }
2825 if (gc->pipe[i].array.use_texsam)
2826 {
2827 glEnableVertexAttribArray(SHAD_TEXSAM);
2828 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
2829 glVertexAttribPointer(SHAD_TEXSAM, 2, GL_FLOAT, GL_FALSE, 0, (void *)texsam_ptr);
2830 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
2831 }
2832 else
2833 {
2834 glDisableVertexAttribArray(SHAD_TEXSAM);
2835 }
2688 if ((gc->pipe[i].array.use_texuv2) && (gc->pipe[i].array.use_texuv3)) 2836 if ((gc->pipe[i].array.use_texuv2) && (gc->pipe[i].array.use_texuv3))
2689 { 2837 {
2690 glEnableVertexAttribArray(SHAD_TEXUV2); 2838 glEnableVertexAttribArray(SHAD_TEXUV2);
@@ -2788,13 +2936,24 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
2788 if (gc->pipe[i].array.texm) free(gc->pipe[i].array.texm); 2936 if (gc->pipe[i].array.texm) free(gc->pipe[i].array.texm);
2789 if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2); 2937 if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2);
2790 if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3); 2938 if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3);
2791 2939 if (gc->pipe[i].array.texsam) free(gc->pipe[i].array.texsam);
2940
2941 gc->pipe[i].array.line = 0;
2942 gc->pipe[i].array.use_vertex = 0;
2943 gc->pipe[i].array.use_color = 0;
2944 gc->pipe[i].array.use_texuv = 0;
2945 gc->pipe[i].array.use_texuv2 = 0;
2946 gc->pipe[i].array.use_texuv3 = 0;
2947 gc->pipe[i].array.use_texm = 0;
2948 gc->pipe[i].array.use_texsam = 0;
2949
2792 gc->pipe[i].array.vertex = NULL; 2950 gc->pipe[i].array.vertex = NULL;
2793 gc->pipe[i].array.color = NULL; 2951 gc->pipe[i].array.color = NULL;
2794 gc->pipe[i].array.texuv = NULL; 2952 gc->pipe[i].array.texuv = NULL;
2795 gc->pipe[i].array.texm = NULL; 2953 gc->pipe[i].array.texm = NULL;
2796 gc->pipe[i].array.texuv2 = NULL; 2954 gc->pipe[i].array.texuv2 = NULL;
2797 gc->pipe[i].array.texuv3 = NULL; 2955 gc->pipe[i].array.texuv3 = NULL;
2956 gc->pipe[i].array.texsam = NULL;
2798 2957
2799 gc->pipe[i].array.num = 0; 2958 gc->pipe[i].array.num = 0;
2800 gc->pipe[i].array.alloc = 0; 2959 gc->pipe[i].array.alloc = 0;
diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.c b/src/modules/evas/engines/gl_common/evas_gl_core.c
index 125a9be827..125a9be827 100755..100644
--- a/src/modules/evas/engines/gl_common/evas_gl_core.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_core.c
diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.h b/src/modules/evas/engines/gl_common/evas_gl_core.h
index 369b3c3237..369b3c3237 100755..100644
--- a/src/modules/evas/engines/gl_common/evas_gl_core.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_core.h
diff --git a/src/modules/evas/engines/gl_common/evas_gl_core_private.h b/src/modules/evas/engines/gl_common/evas_gl_core_private.h
index 62c1da47e5..62c1da47e5 100755..100644
--- a/src/modules/evas/engines/gl_common/evas_gl_core_private.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_core_private.h
diff --git a/src/modules/evas/engines/gl_common/evas_gl_shader.c b/src/modules/evas/engines/gl_common/evas_gl_shader.c
index af258d28e4..76402fc538 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_shader.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c
@@ -38,116 +38,104 @@ Evas_GL_Program_Source shader_font_vert_src =
38 NULL, 0 38 NULL, 0
39}; 39};
40 40
41/////////////////////////////////////////////
42const char yuv_frag_glsl[] =
43#include "shader/yuv_frag.h"
44 ;
45Evas_GL_Program_Source shader_yuv_frag_src =
46{
47 yuv_frag_glsl,
48 NULL, 0
49};
50 41
51const char yuv_vert_glsl[] = 42
52#include "shader/yuv_vert.h"
53 ;
54Evas_GL_Program_Source shader_yuv_vert_src =
55{
56 yuv_vert_glsl,
57 NULL, 0
58};
59 43
60///////////////////////////////////////////// 44/////////////////////////////////////////////
61const char yuy2_frag_glsl[] = 45const char img_mask_frag_glsl[] =
62#include "shader/yuy2_frag.h" 46#include "shader/img_mask_frag.h"
63 ; 47 ;
64Evas_GL_Program_Source shader_yuy2_frag_src = 48Evas_GL_Program_Source shader_img_mask_frag_src =
65{ 49{
66 yuy2_frag_glsl, 50 img_mask_frag_glsl,
67 NULL, 0 51 NULL, 0
68}; 52};
69 53
70const char yuy2_vert_glsl[] = 54const char img_mask_vert_glsl[] =
71#include "shader/yuy2_vert.h" 55#include "shader/img_mask_vert.h"
72 ; 56 ;
73Evas_GL_Program_Source shader_yuy2_vert_src = 57Evas_GL_Program_Source shader_img_mask_vert_src =
74{ 58{
75 yuy2_vert_glsl, 59 img_mask_vert_glsl,
76 NULL, 0 60 NULL, 0
77}; 61};
78 62
63
64
65
79///////////////////////////////////////////// 66/////////////////////////////////////////////
80const char yuy2_nomul_frag_glsl[] = 67const char img_frag_glsl[] =
81#include "shader/yuy2_nomul_frag.h" 68#include "shader/img_frag.h"
82 ; 69 ;
83Evas_GL_Program_Source shader_yuy2_nomul_frag_src = 70Evas_GL_Program_Source shader_img_frag_src =
84{ 71{
85 yuy2_nomul_frag_glsl, 72 img_frag_glsl,
86 NULL, 0 73 NULL, 0
87}; 74};
88 75
89const char yuy2_nomul_vert_glsl[] = 76const char img_vert_glsl[] =
90#include "shader/yuy2_nomul_vert.h" 77#include "shader/img_vert.h"
91 ; 78 ;
92Evas_GL_Program_Source shader_yuy2_nomul_vert_src = 79Evas_GL_Program_Source shader_img_vert_src =
93{ 80{
94 yuy2_nomul_vert_glsl, 81 img_vert_glsl,
95 NULL, 0 82 NULL, 0
96}; 83};
97 84
98///////////////////////////////////////////// 85/////////////////////////////////////////////
99const char nv12_nomul_vert_glsl[] = 86const char img_nomul_frag_glsl[] =
100#include "shader/nv12_nomul_vert.h" 87#include "shader/img_nomul_frag.h"
101 ; 88 ;
102Evas_GL_Program_Source shader_nv12_nomul_vert_src = 89Evas_GL_Program_Source shader_img_nomul_frag_src =
103{ 90{
104 nv12_nomul_vert_glsl, 91 img_nomul_frag_glsl,
105 NULL, 0 92 NULL, 0
106}; 93};
107 94
108const char nv12_vert_glsl[] = 95const char img_nomul_vert_glsl[] =
109#include "shader/nv12_vert.h" 96#include "shader/img_nomul_vert.h"
110 ; 97 ;
111Evas_GL_Program_Source shader_nv12_vert_src = 98Evas_GL_Program_Source shader_img_nomul_vert_src =
112{ 99{
113 nv12_vert_glsl, 100 img_nomul_vert_glsl,
114 NULL, 0 101 NULL, 0
115}; 102};
116 103
117const char nv12_frag_glsl[] = 104/////////////////////////////////////////////
118#include "shader/nv12_frag.h" 105const char img_bgra_frag_glsl[] =
106#include "shader/img_bgra_frag.h"
119 ; 107 ;
120Evas_GL_Program_Source shader_nv12_frag_src = 108Evas_GL_Program_Source shader_img_bgra_frag_src =
121{ 109{
122 nv12_frag_glsl, 110 img_bgra_frag_glsl,
123 NULL, 0 111 NULL, 0
124}; 112};
125 113
126const char nv12_nomul_frag_glsl[] = 114const char img_bgra_vert_glsl[] =
127#include "shader/nv12_nomul_frag.h" 115#include "shader/img_bgra_vert.h"
128 ; 116 ;
129Evas_GL_Program_Source shader_nv12_nomul_frag_src = 117Evas_GL_Program_Source shader_img_bgra_vert_src =
130{ 118{
131 nv12_nomul_frag_glsl, 119 img_bgra_vert_glsl,
132 NULL, 0 120 NULL, 0
133}; 121};
134 122
135///////////////////////////////////////////// 123/////////////////////////////////////////////
136const char yuv_nomul_frag_glsl[] = 124const char img_bgra_nomul_frag_glsl[] =
137#include "shader/yuv_nomul_frag.h" 125#include "shader/img_bgra_nomul_frag.h"
138 ; 126 ;
139Evas_GL_Program_Source shader_yuv_nomul_frag_src = 127Evas_GL_Program_Source shader_img_bgra_nomul_frag_src =
140{ 128{
141 yuv_nomul_frag_glsl, 129 img_bgra_nomul_frag_glsl,
142 NULL, 0 130 NULL, 0
143}; 131};
144 132
145const char yuv_nomul_vert_glsl[] = 133const char img_bgra_nomul_vert_glsl[] =
146#include "shader/yuv_nomul_vert.h" 134#include "shader/img_bgra_nomul_vert.h"
147 ; 135 ;
148Evas_GL_Program_Source shader_yuv_nomul_vert_src = 136Evas_GL_Program_Source shader_img_bgra_nomul_vert_src =
149{ 137{
150 yuv_nomul_vert_glsl, 138 img_bgra_nomul_vert_glsl,
151 NULL, 0 139 NULL, 0
152}; 140};
153 141
@@ -189,100 +177,470 @@ Evas_GL_Program_Source shader_tex_nomul_vert_src =
189 NULL, 0 177 NULL, 0
190}; 178};
191 179
180
181
182
183/////////////////////////////////////////////
184const char img_21_frag_glsl[] =
185#include "shader/img_21_frag.h"
186 ;
187Evas_GL_Program_Source shader_img_21_frag_src =
188{
189 img_21_frag_glsl,
190 NULL, 0
191};
192
193const char img_21_vert_glsl[] =
194#include "shader/img_21_vert.h"
195 ;
196Evas_GL_Program_Source shader_img_21_vert_src =
197{
198 img_21_vert_glsl,
199 NULL, 0
200};
201
192///////////////////////////////////////////// 202/////////////////////////////////////////////
193const char img_frag_glsl[] = 203const char img_21_nomul_frag_glsl[] =
194#include "shader/img_frag.h" 204#include "shader/img_21_nomul_frag.h"
195 ; 205 ;
196Evas_GL_Program_Source shader_img_frag_src = 206Evas_GL_Program_Source shader_img_21_nomul_frag_src =
197{ 207{
198 img_frag_glsl, 208 img_21_nomul_frag_glsl,
199 NULL, 0 209 NULL, 0
200}; 210};
201 211
202const char img_vert_glsl[] = 212const char img_21_nomul_vert_glsl[] =
203#include "shader/img_vert.h" 213#include "shader/img_21_nomul_vert.h"
204 ; 214 ;
205Evas_GL_Program_Source shader_img_vert_src = 215Evas_GL_Program_Source shader_img_21_nomul_vert_src =
206{ 216{
207 img_vert_glsl, 217 img_21_nomul_vert_glsl,
208 NULL, 0 218 NULL, 0
209}; 219};
210 220
211///////////////////////////////////////////// 221/////////////////////////////////////////////
212const char img_nomul_frag_glsl[] = 222const char img_21_bgra_frag_glsl[] =
213#include "shader/img_nomul_frag.h" 223#include "shader/img_21_bgra_frag.h"
214 ; 224 ;
215Evas_GL_Program_Source shader_img_nomul_frag_src = 225Evas_GL_Program_Source shader_img_21_bgra_frag_src =
216{ 226{
217 img_nomul_frag_glsl, 227 img_21_bgra_frag_glsl,
218 NULL, 0 228 NULL, 0
219}; 229};
220 230
221const char img_nomul_vert_glsl[] = 231const char img_21_bgra_vert_glsl[] =
222#include "shader/img_nomul_vert.h" 232#include "shader/img_21_bgra_vert.h"
223 ; 233 ;
224Evas_GL_Program_Source shader_img_nomul_vert_src = 234Evas_GL_Program_Source shader_img_21_bgra_vert_src =
225{ 235{
226 img_nomul_vert_glsl, 236 img_21_bgra_vert_glsl,
227 NULL, 0 237 NULL, 0
228}; 238};
229 239
230///////////////////////////////////////////// 240/////////////////////////////////////////////
231const char img_bgra_frag_glsl[] = 241const char img_21_bgra_nomul_frag_glsl[] =
232#include "shader/img_bgra_frag.h" 242#include "shader/img_21_bgra_nomul_frag.h"
233 ; 243 ;
234Evas_GL_Program_Source shader_img_bgra_frag_src = 244Evas_GL_Program_Source shader_img_21_bgra_nomul_frag_src =
235{ 245{
236 img_bgra_frag_glsl, 246 img_21_bgra_nomul_frag_glsl,
237 NULL, 0 247 NULL, 0
238}; 248};
239 249
240const char img_bgra_vert_glsl[] = 250const char img_21_bgra_nomul_vert_glsl[] =
241#include "shader/img_bgra_vert.h" 251#include "shader/img_21_bgra_nomul_vert.h"
242 ; 252 ;
243Evas_GL_Program_Source shader_img_bgra_vert_src = 253Evas_GL_Program_Source shader_img_21_bgra_nomul_vert_src =
244{ 254{
245 img_bgra_vert_glsl, 255 img_21_bgra_nomul_vert_glsl,
256 NULL, 0
257};
258
259/////////////////////////////////////////////
260const char tex_21_frag_glsl[] =
261#include "shader/tex_21_frag.h"
262 ;
263Evas_GL_Program_Source shader_tex_21_frag_src =
264{
265 tex_21_frag_glsl,
246 NULL, 0 266 NULL, 0
247}; 267};
248 268
269const char tex_21_vert_glsl[] =
270#include "shader/tex_21_vert.h"
271 ;
272Evas_GL_Program_Source shader_tex_21_vert_src =
273{
274 tex_21_vert_glsl,
275 NULL, 0
276};
249 277
250///////////////////////////////////////////// 278/////////////////////////////////////////////
251const char img_mask_frag_glsl[] = 279const char tex_21_nomul_frag_glsl[] =
252#include "shader/img_mask_frag.h" 280#include "shader/tex_21_nomul_frag.h"
253 ; 281 ;
254Evas_GL_Program_Source shader_img_mask_frag_src = 282Evas_GL_Program_Source shader_tex_21_nomul_frag_src =
255{ 283{
256 img_mask_frag_glsl, 284 tex_21_nomul_frag_glsl,
257 NULL, 0 285 NULL, 0
258}; 286};
259 287
260const char img_mask_vert_glsl[] = 288const char tex_21_nomul_vert_glsl[] =
261#include "shader/img_mask_vert.h" 289#include "shader/tex_21_nomul_vert.h"
262 ; 290 ;
263Evas_GL_Program_Source shader_img_mask_vert_src = 291Evas_GL_Program_Source shader_tex_21_nomul_vert_src =
264{ 292{
265 img_mask_vert_glsl, 293 tex_21_nomul_vert_glsl,
266 NULL, 0 294 NULL, 0
267}; 295};
268 296
269 297
298
299
270///////////////////////////////////////////// 300/////////////////////////////////////////////
271const char img_bgra_nomul_frag_glsl[] = 301const char img_12_frag_glsl[] =
272#include "shader/img_bgra_nomul_frag.h" 302#include "shader/img_12_frag.h"
273 ; 303 ;
274Evas_GL_Program_Source shader_img_bgra_nomul_frag_src = 304Evas_GL_Program_Source shader_img_12_frag_src =
275{ 305{
276 img_bgra_nomul_frag_glsl, 306 img_12_frag_glsl,
277 NULL, 0 307 NULL, 0
278}; 308};
279 309
280const char img_bgra_nomul_vert_glsl[] = 310const char img_12_vert_glsl[] =
281#include "shader/img_bgra_nomul_vert.h" 311#include "shader/img_12_vert.h"
282 ; 312 ;
283Evas_GL_Program_Source shader_img_bgra_nomul_vert_src = 313Evas_GL_Program_Source shader_img_12_vert_src =
284{ 314{
285 img_bgra_nomul_vert_glsl, 315 img_12_vert_glsl,
316 NULL, 0
317};
318
319/////////////////////////////////////////////
320const char img_12_nomul_frag_glsl[] =
321#include "shader/img_12_nomul_frag.h"
322 ;
323Evas_GL_Program_Source shader_img_12_nomul_frag_src =
324{
325 img_12_nomul_frag_glsl,
326 NULL, 0
327};
328
329const char img_12_nomul_vert_glsl[] =
330#include "shader/img_12_nomul_vert.h"
331 ;
332Evas_GL_Program_Source shader_img_12_nomul_vert_src =
333{
334 img_12_nomul_vert_glsl,
335 NULL, 0
336};
337
338/////////////////////////////////////////////
339const char img_12_bgra_frag_glsl[] =
340#include "shader/img_12_bgra_frag.h"
341 ;
342Evas_GL_Program_Source shader_img_12_bgra_frag_src =
343{
344 img_12_bgra_frag_glsl,
345 NULL, 0
346};
347
348const char img_12_bgra_vert_glsl[] =
349#include "shader/img_12_bgra_vert.h"
350 ;
351Evas_GL_Program_Source shader_img_12_bgra_vert_src =
352{
353 img_12_bgra_vert_glsl,
354 NULL, 0
355};
356
357/////////////////////////////////////////////
358const char img_12_bgra_nomul_frag_glsl[] =
359#include "shader/img_12_bgra_nomul_frag.h"
360 ;
361Evas_GL_Program_Source shader_img_12_bgra_nomul_frag_src =
362{
363 img_12_bgra_nomul_frag_glsl,
364 NULL, 0
365};
366
367const char img_12_bgra_nomul_vert_glsl[] =
368#include "shader/img_12_bgra_nomul_vert.h"
369 ;
370Evas_GL_Program_Source shader_img_12_bgra_nomul_vert_src =
371{
372 img_12_bgra_nomul_vert_glsl,
373 NULL, 0
374};
375
376/////////////////////////////////////////////
377const char tex_12_frag_glsl[] =
378#include "shader/tex_12_frag.h"
379 ;
380Evas_GL_Program_Source shader_tex_12_frag_src =
381{
382 tex_12_frag_glsl,
383 NULL, 0
384};
385
386const char tex_12_vert_glsl[] =
387#include "shader/tex_12_vert.h"
388 ;
389Evas_GL_Program_Source shader_tex_12_vert_src =
390{
391 tex_12_vert_glsl,
392 NULL, 0
393};
394
395/////////////////////////////////////////////
396const char tex_12_nomul_frag_glsl[] =
397#include "shader/tex_12_nomul_frag.h"
398 ;
399Evas_GL_Program_Source shader_tex_12_nomul_frag_src =
400{
401 tex_12_nomul_frag_glsl,
402 NULL, 0
403};
404
405const char tex_12_nomul_vert_glsl[] =
406#include "shader/tex_12_nomul_vert.h"
407 ;
408Evas_GL_Program_Source shader_tex_12_nomul_vert_src =
409{
410 tex_12_nomul_vert_glsl,
411 NULL, 0
412};
413
414
415
416
417/////////////////////////////////////////////
418const char img_22_frag_glsl[] =
419#include "shader/img_22_frag.h"
420 ;
421Evas_GL_Program_Source shader_img_22_frag_src =
422{
423 img_22_frag_glsl,
424 NULL, 0
425};
426
427const char img_22_vert_glsl[] =
428#include "shader/img_22_vert.h"
429 ;
430Evas_GL_Program_Source shader_img_22_vert_src =
431{
432 img_22_vert_glsl,
433 NULL, 0
434};
435
436/////////////////////////////////////////////
437const char img_22_nomul_frag_glsl[] =
438#include "shader/img_22_nomul_frag.h"
439 ;
440Evas_GL_Program_Source shader_img_22_nomul_frag_src =
441{
442 img_22_nomul_frag_glsl,
443 NULL, 0
444};
445
446const char img_22_nomul_vert_glsl[] =
447#include "shader/img_22_nomul_vert.h"
448 ;
449Evas_GL_Program_Source shader_img_22_nomul_vert_src =
450{
451 img_22_nomul_vert_glsl,
452 NULL, 0
453};
454
455/////////////////////////////////////////////
456const char img_22_bgra_frag_glsl[] =
457#include "shader/img_22_bgra_frag.h"
458 ;
459Evas_GL_Program_Source shader_img_22_bgra_frag_src =
460{
461 img_22_bgra_frag_glsl,
462 NULL, 0
463};
464
465const char img_22_bgra_vert_glsl[] =
466#include "shader/img_22_bgra_vert.h"
467 ;
468Evas_GL_Program_Source shader_img_22_bgra_vert_src =
469{
470 img_22_bgra_vert_glsl,
471 NULL, 0
472};
473
474/////////////////////////////////////////////
475const char img_22_bgra_nomul_frag_glsl[] =
476#include "shader/img_22_bgra_nomul_frag.h"
477 ;
478Evas_GL_Program_Source shader_img_22_bgra_nomul_frag_src =
479{
480 img_22_bgra_nomul_frag_glsl,
481 NULL, 0
482};
483
484const char img_22_bgra_nomul_vert_glsl[] =
485#include "shader/img_22_bgra_nomul_vert.h"
486 ;
487Evas_GL_Program_Source shader_img_22_bgra_nomul_vert_src =
488{
489 img_22_bgra_nomul_vert_glsl,
490 NULL, 0
491};
492
493/////////////////////////////////////////////
494const char tex_22_frag_glsl[] =
495#include "shader/tex_22_frag.h"
496 ;
497Evas_GL_Program_Source shader_tex_22_frag_src =
498{
499 tex_22_frag_glsl,
500 NULL, 0
501};
502
503const char tex_22_vert_glsl[] =
504#include "shader/tex_22_vert.h"
505 ;
506Evas_GL_Program_Source shader_tex_22_vert_src =
507{
508 tex_22_vert_glsl,
509 NULL, 0
510};
511
512/////////////////////////////////////////////
513const char tex_22_nomul_frag_glsl[] =
514#include "shader/tex_22_nomul_frag.h"
515 ;
516Evas_GL_Program_Source shader_tex_22_nomul_frag_src =
517{
518 tex_22_nomul_frag_glsl,
519 NULL, 0
520};
521
522const char tex_22_nomul_vert_glsl[] =
523#include "shader/tex_22_nomul_vert.h"
524 ;
525Evas_GL_Program_Source shader_tex_22_nomul_vert_src =
526{
527 tex_22_nomul_vert_glsl,
528 NULL, 0
529};
530
531
532
533
534/////////////////////////////////////////////
535const char yuv_frag_glsl[] =
536#include "shader/yuv_frag.h"
537 ;
538Evas_GL_Program_Source shader_yuv_frag_src =
539{
540 yuv_frag_glsl,
541 NULL, 0
542};
543
544const char yuv_vert_glsl[] =
545#include "shader/yuv_vert.h"
546 ;
547Evas_GL_Program_Source shader_yuv_vert_src =
548{
549 yuv_vert_glsl,
550 NULL, 0
551};
552
553/////////////////////////////////////////////
554const char yuy2_frag_glsl[] =
555#include "shader/yuy2_frag.h"
556 ;
557Evas_GL_Program_Source shader_yuy2_frag_src =
558{
559 yuy2_frag_glsl,
560 NULL, 0
561};
562
563const char yuy2_vert_glsl[] =
564#include "shader/yuy2_vert.h"
565 ;
566Evas_GL_Program_Source shader_yuy2_vert_src =
567{
568 yuy2_vert_glsl,
569 NULL, 0
570};
571
572/////////////////////////////////////////////
573const char yuy2_nomul_frag_glsl[] =
574#include "shader/yuy2_nomul_frag.h"
575 ;
576Evas_GL_Program_Source shader_yuy2_nomul_frag_src =
577{
578 yuy2_nomul_frag_glsl,
579 NULL, 0
580};
581
582const char yuy2_nomul_vert_glsl[] =
583#include "shader/yuy2_nomul_vert.h"
584 ;
585Evas_GL_Program_Source shader_yuy2_nomul_vert_src =
586{
587 yuy2_nomul_vert_glsl,
588 NULL, 0
589};
590
591/////////////////////////////////////////////
592const char nv12_nomul_vert_glsl[] =
593#include "shader/nv12_nomul_vert.h"
594 ;
595Evas_GL_Program_Source shader_nv12_nomul_vert_src =
596{
597 nv12_nomul_vert_glsl,
598 NULL, 0
599};
600
601const char nv12_vert_glsl[] =
602#include "shader/nv12_vert.h"
603 ;
604Evas_GL_Program_Source shader_nv12_vert_src =
605{
606 nv12_vert_glsl,
607 NULL, 0
608};
609
610const char nv12_frag_glsl[] =
611#include "shader/nv12_frag.h"
612 ;
613Evas_GL_Program_Source shader_nv12_frag_src =
614{
615 nv12_frag_glsl,
616 NULL, 0
617};
618
619const char nv12_nomul_frag_glsl[] =
620#include "shader/nv12_nomul_frag.h"
621 ;
622Evas_GL_Program_Source shader_nv12_nomul_frag_src =
623{
624 nv12_nomul_frag_glsl,
625 NULL, 0
626};
627
628/////////////////////////////////////////////
629const char yuv_nomul_frag_glsl[] =
630#include "shader/yuv_nomul_frag.h"
631 ;
632Evas_GL_Program_Source shader_yuv_nomul_frag_src =
633{
634 yuv_nomul_frag_glsl,
635 NULL, 0
636};
637
638const char yuv_nomul_vert_glsl[] =
639#include "shader/yuv_nomul_vert.h"
640 ;
641Evas_GL_Program_Source shader_yuv_nomul_vert_src =
642{
643 yuv_nomul_vert_glsl,
286 NULL, 0 644 NULL, 0
287}; 645};
288 646
@@ -364,6 +722,7 @@ _evas_gl_common_shader_program_binary_init(Evas_GL_Program *p,
364 glBindAttribLocation(p->prog, SHAD_TEXUV2, "tex_coord2"); 722 glBindAttribLocation(p->prog, SHAD_TEXUV2, "tex_coord2");
365 glBindAttribLocation(p->prog, SHAD_TEXUV3, "tex_coord3"); 723 glBindAttribLocation(p->prog, SHAD_TEXUV3, "tex_coord3");
366 glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm"); 724 glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm");
725 glBindAttribLocation(p->prog, SHAD_TEXSAM, "tex_sample");
367 726
368 glGetProgramiv(p->prog, GL_LINK_STATUS, &ok); 727 glGetProgramiv(p->prog, GL_LINK_STATUS, &ok);
369 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 728 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
@@ -487,6 +846,8 @@ _evas_gl_common_shader_program_source_init(Evas_GL_Program *p,
487 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 846 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
488 glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm"); 847 glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm");
489 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 848 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
849 glBindAttribLocation(p->prog, SHAD_TEXSAM, "tex_sample");
850 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
490 851
491 glLinkProgram(p->prog); 852 glLinkProgram(p->prog);
492 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 853 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
@@ -517,19 +878,43 @@ static const struct {
517} _shaders_source[] = { 878} _shaders_source[] = {
518 SHADER_SOURCE_LINE(RECT, rect), 879 SHADER_SOURCE_LINE(RECT, rect),
519 SHADER_SOURCE_LINE(FONT, font), 880 SHADER_SOURCE_LINE(FONT, font),
881
882 SHADER_SOURCE_LINE(IMG_MASK, img_mask),
883
520 SHADER_SOURCE_LINE(IMG, img), 884 SHADER_SOURCE_LINE(IMG, img),
521 SHADER_SOURCE_LINE(IMG_NOMUL, img_nomul), 885 SHADER_SOURCE_LINE(IMG_NOMUL, img_nomul),
522 SHADER_SOURCE_LINE(IMG_BGRA, img_bgra), 886 SHADER_SOURCE_LINE(IMG_BGRA, img_bgra),
523 SHADER_SOURCE_LINE(IMG_BGRA_NOMUL, img_bgra_nomul), 887 SHADER_SOURCE_LINE(IMG_BGRA_NOMUL, img_bgra_nomul),
524 SHADER_SOURCE_LINE(IMG_MASK, img_mask), 888 SHADER_SOURCE_LINE(TEX, tex),
889 SHADER_SOURCE_LINE(TEX_NOMUL, tex_nomul),
890
891 SHADER_SOURCE_LINE(IMG_21, img_21),
892 SHADER_SOURCE_LINE(IMG_21_NOMUL, img_21_nomul),
893 SHADER_SOURCE_LINE(IMG_21_BGRA, img_21_bgra),
894 SHADER_SOURCE_LINE(IMG_21_BGRA_NOMUL, img_21_bgra_nomul),
895 SHADER_SOURCE_LINE(TEX_21, tex_21),
896 SHADER_SOURCE_LINE(TEX_21_NOMUL, tex_21_nomul),
897
898 SHADER_SOURCE_LINE(IMG_12, img_12),
899 SHADER_SOURCE_LINE(IMG_12_NOMUL, img_12_nomul),
900 SHADER_SOURCE_LINE(IMG_12_BGRA, img_12_bgra),
901 SHADER_SOURCE_LINE(IMG_12_BGRA_NOMUL, img_12_bgra_nomul),
902 SHADER_SOURCE_LINE(TEX_12, tex_12),
903 SHADER_SOURCE_LINE(TEX_12_NOMUL, tex_12_nomul),
904
905 SHADER_SOURCE_LINE(IMG_22, img_22),
906 SHADER_SOURCE_LINE(IMG_22_NOMUL, img_22_nomul),
907 SHADER_SOURCE_LINE(IMG_22_BGRA, img_22_bgra),
908 SHADER_SOURCE_LINE(IMG_22_BGRA_NOMUL, img_22_bgra_nomul),
909 SHADER_SOURCE_LINE(TEX_22, tex_22),
910 SHADER_SOURCE_LINE(TEX_22_NOMUL, tex_22_nomul),
911
525 SHADER_SOURCE_LINE(YUV, yuv), 912 SHADER_SOURCE_LINE(YUV, yuv),
526 SHADER_SOURCE_LINE(YUV_NOMUL, yuv_nomul), 913 SHADER_SOURCE_LINE(YUV_NOMUL, yuv_nomul),
527 SHADER_SOURCE_LINE(YUY2, yuy2), 914 SHADER_SOURCE_LINE(YUY2, yuy2),
528 SHADER_SOURCE_LINE(YUY2_NOMUL, yuy2_nomul), 915 SHADER_SOURCE_LINE(YUY2_NOMUL, yuy2_nomul),
529 SHADER_SOURCE_LINE(NV12, nv12), 916 SHADER_SOURCE_LINE(NV12, nv12),
530 SHADER_SOURCE_LINE(NV12_NOMUL, nv12_nomul), 917 SHADER_SOURCE_LINE(NV12_NOMUL, nv12_nomul),
531 SHADER_SOURCE_LINE(TEX, tex),
532 SHADER_SOURCE_LINE(TEX_NOMUL, tex_nomul),
533}; 918};
534 919
535static int 920static int
@@ -537,13 +922,15 @@ _evas_gl_common_shader_source_init(Evas_GL_Shared *shared)
537{ 922{
538 unsigned int i; 923 unsigned int i;
539 924
540 for (i = 0; i < sizeof (_shaders_source) / sizeof (_shaders_source[0]); ++i) 925 for (i = 0; i < sizeof (_shaders_source) / sizeof (_shaders_source[0]); i++)
541 if (!_evas_gl_common_shader_program_source_init(&(shared->shader[_shaders_source[i].id]), 926 {
542 _shaders_source[i].vert, 927 if (!_evas_gl_common_shader_program_source_init
543 _shaders_source[i].frag, 928 (&(shared->shader[_shaders_source[i].id]),
544 _shaders_source[i].name)) 929 _shaders_source[i].vert,
545 return 0; 930 _shaders_source[i].frag,
546 931 _shaders_source[i].name))
932 return 0;
933 }
547 return 1; 934 return 1;
548} 935}
549 936
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 11dc274ee8..633c8b643a 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -302,16 +302,19 @@ evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im)
302 tex->gc = gc; 302 tex->gc = gc;
303 tex->references = 1; 303 tex->references = 1;
304 304
305#define TEX_HREP 1
306#define TEX_VREP 1
307
305 if (im->cache_entry.flags.alpha) 308 if (im->cache_entry.flags.alpha)
306 { 309 {
307 if (gc->shared->info.bgra) 310 if (gc->shared->info.bgra)
308 tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2, 311 tex->pt = _pool_tex_find(gc, im->cache_entry.w + TEX_HREP + 2,
309 im->cache_entry.h + 1, bgra_ifmt, bgra_fmt, 312 im->cache_entry.h + TEX_VREP, bgra_ifmt, bgra_fmt,
310 &u, &v, &l_after, 313 &u, &v, &l_after,
311 gc->shared->info.tune.atlas.max_alloc_size); 314 gc->shared->info.tune.atlas.max_alloc_size);
312 else 315 else
313 tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2, 316 tex->pt = _pool_tex_find(gc, im->cache_entry.w + TEX_HREP + 2,
314 im->cache_entry.h + 1, rgba_ifmt, rgba_fmt, 317 im->cache_entry.h + TEX_VREP, rgba_ifmt, rgba_fmt,
315 &u, &v, &l_after, 318 &u, &v, &l_after,
316 gc->shared->info.tune.atlas.max_alloc_size); 319 gc->shared->info.tune.atlas.max_alloc_size);
317 tex->alpha = 1; 320 tex->alpha = 1;
@@ -319,19 +322,19 @@ evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im)
319 else 322 else
320 { 323 {
321 if (gc->shared->info.bgra) 324 if (gc->shared->info.bgra)
322 tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3, 325 tex->pt = _pool_tex_find(gc, im->cache_entry.w + TEX_HREP + 2,
323 im->cache_entry.h + 1, bgr_ifmt, bgr_fmt, 326 im->cache_entry.h + TEX_VREP, bgr_ifmt, bgr_fmt,
324 &u, &v, &l_after, 327 &u, &v, &l_after,
325 gc->shared->info.tune.atlas.max_alloc_size); 328 gc->shared->info.tune.atlas.max_alloc_size);
326 else 329 else
327#ifdef GL_GLES 330#ifdef GL_GLES
328 tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3, 331 tex->pt = _pool_tex_find(gc, im->cache_entry.w + TEX_HREP + 2,
329 im->cache_entry.h + 1, rgba_ifmt, rgba_fmt, 332 im->cache_entry.h + TEX_VREP, rgba_ifmt, rgba_fmt,
330 &u, &v, &l_after, 333 &u, &v, &l_after,
331 gc->shared->info.tune.atlas.max_alloc_size); 334 gc->shared->info.tune.atlas.max_alloc_size);
332#else 335#else
333 tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3, 336 tex->pt = _pool_tex_find(gc, im->cache_entry.w + TEX_HREP + 2,
334 im->cache_entry.h + 1, rgb_ifmt, rgb_fmt, 337 im->cache_entry.h + TEX_VREP, rgb_ifmt, rgb_fmt,
335 &u, &v, &l_after, 338 &u, &v, &l_after,
336 gc->shared->info.tune.atlas.max_alloc_size); 339 gc->shared->info.tune.atlas.max_alloc_size);
337#endif 340#endif
diff --git a/src/modules/evas/engines/gl_common/shader/compile.sh b/src/modules/evas/engines/gl_common/shader/compile.sh
index a96b58c9e7..beb424d621 100755
--- a/src/modules/evas/engines/gl_common/shader/compile.sh
+++ b/src/modules/evas/engines/gl_common/shader/compile.sh
@@ -16,15 +16,46 @@ function compile()
16 16
17compile rect 17compile rect
18compile font 18compile font
19
20compile img_mask
21
19compile img 22compile img
20compile img_nomul 23compile img_nomul
21compile img_bgra 24compile img_bgra
22compile img_bgra_nomul 25compile img_bgra_nomul
23compile img_mask
24compile yuv
25compile yuv_nomul
26compile tex 26compile tex
27compile tex_nomul 27compile tex_nomul
28
29compile img_21
30compile img_21_nomul
31compile img_21_bgra
32compile img_21_bgra_nomul
33compile tex_21
34compile tex_21_nomul
35
36compile img_12
37compile img_12_nomul
38compile img_12_bgra
39compile img_12_bgra_nomul
40compile tex_12
41compile tex_12_nomul
42
43compile img_22
44compile img_22_nomul
45compile img_22_bgra
46compile img_22_bgra_nomul
47compile tex_22
48compile tex_22_nomul
49
50## above section must have 21, 22 and 12 versions
51
52compile yuv
53compile yuv_nomul
54compile nv12
55compile nv12_nomul
56compile yuy2
57compile yuy2_nomul
58
28compile filter_blur_bgra 59compile filter_blur_bgra
29compile filter_blur_bgra_nomul 60compile filter_blur_bgra_nomul
30compile filter_blur 61compile filter_blur
@@ -41,8 +72,3 @@ compile filter_sepia_bgra
41compile filter_sepia_bgra_nomul 72compile filter_sepia_bgra_nomul
42compile filter_sepia 73compile filter_sepia
43compile filter_sepia_nomul 74compile filter_sepia_nomul
44compile nv12
45compile nv12_nomul
46compile yuy2
47compile yuy2_nomul
48
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.h b/src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.h
new file mode 100644
index 0000000000..a076fb58fb
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.h
@@ -0,0 +1,18 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[2];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
16" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
17" gl_FragColor = ((col00 + col01) / div_s) * col;\n"
18"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.shd b/src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.shd
new file mode 100644
index 0000000000..d23e17b352
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.shd
@@ -0,0 +1,18 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[2];
12varying vec4 div_s;
13void main()
14{
15 vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
16 vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
17 gl_FragColor = ((col00 + col01) / div_s) * col;
18}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.h
new file mode 100644
index 0000000000..0be15b3300
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.h
@@ -0,0 +1,17 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec2 tex_c;\n"
10"varying vec2 tex_s[2];\n"
11"varying vec4 div_s;\n"
12"void main()\n"
13"{\n"
14" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
15" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
16" gl_FragColor = (col00 + col01) / div_s;\n"
17"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.shd
new file mode 100644
index 0000000000..4d29510d4a
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.shd
@@ -0,0 +1,17 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec2 tex_c;
10varying vec2 tex_s[2];
11varying vec4 div_s;
12void main()
13{
14 vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
15 vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
16 gl_FragColor = (col00 + col01) / div_s;
17}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.h
new file mode 100644
index 0000000000..cee10eaf6c
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.h
@@ -0,0 +1,18 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec2 tex_coord;\n"
6"attribute vec2 tex_sample;\n"
7"uniform mat4 mvp;\n"
8"varying vec2 tex_c;\n"
9"varying vec2 tex_s[2];\n"
10"varying vec4 div_s;\n"
11"void main()\n"
12"{\n"
13" gl_Position = mvp * vertex;\n"
14" tex_c = tex_coord;\n"
15" tex_s[0] = vec2(0, -tex_sample.y);\n"
16" tex_s[1] = vec2(0, tex_sample.y);\n"
17" div_s = vec4(2, 2, 2, 2);\n"
18"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.shd
new file mode 100644
index 0000000000..40144aae07
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.shd
@@ -0,0 +1,18 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec2 tex_coord;
6attribute vec2 tex_sample;
7uniform mat4 mvp;
8varying vec2 tex_c;
9varying vec2 tex_s[2];
10varying vec4 div_s;
11void main()
12{
13 gl_Position = mvp * vertex;
14 tex_c = tex_coord;
15 tex_s[0] = vec2(0, -tex_sample.y);
16 tex_s[1] = vec2(0, tex_sample.y);
17 div_s = vec4(2, 2, 2, 2);
18}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.h b/src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.h
new file mode 100644
index 0000000000..56cd0643aa
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.h
@@ -0,0 +1,21 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec4 color;\n"
6"attribute vec2 tex_coord;\n"
7"attribute vec2 tex_sample;\n"
8"uniform mat4 mvp;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[2];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" gl_Position = mvp * vertex;\n"
16" col = color;\n"
17" tex_c = tex_coord;\n"
18" tex_s[0] = vec2(0, -tex_sample.y);\n"
19" tex_s[1] = vec2(0, tex_sample.y);\n"
20" div_s = vec4(2, 2, 2, 2);\n"
21"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.shd b/src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.shd
new file mode 100644
index 0000000000..810d73aaaa
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.shd
@@ -0,0 +1,21 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec4 color;
6attribute vec2 tex_coord;
7attribute vec2 tex_sample;
8uniform mat4 mvp;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[2];
12varying vec4 div_s;
13void main()
14{
15 gl_Position = mvp * vertex;
16 col = color;
17 tex_c = tex_coord;
18 tex_s[0] = vec2(0, -tex_sample.y);
19 tex_s[1] = vec2(0, tex_sample.y);
20 div_s = vec4(2, 2, 2, 2);
21}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_frag.h b/src/modules/evas/engines/gl_common/shader/img_12_frag.h
new file mode 100644
index 0000000000..2cc4493088
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_frag.h
@@ -0,0 +1,18 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[2];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
16" vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
17" gl_FragColor = ((col00 + col01) / div_s) * col;\n"
18"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_frag.shd b/src/modules/evas/engines/gl_common/shader/img_12_frag.shd
new file mode 100644
index 0000000000..2647ab2b81
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_frag.shd
@@ -0,0 +1,18 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[2];
12varying vec4 div_s;
13void main()
14{
15 vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;
16 vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;
17 gl_FragColor = ((col00 + col01) / div_s) * col;
18}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.h
new file mode 100644
index 0000000000..9ff8813aa2
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.h
@@ -0,0 +1,17 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec2 tex_c;\n"
10"varying vec2 tex_s[2];\n"
11"varying vec4 div_s;\n"
12"void main()\n"
13"{\n"
14" vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
15" vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
16" gl_FragColor = (col00 + col01) / div_s;\n"
17"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.shd
new file mode 100644
index 0000000000..49872cfb48
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.shd
@@ -0,0 +1,17 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec2 tex_c;
10varying vec2 tex_s[2];
11varying vec4 div_s;
12void main()
13{
14 vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;
15 vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;
16 gl_FragColor = (col00 + col01) / div_s;
17}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.h
new file mode 100644
index 0000000000..cee10eaf6c
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.h
@@ -0,0 +1,18 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec2 tex_coord;\n"
6"attribute vec2 tex_sample;\n"
7"uniform mat4 mvp;\n"
8"varying vec2 tex_c;\n"
9"varying vec2 tex_s[2];\n"
10"varying vec4 div_s;\n"
11"void main()\n"
12"{\n"
13" gl_Position = mvp * vertex;\n"
14" tex_c = tex_coord;\n"
15" tex_s[0] = vec2(0, -tex_sample.y);\n"
16" tex_s[1] = vec2(0, tex_sample.y);\n"
17" div_s = vec4(2, 2, 2, 2);\n"
18"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.shd
new file mode 100644
index 0000000000..40144aae07
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.shd
@@ -0,0 +1,18 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec2 tex_coord;
6attribute vec2 tex_sample;
7uniform mat4 mvp;
8varying vec2 tex_c;
9varying vec2 tex_s[2];
10varying vec4 div_s;
11void main()
12{
13 gl_Position = mvp * vertex;
14 tex_c = tex_coord;
15 tex_s[0] = vec2(0, -tex_sample.y);
16 tex_s[1] = vec2(0, tex_sample.y);
17 div_s = vec4(2, 2, 2, 2);
18}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_vert.h b/src/modules/evas/engines/gl_common/shader/img_12_vert.h
new file mode 100644
index 0000000000..56cd0643aa
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_vert.h
@@ -0,0 +1,21 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec4 color;\n"
6"attribute vec2 tex_coord;\n"
7"attribute vec2 tex_sample;\n"
8"uniform mat4 mvp;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[2];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" gl_Position = mvp * vertex;\n"
16" col = color;\n"
17" tex_c = tex_coord;\n"
18" tex_s[0] = vec2(0, -tex_sample.y);\n"
19" tex_s[1] = vec2(0, tex_sample.y);\n"
20" div_s = vec4(2, 2, 2, 2);\n"
21"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_vert.shd b/src/modules/evas/engines/gl_common/shader/img_12_vert.shd
new file mode 100644
index 0000000000..810d73aaaa
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_vert.shd
@@ -0,0 +1,21 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec4 color;
6attribute vec2 tex_coord;
7attribute vec2 tex_sample;
8uniform mat4 mvp;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[2];
12varying vec4 div_s;
13void main()
14{
15 gl_Position = mvp * vertex;
16 col = color;
17 tex_c = tex_coord;
18 tex_s[0] = vec2(0, -tex_sample.y);
19 tex_s[1] = vec2(0, tex_sample.y);
20 div_s = vec4(2, 2, 2, 2);
21}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.h b/src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.h
new file mode 100644
index 0000000000..a076fb58fb
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.h
@@ -0,0 +1,18 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[2];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
16" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
17" gl_FragColor = ((col00 + col01) / div_s) * col;\n"
18"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.shd b/src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.shd
new file mode 100644
index 0000000000..d23e17b352
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.shd
@@ -0,0 +1,18 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[2];
12varying vec4 div_s;
13void main()
14{
15 vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
16 vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
17 gl_FragColor = ((col00 + col01) / div_s) * col;
18}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.h
new file mode 100644
index 0000000000..0be15b3300
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.h
@@ -0,0 +1,17 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec2 tex_c;\n"
10"varying vec2 tex_s[2];\n"
11"varying vec4 div_s;\n"
12"void main()\n"
13"{\n"
14" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
15" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
16" gl_FragColor = (col00 + col01) / div_s;\n"
17"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.shd
new file mode 100644
index 0000000000..4d29510d4a
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.shd
@@ -0,0 +1,17 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec2 tex_c;
10varying vec2 tex_s[2];
11varying vec4 div_s;
12void main()
13{
14 vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
15 vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
16 gl_FragColor = (col00 + col01) / div_s;
17}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.h
new file mode 100644
index 0000000000..7c7d7db63b
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.h
@@ -0,0 +1,18 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec2 tex_coord;\n"
6"attribute vec2 tex_sample;\n"
7"uniform mat4 mvp;\n"
8"varying vec2 tex_c;\n"
9"varying vec2 tex_s[2];\n"
10"varying vec4 div_s;\n"
11"void main()\n"
12"{\n"
13" gl_Position = mvp * vertex;\n"
14" tex_c = tex_coord;\n"
15" tex_s[0] = vec2(-tex_sample.x, 0);\n"
16" tex_s[1] = vec2( tex_sample.x, 0);\n"
17" div_s = vec4(2, 2, 2, 2);\n"
18"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.shd
new file mode 100644
index 0000000000..a6b149f5c5
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.shd
@@ -0,0 +1,18 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec2 tex_coord;
6attribute vec2 tex_sample;
7uniform mat4 mvp;
8varying vec2 tex_c;
9varying vec2 tex_s[2];
10varying vec4 div_s;
11void main()
12{
13 gl_Position = mvp * vertex;
14 tex_c = tex_coord;
15 tex_s[0] = vec2(-tex_sample.x, 0);
16 tex_s[1] = vec2( tex_sample.x, 0);
17 div_s = vec4(2, 2, 2, 2);
18}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.h b/src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.h
new file mode 100644
index 0000000000..88d1470f26
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.h
@@ -0,0 +1,21 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec4 color;\n"
6"attribute vec2 tex_coord;\n"
7"attribute vec2 tex_sample;\n"
8"uniform mat4 mvp;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[2];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" gl_Position = mvp * vertex;\n"
16" col = color;\n"
17" tex_c = tex_coord;\n"
18" tex_s[0] = vec2(-tex_sample.x, 0);\n"
19" tex_s[1] = vec2( tex_sample.x, 0);\n"
20" div_s = vec4(2, 2, 2, 2);\n"
21"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.shd b/src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.shd
new file mode 100644
index 0000000000..98d9154a73
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.shd
@@ -0,0 +1,21 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec4 color;
6attribute vec2 tex_coord;
7attribute vec2 tex_sample;
8uniform mat4 mvp;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[2];
12varying vec4 div_s;
13void main()
14{
15 gl_Position = mvp * vertex;
16 col = color;
17 tex_c = tex_coord;
18 tex_s[0] = vec2(-tex_sample.x, 0);
19 tex_s[1] = vec2( tex_sample.x, 0);
20 div_s = vec4(2, 2, 2, 2);
21}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_frag.h b/src/modules/evas/engines/gl_common/shader/img_21_frag.h
new file mode 100644
index 0000000000..2cc4493088
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_frag.h
@@ -0,0 +1,18 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[2];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
16" vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
17" gl_FragColor = ((col00 + col01) / div_s) * col;\n"
18"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_frag.shd b/src/modules/evas/engines/gl_common/shader/img_21_frag.shd
new file mode 100644
index 0000000000..2647ab2b81
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_frag.shd
@@ -0,0 +1,18 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[2];
12varying vec4 div_s;
13void main()
14{
15 vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;
16 vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;
17 gl_FragColor = ((col00 + col01) / div_s) * col;
18}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.h
new file mode 100644
index 0000000000..9ff8813aa2
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.h
@@ -0,0 +1,17 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec2 tex_c;\n"
10"varying vec2 tex_s[2];\n"
11"varying vec4 div_s;\n"
12"void main()\n"
13"{\n"
14" vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
15" vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
16" gl_FragColor = (col00 + col01) / div_s;\n"
17"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.shd
new file mode 100644
index 0000000000..49872cfb48
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.shd
@@ -0,0 +1,17 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec2 tex_c;
10varying vec2 tex_s[2];
11varying vec4 div_s;
12void main()
13{
14 vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;
15 vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;
16 gl_FragColor = (col00 + col01) / div_s;
17}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.h
new file mode 100644
index 0000000000..7c7d7db63b
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.h
@@ -0,0 +1,18 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec2 tex_coord;\n"
6"attribute vec2 tex_sample;\n"
7"uniform mat4 mvp;\n"
8"varying vec2 tex_c;\n"
9"varying vec2 tex_s[2];\n"
10"varying vec4 div_s;\n"
11"void main()\n"
12"{\n"
13" gl_Position = mvp * vertex;\n"
14" tex_c = tex_coord;\n"
15" tex_s[0] = vec2(-tex_sample.x, 0);\n"
16" tex_s[1] = vec2( tex_sample.x, 0);\n"
17" div_s = vec4(2, 2, 2, 2);\n"
18"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.shd
new file mode 100644
index 0000000000..a6b149f5c5
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.shd
@@ -0,0 +1,18 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec2 tex_coord;
6attribute vec2 tex_sample;
7uniform mat4 mvp;
8varying vec2 tex_c;
9varying vec2 tex_s[2];
10varying vec4 div_s;
11void main()
12{
13 gl_Position = mvp * vertex;
14 tex_c = tex_coord;
15 tex_s[0] = vec2(-tex_sample.x, 0);
16 tex_s[1] = vec2( tex_sample.x, 0);
17 div_s = vec4(2, 2, 2, 2);
18}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_vert.h b/src/modules/evas/engines/gl_common/shader/img_21_vert.h
new file mode 100644
index 0000000000..88d1470f26
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_vert.h
@@ -0,0 +1,21 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec4 color;\n"
6"attribute vec2 tex_coord;\n"
7"attribute vec2 tex_sample;\n"
8"uniform mat4 mvp;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[2];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" gl_Position = mvp * vertex;\n"
16" col = color;\n"
17" tex_c = tex_coord;\n"
18" tex_s[0] = vec2(-tex_sample.x, 0);\n"
19" tex_s[1] = vec2( tex_sample.x, 0);\n"
20" div_s = vec4(2, 2, 2, 2);\n"
21"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_vert.shd b/src/modules/evas/engines/gl_common/shader/img_21_vert.shd
new file mode 100644
index 0000000000..98d9154a73
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_vert.shd
@@ -0,0 +1,21 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec4 color;
6attribute vec2 tex_coord;
7attribute vec2 tex_sample;
8uniform mat4 mvp;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[2];
12varying vec4 div_s;
13void main()
14{
15 gl_Position = mvp * vertex;
16 col = color;
17 tex_c = tex_coord;
18 tex_s[0] = vec2(-tex_sample.x, 0);
19 tex_s[1] = vec2( tex_sample.x, 0);
20 div_s = vec4(2, 2, 2, 2);
21}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.h b/src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.h
new file mode 100644
index 0000000000..748a33a250
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.h
@@ -0,0 +1,20 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[4];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
16" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
17" vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n"
18" vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n"
19" gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;\n"
20"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.shd b/src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.shd
new file mode 100644
index 0000000000..ab1b12147d
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.shd
@@ -0,0 +1,20 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[4];
12varying vec4 div_s;
13void main()
14{
15 vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
16 vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
17 vec4 col10 = texture2D(tex, tex_c + tex_s[2]);
18 vec4 col11 = texture2D(tex, tex_c + tex_s[3]);
19 gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;
20}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.h
new file mode 100644
index 0000000000..4af85f9fab
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.h
@@ -0,0 +1,19 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec2 tex_c;\n"
10"varying vec2 tex_s[4];\n"
11"varying vec4 div_s;\n"
12"void main()\n"
13"{\n"
14" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
15" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
16" vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n"
17" vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n"
18" gl_FragColor = (col00 + col01 + col10 + col11) / div_s;\n"
19"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.shd
new file mode 100644
index 0000000000..3f380ea551
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.shd
@@ -0,0 +1,19 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec2 tex_c;
10varying vec2 tex_s[4];
11varying vec4 div_s;
12void main()
13{
14 vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
15 vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
16 vec4 col10 = texture2D(tex, tex_c + tex_s[2]);
17 vec4 col11 = texture2D(tex, tex_c + tex_s[3]);
18 gl_FragColor = (col00 + col01 + col10 + col11) / div_s;
19}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.h
new file mode 100644
index 0000000000..c6fb270bf7
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.h
@@ -0,0 +1,20 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec2 tex_coord;\n"
6"attribute vec2 tex_sample;\n"
7"uniform mat4 mvp;\n"
8"varying vec2 tex_c;\n"
9"varying vec2 tex_s[4];\n"
10"varying vec4 div_s;\n"
11"void main()\n"
12"{\n"
13" gl_Position = mvp * vertex;\n"
14" tex_c = tex_coord;\n"
15" tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
16" tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
17" tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
18" tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
19" div_s = vec4(4, 4, 4, 4);\n"
20"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.shd
new file mode 100644
index 0000000000..e6303d782d
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.shd
@@ -0,0 +1,20 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec2 tex_coord;
6attribute vec2 tex_sample;
7uniform mat4 mvp;
8varying vec2 tex_c;
9varying vec2 tex_s[4];
10varying vec4 div_s;
11void main()
12{
13 gl_Position = mvp * vertex;
14 tex_c = tex_coord;
15 tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
16 tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
17 tex_s[2] = vec2( tex_sample.x, tex_sample.y);
18 tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
19 div_s = vec4(4, 4, 4, 4);
20}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.h b/src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.h
new file mode 100644
index 0000000000..e1fc7f4558
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.h
@@ -0,0 +1,23 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec4 color;\n"
6"attribute vec2 tex_coord;\n"
7"attribute vec2 tex_sample;\n"
8"uniform mat4 mvp;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[4];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" gl_Position = mvp * vertex;\n"
16" col = color;\n"
17" tex_c = tex_coord;\n"
18" tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
19" tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
20" tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
21" tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
22" div_s = vec4(4, 4, 4, 4);\n"
23"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.shd b/src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.shd
new file mode 100644
index 0000000000..e964ea1e81
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.shd
@@ -0,0 +1,23 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec4 color;
6attribute vec2 tex_coord;
7attribute vec2 tex_sample;
8uniform mat4 mvp;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[4];
12varying vec4 div_s;
13void main()
14{
15 gl_Position = mvp * vertex;
16 col = color;
17 tex_c = tex_coord;
18 tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
19 tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
20 tex_s[2] = vec2( tex_sample.x, tex_sample.y);
21 tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
22 div_s = vec4(4, 4, 4, 4);
23}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_frag.h b/src/modules/evas/engines/gl_common/shader/img_22_frag.h
new file mode 100644
index 0000000000..3d64e07542
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_frag.h
@@ -0,0 +1,20 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[4];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
16" vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
17" vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;\n"
18" vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;\n"
19" gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;\n"
20"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_frag.shd b/src/modules/evas/engines/gl_common/shader/img_22_frag.shd
new file mode 100644
index 0000000000..1ff5ccc7a5
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_frag.shd
@@ -0,0 +1,20 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[4];
12varying vec4 div_s;
13void main()
14{
15 vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;
16 vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;
17 vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;
18 vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;
19 gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;
20}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.h
new file mode 100644
index 0000000000..2a7f073b00
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.h
@@ -0,0 +1,19 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec2 tex_c;\n"
10"varying vec2 tex_s[4];\n"
11"varying vec4 div_s;\n"
12"void main()\n"
13"{\n"
14" vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
15" vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
16" vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;\n"
17" vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;\n"
18" gl_FragColor = (col00 + col01 + col10 + col11) / div_s;\n"
19"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.shd
new file mode 100644
index 0000000000..3b87c099e3
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.shd
@@ -0,0 +1,19 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec2 tex_c;
10varying vec2 tex_s[4];
11varying vec4 div_s;
12void main()
13{
14 vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;
15 vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;
16 vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;
17 vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;
18 gl_FragColor = (col00 + col01 + col10 + col11) / div_s;
19}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.h
new file mode 100644
index 0000000000..c6fb270bf7
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.h
@@ -0,0 +1,20 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec2 tex_coord;\n"
6"attribute vec2 tex_sample;\n"
7"uniform mat4 mvp;\n"
8"varying vec2 tex_c;\n"
9"varying vec2 tex_s[4];\n"
10"varying vec4 div_s;\n"
11"void main()\n"
12"{\n"
13" gl_Position = mvp * vertex;\n"
14" tex_c = tex_coord;\n"
15" tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
16" tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
17" tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
18" tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
19" div_s = vec4(4, 4, 4, 4);\n"
20"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.shd
new file mode 100644
index 0000000000..e6303d782d
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.shd
@@ -0,0 +1,20 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec2 tex_coord;
6attribute vec2 tex_sample;
7uniform mat4 mvp;
8varying vec2 tex_c;
9varying vec2 tex_s[4];
10varying vec4 div_s;
11void main()
12{
13 gl_Position = mvp * vertex;
14 tex_c = tex_coord;
15 tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
16 tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
17 tex_s[2] = vec2( tex_sample.x, tex_sample.y);
18 tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
19 div_s = vec4(4, 4, 4, 4);
20}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_vert.h b/src/modules/evas/engines/gl_common/shader/img_22_vert.h
new file mode 100644
index 0000000000..e1fc7f4558
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_vert.h
@@ -0,0 +1,23 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec4 color;\n"
6"attribute vec2 tex_coord;\n"
7"attribute vec2 tex_sample;\n"
8"uniform mat4 mvp;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[4];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" gl_Position = mvp * vertex;\n"
16" col = color;\n"
17" tex_c = tex_coord;\n"
18" tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
19" tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
20" tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
21" tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
22" div_s = vec4(4, 4, 4, 4);\n"
23"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_vert.shd b/src/modules/evas/engines/gl_common/shader/img_22_vert.shd
new file mode 100644
index 0000000000..e964ea1e81
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_vert.shd
@@ -0,0 +1,23 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec4 color;
6attribute vec2 tex_coord;
7attribute vec2 tex_sample;
8uniform mat4 mvp;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[4];
12varying vec4 div_s;
13void main()
14{
15 gl_Position = mvp * vertex;
16 col = color;
17 tex_c = tex_coord;
18 tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
19 tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
20 tex_s[2] = vec2( tex_sample.x, tex_sample.y);
21 tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
22 div_s = vec4(4, 4, 4, 4);
23}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_frag.h b/src/modules/evas/engines/gl_common/shader/tex_12_frag.h
new file mode 100644
index 0000000000..a076fb58fb
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_frag.h
@@ -0,0 +1,18 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[2];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
16" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
17" gl_FragColor = ((col00 + col01) / div_s) * col;\n"
18"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_frag.shd b/src/modules/evas/engines/gl_common/shader/tex_12_frag.shd
new file mode 100644
index 0000000000..d23e17b352
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_frag.shd
@@ -0,0 +1,18 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[2];
12varying vec4 div_s;
13void main()
14{
15 vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
16 vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
17 gl_FragColor = ((col00 + col01) / div_s) * col;
18}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.h
new file mode 100644
index 0000000000..0be15b3300
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.h
@@ -0,0 +1,17 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec2 tex_c;\n"
10"varying vec2 tex_s[2];\n"
11"varying vec4 div_s;\n"
12"void main()\n"
13"{\n"
14" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
15" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
16" gl_FragColor = (col00 + col01) / div_s;\n"
17"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd
new file mode 100644
index 0000000000..4d29510d4a
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd
@@ -0,0 +1,17 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec2 tex_c;
10varying vec2 tex_s[2];
11varying vec4 div_s;
12void main()
13{
14 vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
15 vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
16 gl_FragColor = (col00 + col01) / div_s;
17}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.h
new file mode 100644
index 0000000000..cee10eaf6c
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.h
@@ -0,0 +1,18 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec2 tex_coord;\n"
6"attribute vec2 tex_sample;\n"
7"uniform mat4 mvp;\n"
8"varying vec2 tex_c;\n"
9"varying vec2 tex_s[2];\n"
10"varying vec4 div_s;\n"
11"void main()\n"
12"{\n"
13" gl_Position = mvp * vertex;\n"
14" tex_c = tex_coord;\n"
15" tex_s[0] = vec2(0, -tex_sample.y);\n"
16" tex_s[1] = vec2(0, tex_sample.y);\n"
17" div_s = vec4(2, 2, 2, 2);\n"
18"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd
new file mode 100644
index 0000000000..40144aae07
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd
@@ -0,0 +1,18 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec2 tex_coord;
6attribute vec2 tex_sample;
7uniform mat4 mvp;
8varying vec2 tex_c;
9varying vec2 tex_s[2];
10varying vec4 div_s;
11void main()
12{
13 gl_Position = mvp * vertex;
14 tex_c = tex_coord;
15 tex_s[0] = vec2(0, -tex_sample.y);
16 tex_s[1] = vec2(0, tex_sample.y);
17 div_s = vec4(2, 2, 2, 2);
18}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_vert.h b/src/modules/evas/engines/gl_common/shader/tex_12_vert.h
new file mode 100644
index 0000000000..56cd0643aa
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_vert.h
@@ -0,0 +1,21 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec4 color;\n"
6"attribute vec2 tex_coord;\n"
7"attribute vec2 tex_sample;\n"
8"uniform mat4 mvp;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[2];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" gl_Position = mvp * vertex;\n"
16" col = color;\n"
17" tex_c = tex_coord;\n"
18" tex_s[0] = vec2(0, -tex_sample.y);\n"
19" tex_s[1] = vec2(0, tex_sample.y);\n"
20" div_s = vec4(2, 2, 2, 2);\n"
21"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_vert.shd b/src/modules/evas/engines/gl_common/shader/tex_12_vert.shd
new file mode 100644
index 0000000000..810d73aaaa
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_vert.shd
@@ -0,0 +1,21 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec4 color;
6attribute vec2 tex_coord;
7attribute vec2 tex_sample;
8uniform mat4 mvp;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[2];
12varying vec4 div_s;
13void main()
14{
15 gl_Position = mvp * vertex;
16 col = color;
17 tex_c = tex_coord;
18 tex_s[0] = vec2(0, -tex_sample.y);
19 tex_s[1] = vec2(0, tex_sample.y);
20 div_s = vec4(2, 2, 2, 2);
21}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_frag.h b/src/modules/evas/engines/gl_common/shader/tex_21_frag.h
new file mode 100644
index 0000000000..a076fb58fb
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_frag.h
@@ -0,0 +1,18 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[2];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
16" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
17" gl_FragColor = ((col00 + col01) / div_s) * col;\n"
18"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_frag.shd b/src/modules/evas/engines/gl_common/shader/tex_21_frag.shd
new file mode 100644
index 0000000000..d23e17b352
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_frag.shd
@@ -0,0 +1,18 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[2];
12varying vec4 div_s;
13void main()
14{
15 vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
16 vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
17 gl_FragColor = ((col00 + col01) / div_s) * col;
18}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.h
new file mode 100644
index 0000000000..0be15b3300
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.h
@@ -0,0 +1,17 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec2 tex_c;\n"
10"varying vec2 tex_s[2];\n"
11"varying vec4 div_s;\n"
12"void main()\n"
13"{\n"
14" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
15" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
16" gl_FragColor = (col00 + col01) / div_s;\n"
17"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd
new file mode 100644
index 0000000000..4d29510d4a
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd
@@ -0,0 +1,17 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec2 tex_c;
10varying vec2 tex_s[2];
11varying vec4 div_s;
12void main()
13{
14 vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
15 vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
16 gl_FragColor = (col00 + col01) / div_s;
17}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.h
new file mode 100644
index 0000000000..7c7d7db63b
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.h
@@ -0,0 +1,18 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec2 tex_coord;\n"
6"attribute vec2 tex_sample;\n"
7"uniform mat4 mvp;\n"
8"varying vec2 tex_c;\n"
9"varying vec2 tex_s[2];\n"
10"varying vec4 div_s;\n"
11"void main()\n"
12"{\n"
13" gl_Position = mvp * vertex;\n"
14" tex_c = tex_coord;\n"
15" tex_s[0] = vec2(-tex_sample.x, 0);\n"
16" tex_s[1] = vec2( tex_sample.x, 0);\n"
17" div_s = vec4(2, 2, 2, 2);\n"
18"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd
new file mode 100644
index 0000000000..a6b149f5c5
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd
@@ -0,0 +1,18 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec2 tex_coord;
6attribute vec2 tex_sample;
7uniform mat4 mvp;
8varying vec2 tex_c;
9varying vec2 tex_s[2];
10varying vec4 div_s;
11void main()
12{
13 gl_Position = mvp * vertex;
14 tex_c = tex_coord;
15 tex_s[0] = vec2(-tex_sample.x, 0);
16 tex_s[1] = vec2( tex_sample.x, 0);
17 div_s = vec4(2, 2, 2, 2);
18}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_vert.h b/src/modules/evas/engines/gl_common/shader/tex_21_vert.h
new file mode 100644
index 0000000000..88d1470f26
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_vert.h
@@ -0,0 +1,21 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec4 color;\n"
6"attribute vec2 tex_coord;\n"
7"attribute vec2 tex_sample;\n"
8"uniform mat4 mvp;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[2];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" gl_Position = mvp * vertex;\n"
16" col = color;\n"
17" tex_c = tex_coord;\n"
18" tex_s[0] = vec2(-tex_sample.x, 0);\n"
19" tex_s[1] = vec2( tex_sample.x, 0);\n"
20" div_s = vec4(2, 2, 2, 2);\n"
21"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_vert.shd b/src/modules/evas/engines/gl_common/shader/tex_21_vert.shd
new file mode 100644
index 0000000000..98d9154a73
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_vert.shd
@@ -0,0 +1,21 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec4 color;
6attribute vec2 tex_coord;
7attribute vec2 tex_sample;
8uniform mat4 mvp;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[2];
12varying vec4 div_s;
13void main()
14{
15 gl_Position = mvp * vertex;
16 col = color;
17 tex_c = tex_coord;
18 tex_s[0] = vec2(-tex_sample.x, 0);
19 tex_s[1] = vec2( tex_sample.x, 0);
20 div_s = vec4(2, 2, 2, 2);
21}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_frag.h b/src/modules/evas/engines/gl_common/shader/tex_22_frag.h
new file mode 100644
index 0000000000..748a33a250
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_frag.h
@@ -0,0 +1,20 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[4];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
16" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
17" vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n"
18" vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n"
19" gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;\n"
20"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_frag.shd b/src/modules/evas/engines/gl_common/shader/tex_22_frag.shd
new file mode 100644
index 0000000000..ab1b12147d
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_frag.shd
@@ -0,0 +1,20 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[4];
12varying vec4 div_s;
13void main()
14{
15 vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
16 vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
17 vec4 col10 = texture2D(tex, tex_c + tex_s[2]);
18 vec4 col11 = texture2D(tex, tex_c + tex_s[3]);
19 gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;
20}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.h
new file mode 100644
index 0000000000..4af85f9fab
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.h
@@ -0,0 +1,19 @@
1"#ifdef GL_ES\n"
2"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3"precision highp float;\n"
4"#else\n"
5"precision mediump float;\n"
6"#endif\n"
7"#endif\n"
8"uniform sampler2D tex;\n"
9"varying vec2 tex_c;\n"
10"varying vec2 tex_s[4];\n"
11"varying vec4 div_s;\n"
12"void main()\n"
13"{\n"
14" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
15" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
16" vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n"
17" vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n"
18" gl_FragColor = (col00 + col01 + col10 + col11) / div_s;\n"
19"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd
new file mode 100644
index 0000000000..3f380ea551
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd
@@ -0,0 +1,19 @@
1#ifdef GL_ES
2#ifdef GL_FRAGMENT_PRECISION_HIGH
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec2 tex_c;
10varying vec2 tex_s[4];
11varying vec4 div_s;
12void main()
13{
14 vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
15 vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
16 vec4 col10 = texture2D(tex, tex_c + tex_s[2]);
17 vec4 col11 = texture2D(tex, tex_c + tex_s[3]);
18 gl_FragColor = (col00 + col01 + col10 + col11) / div_s;
19}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.h
new file mode 100644
index 0000000000..c6fb270bf7
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.h
@@ -0,0 +1,20 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec2 tex_coord;\n"
6"attribute vec2 tex_sample;\n"
7"uniform mat4 mvp;\n"
8"varying vec2 tex_c;\n"
9"varying vec2 tex_s[4];\n"
10"varying vec4 div_s;\n"
11"void main()\n"
12"{\n"
13" gl_Position = mvp * vertex;\n"
14" tex_c = tex_coord;\n"
15" tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
16" tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
17" tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
18" tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
19" div_s = vec4(4, 4, 4, 4);\n"
20"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd
new file mode 100644
index 0000000000..e6303d782d
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd
@@ -0,0 +1,20 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec2 tex_coord;
6attribute vec2 tex_sample;
7uniform mat4 mvp;
8varying vec2 tex_c;
9varying vec2 tex_s[4];
10varying vec4 div_s;
11void main()
12{
13 gl_Position = mvp * vertex;
14 tex_c = tex_coord;
15 tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
16 tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
17 tex_s[2] = vec2( tex_sample.x, tex_sample.y);
18 tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
19 div_s = vec4(4, 4, 4, 4);
20}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_vert.h b/src/modules/evas/engines/gl_common/shader/tex_22_vert.h
new file mode 100644
index 0000000000..e1fc7f4558
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_vert.h
@@ -0,0 +1,23 @@
1"#ifdef GL_ES\n"
2"precision highp float;\n"
3"#endif\n"
4"attribute vec4 vertex;\n"
5"attribute vec4 color;\n"
6"attribute vec2 tex_coord;\n"
7"attribute vec2 tex_sample;\n"
8"uniform mat4 mvp;\n"
9"varying vec4 col;\n"
10"varying vec2 tex_c;\n"
11"varying vec2 tex_s[4];\n"
12"varying vec4 div_s;\n"
13"void main()\n"
14"{\n"
15" gl_Position = mvp * vertex;\n"
16" col = color;\n"
17" tex_c = tex_coord;\n"
18" tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
19" tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
20" tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
21" tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
22" div_s = vec4(4, 4, 4, 4);\n"
23"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_vert.shd b/src/modules/evas/engines/gl_common/shader/tex_22_vert.shd
new file mode 100644
index 0000000000..e964ea1e81
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_vert.shd
@@ -0,0 +1,23 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4attribute vec4 vertex;
5attribute vec4 color;
6attribute vec2 tex_coord;
7attribute vec2 tex_sample;
8uniform mat4 mvp;
9varying vec4 col;
10varying vec2 tex_c;
11varying vec2 tex_s[4];
12varying vec4 div_s;
13void main()
14{
15 gl_Position = mvp * vertex;
16 col = color;
17 tex_c = tex_coord;
18 tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
19 tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
20 tex_s[2] = vec2( tex_sample.x, tex_sample.y);
21 tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
22 div_s = vec4(4, 4, 4, 4);
23}