simplify shaders to have fewer tmp vars. in case of dumb shader compilers.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 20 Feb 2010 04:37:22 +0000 (04:37 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 20 Feb 2010 04:37:22 +0000 (04:37 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@46327 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/engines/gl_common/shader/rect_vert.h
src/modules/engines/gl_common/shader/rect_vert.shd
src/modules/engines/gl_common/shader/yuv_frag.h
src/modules/engines/gl_common/shader/yuv_frag.shd
src/modules/engines/gl_common/shader/yuv_nomul_frag.h
src/modules/engines/gl_common/shader/yuv_nomul_frag.shd
src/modules/engines/gl_common/shader/yuv_nomul_frag_bin_s3c6410.h

index a504cd0..19e1b30 100644 (file)
@@ -3,7 +3,6 @@
 "#endif\n"
 "attribute vec4 vertex;\n"
 "attribute vec4 color;\n"
-"attribute vec2 tex_coord;\n"
 "uniform mat4 mvp;\n"
 "varying vec4 col;\n"
 "void main()\n"
index 3ea4c8b..ea2ed93 100644 (file)
@@ -3,7 +3,6 @@ precision mediump float;
 #endif
 attribute vec4 vertex;
 attribute vec4 color;
-attribute vec2 tex_coord;
 uniform mat4 mvp;
 varying vec4 col;
 void main()
index 379ce91..7cf817d 100644 (file)
@@ -12,8 +12,7 @@
 "                              0.00000, -0.34410,  1.77200, 0.00000,\n"
 "                              1.40200, -0.71410,  0.00000, 0.00000,\n"
 "                             -0.77380,  0.45630, -0.95880, 1.00000);\n"
-"   vec4 yuv = vec4(texture2D(tex, tex_c.xy).r,\n"
-"                   texture2D(texu, tex_c2.xy).r,\n"
-"                   texture2D(texv, tex_c3.xy).r, 1.0);\n"
-"   gl_FragColor = (yuv2rgb * yuv) * col;\n"
+"   gl_FragColor = (yuv2rgb * vec4(texture2D(tex, tex_c.xy).r,\n"
+"                                  texture2D(texu, tex_c2.xy).r,\n"
+"                                  texture2D(texv, tex_c3.xy).r, 1.0)) * col;\n"
 "}\n"
index cc2bc1f..e91fa8f 100644 (file)
@@ -12,8 +12,7 @@ void main()
                               0.00000, -0.34410,  1.77200, 0.00000,
                               1.40200, -0.71410,  0.00000, 0.00000,
                              -0.77380,  0.45630, -0.95880, 1.00000);
-   vec4 yuv = vec4(texture2D(tex, tex_c.xy).r,
-                   texture2D(texu, tex_c2.xy).r,
-                   texture2D(texv, tex_c3.xy).r, 1.0);
-   gl_FragColor = (yuv2rgb * yuv) * col;
+   gl_FragColor = (yuv2rgb * vec4(texture2D(tex, tex_c.xy).r,
+                                  texture2D(texu, tex_c2.xy).r,
+                                  texture2D(texv, tex_c3.xy).r, 1.0)) * col;
 }
index 457ad22..e811b01 100644 (file)
@@ -11,8 +11,7 @@
 "                              0.00000, -0.34410,  1.77200, 0.00000,\n"
 "                              1.40200, -0.71410,  0.00000, 0.00000,\n"
 "                             -0.77380,  0.45630, -0.95880, 1.00000);\n"
-"   vec4 yuv = vec4(texture2D(tex, tex_c.xy).r,\n"
-"                   texture2D(texu, tex_c2.xy).r,\n"
-"                   texture2D(texv, tex_c3.xy).r, 1.0);\n"
-"   gl_FragColor = (yuv2rgb * yuv);\n"
+"   gl_FragColor = yuv2rgb * vec4(texture2D(tex, tex_c.xy).r,\n"
+"                                 texture2D(texu, tex_c2.xy).r,\n"
+"                                 texture2D(texv, tex_c3.xy).r, 1.0);\n"
 "}\n"
index f80d940..835de48 100644 (file)
@@ -11,8 +11,7 @@ void main()
                               0.00000, -0.34410,  1.77200, 0.00000,
                               1.40200, -0.71410,  0.00000, 0.00000,
                              -0.77380,  0.45630, -0.95880, 1.00000);
-   vec4 yuv = vec4(texture2D(tex, tex_c.xy).r,
-                   texture2D(texu, tex_c2.xy).r,
-                   texture2D(texv, tex_c3.xy).r, 1.0);
-   gl_FragColor = (yuv2rgb * yuv);
+   gl_FragColor = yuv2rgb * vec4(texture2D(tex, tex_c.xy).r,
+                                 texture2D(texu, tex_c2.xy).r,
+                                 texture2D(texv, tex_c3.xy).r, 1.0);
 }
index 0951f16..45aa66d 100644 (file)
@@ -1,19 +1,19 @@
 0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x0000000c, 0x00000007, 
 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000003, 
 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000022, 0x00000000, 
-0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, 
-0x307820e4, 0x00000000, 0x01000000, 0x02025400, 0x23782150, 0x00000000, 
-0x01000000, 0x0101e407, 0x307821e4, 0x00000000, 0x02000000, 0x02025400, 
+0x00000000, 0x02065400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, 
+0x307820e4, 0x00000000, 0x01000000, 0x02065400, 0x23782150, 0x00000000, 
+0x01000000, 0x0101e407, 0x307821e4, 0x00000000, 0x02000000, 0x02065400, 
 0x23782250, 0x00000000, 0x02000000, 0x0102e407, 0x307822e4, 0x00000000, 
-0x00000000, 0x02030001, 0x237823e4, 0x00000000, 0x01e40103, 0x02040001, 
-0x2ef823e4, 0x00000000, 0x02e40103, 0x02050001, 0x2ef823e4, 0x00000000, 
-0x00000000, 0x02060000, 0x20f824e4, 0x00000000, 0x02e40103, 0x01040002, 
+0x00000000, 0x02020001, 0x237823e4, 0x00000000, 0x01e40103, 0x02030001, 
+0x2ef823e4, 0x00000000, 0x02e40103, 0x02040001, 0x2ef823e4, 0x00000000, 
+0x00000000, 0x02050000, 0x20f824e4, 0x00000000, 0x06e40103, 0x01040002, 
 0x2efa10e4, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, 
 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 
-0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 
-0x3f94fdf4, 0x3f94fdf4, 0x3f94fdf4, 0x00000000, 0x00000000, 0xbeb02de0
-0x3fe2d0e5, 0x00000000, 0x3fb374bc, 0xbf36cf42, 0x00000000, 0x00000000, 
-0xbf4617c2, 0x3ee9a027, 0xbf7573eb, 0x3f800000, 0x0000000e, 0x00000005, 
+0x3f800000, 0x3f800000, 0x3f94fdf4, 0x3f94fdf4, 0x3f94fdf4, 0x00000000, 
+0x00000000, 0xbeb02de0, 0x3fe2d0e5, 0x00000000, 0x3fb374bc, 0xbf36cf42
+0x00000000, 0x00000000, 0xbf4617c2, 0x3ee9a027, 0xbf7573eb, 0x3f800000, 
+0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x0000000e, 0x00000005, 
 0x00000003, 0x00000000, 0x00000000, 0x00000014, 0x00000006, 0x00000003, 
 0x00000000, 0x00000004, 0x0000001b, 0x00000006, 0x00000003, 0x00000000, 
 0x00000008, 0x00000000, 0x00000003, 0x0000000f, 0x00030005, 0x00000000,