From: Carsten Haitzler (Rasterman) Date: Sun, 18 Oct 2015 06:49:23 +0000 (+0900) Subject: evas bigendian fix - only fix img shaders as only these src pixels X-Git-Tag: v1.16.0-beta2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b70f02a652dafb808627f69cf5ed4a0c9da903c8;p=platform%2Fupstream%2Fefl.git evas bigendian fix - only fix img shaders as only these src pixels --- diff --git a/src/modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x b/src/modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x index 2dd95fb..4908ac4 100644 --- a/src/modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x +++ b/src/modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x @@ -612,7 +612,7 @@ static const char img_frag_glsl[] = "void main()\n" "{\n" " vec4 c;\n" - " c = texture2D(tex, tex_c).gbar;\n" + " c = texture2D(tex, tex_c).bgra;\n" " gl_FragColor =\n" " c\n" " * col\n" @@ -6934,7 +6934,7 @@ static const char rgb_a_pair_frag_glsl[] = "void main()\n" "{\n" " vec4 c;\n" - " c = texture2D(tex, tex_c).gbar;\n" + " c = texture2D(tex, tex_c).bgra;\n" " gl_FragColor =\n" " c\n" " * col\n" @@ -6990,7 +6990,7 @@ static const char rgb_a_pair_mask_frag_glsl[] = "void main()\n" "{\n" " vec4 c;\n" - " c = texture2D(tex, tex_c).gbar;\n" + " c = texture2D(tex, tex_c).bgra;\n" " float ma;\n" " ma = texture2D(texm, tex_m).a;\n" " gl_FragColor =\n" @@ -7050,7 +7050,7 @@ static const char rgb_a_pair_nomul_frag_glsl[] = "void main()\n" "{\n" " vec4 c;\n" - " c = texture2D(tex, tex_c).gbar;\n" + " c = texture2D(tex, tex_c).bgra;\n" " gl_FragColor =\n" " c\n" " * texture2D(texa, tex_a).r\n" @@ -7101,7 +7101,7 @@ static const char rgb_a_pair_mask_nomul_frag_glsl[] = "void main()\n" "{\n" " vec4 c;\n" - " c = texture2D(tex, tex_c).gbar;\n" + " c = texture2D(tex, tex_c).bgra;\n" " float ma;\n" " ma = texture2D(texm, tex_m).a;\n" " gl_FragColor =\n" @@ -7160,7 +7160,7 @@ static const char tex_external_frag_glsl[] = "void main()\n" "{\n" " vec4 c;\n" - " c = texture2D(tex, tex_c).gbar;\n" + " c = texture2D(tex, tex_c).bgra;\n" " gl_FragColor =\n" " c\n" " * col\n" @@ -7212,7 +7212,7 @@ static const char tex_external_afill_frag_glsl[] = "void main()\n" "{\n" " vec4 c;\n" - " c = texture2D(tex, tex_c).gbar;\n" + " c = texture2D(tex, tex_c).bgra;\n" " gl_FragColor =\n" " c\n" " * col\n" @@ -7264,7 +7264,7 @@ static const char tex_external_nomul_frag_glsl[] = "void main()\n" "{\n" " vec4 c;\n" - " c = texture2D(tex, tex_c).gbar;\n" + " c = texture2D(tex, tex_c).bgra;\n" " gl_FragColor =\n" " c\n" " ;\n" @@ -7311,7 +7311,7 @@ static const char tex_external_nomul_afill_frag_glsl[] = "void main()\n" "{\n" " vec4 c;\n" - " c = texture2D(tex, tex_c).gbar;\n" + " c = texture2D(tex, tex_c).bgra;\n" " gl_FragColor =\n" " c\n" " ;\n" @@ -7362,7 +7362,7 @@ static const char tex_external_mask_frag_glsl[] = "void main()\n" "{\n" " vec4 c;\n" - " c = texture2D(tex, tex_c).gbar;\n" + " c = texture2D(tex, tex_c).bgra;\n" " float ma;\n" " ma = texture2D(texm, tex_m).a;\n" " gl_FragColor =\n" @@ -7422,7 +7422,7 @@ static const char tex_external_mask_nomul_frag_glsl[] = "void main()\n" "{\n" " vec4 c;\n" - " c = texture2D(tex, tex_c).gbar;\n" + " c = texture2D(tex, tex_c).bgra;\n" " float ma;\n" " ma = texture2D(texm, tex_m).a;\n" " gl_FragColor =\n" diff --git a/src/modules/evas/engines/gl_common/shader/fragment.glsl b/src/modules/evas/engines/gl_common/shader/fragment.glsl index 3d5b1a4..6d524bd 100644 --- a/src/modules/evas/engines/gl_common/shader/fragment.glsl +++ b/src/modules/evas/engines/gl_common/shader/fragment.glsl @@ -66,13 +66,13 @@ varying vec2 masktex_s[4]; # define SWZ aaaa #else # ifndef SHD_BGRA -# ifdef BIGENDIAN +# if defined(SHD_IMG) && defined(BIGENDIAN) # define SWZ gbar # else # define SWZ bgra #endif # else -# ifdef BIGENDIAN +# if defined(SHD_IMG) && defined(BIGENDIAN) # define SWZ grab # else # define SWZ rgba diff --git a/src/modules/evas/engines/gl_common/shader/shaders.txt b/src/modules/evas/engines/gl_common/shader/shaders.txt index 86e292d..78e6a99 100644 --- a/src/modules/evas/engines/gl_common/shader/shaders.txt +++ b/src/modules/evas/engines/gl_common/shader/shaders.txt @@ -23,114 +23,114 @@ font_mask22:tex,mask,masksam22,alpha # Images: color version img:tex -img_bgra:tex,bgra -img_12:tex,sam12 -img_21:tex,sam21 -img_22:tex,sam22 -img_12_bgra:tex,sam12,bgra -img_21_bgra:tex,sam21,bgra -img_22_bgra:tex,sam22,bgra - -img_mask:tex,mask -img_bgra_mask:tex,mask,bgra -img_12_mask:tex,mask,sam12 -img_21_mask:tex,mask,sam21 -img_22_mask:tex,mask,sam22 -img_12_bgra_mask:tex,mask,sam12,bgra -img_21_bgra_mask:tex,mask,sam21,bgra -img_22_bgra_mask:tex,mask,sam22,bgra +img_bgra:tex,img,bgra +img_12:tex,img,sam12 +img_21:tex,img,sam21 +img_22:tex,img,sam22 +img_12_bgra:tex,img,sam12,bgra +img_21_bgra:tex,img,sam21,bgra +img_22_bgra:tex,img,sam22,bgra + +img_mask:tex,img,mask +img_bgra_mask:tex,img,mask,bgra +img_12_mask:tex,img,mask,sam12 +img_21_mask:tex,img,mask,sam21 +img_22_mask:tex,img,mask,sam22 +img_12_bgra_mask:tex,img,mask,sam12,bgra +img_21_bgra_mask:tex,img,mask,sam21,bgra +img_22_bgra_mask:tex,img,mask,sam22,bgra # Images: nomul version (copy above with extra nomul flag) -img_nomul:tex,nomul -img_bgra_nomul:tex,nomul,bgra -img_12_nomul:tex,sam12,nomul -img_21_nomul:tex,sam21,nomul -img_22_nomul:tex,sam22,nomul -img_12_bgra_nomul:tex,sam12,bgra,nomul -img_21_bgra_nomul:tex,sam21,bgra,nomul -img_22_bgra_nomul:tex,sam22,bgra,nomul - -img_mask_nomul:tex,mask,nomul -img_bgra_mask_nomul:tex,mask,nomul,bgra -img_12_mask_nomul:tex,mask,sam12,nomul -img_21_mask_nomul:tex,mask,sam21,nomul -img_22_mask_nomul:tex,mask,sam22,nomul -img_12_bgra_mask_nomul:tex,mask,sam12,bgra,nomul -img_21_bgra_mask_nomul:tex,mask,sam21,bgra,nomul -img_22_bgra_mask_nomul:tex,mask,sam22,bgra,nomul +img_nomul:tex,img,nomul +img_bgra_nomul:tex,img,nomul,bgra +img_12_nomul:tex,img,sam12,nomul +img_21_nomul:tex,img,sam21,nomul +img_22_nomul:tex,img,sam22,nomul +img_12_bgra_nomul:tex,img,sam12,bgra,nomul +img_21_bgra_nomul:tex,img,sam21,bgra,nomul +img_22_bgra_nomul:tex,img,sam22,bgra,nomul + +img_mask_nomul:tex,img,mask,nomul +img_bgra_mask_nomul:tex,img,mask,nomul,bgra +img_12_mask_nomul:tex,img,mask,sam12,nomul +img_21_mask_nomul:tex,img,mask,sam21,nomul +img_22_mask_nomul:tex,img,mask,sam22,nomul +img_12_bgra_mask_nomul:tex,img,mask,sam12,bgra,nomul +img_21_bgra_mask_nomul:tex,img,mask,sam21,bgra,nomul +img_22_bgra_mask_nomul:tex,img,mask,sam22,bgra,nomul # Now the same as above but with MASKSAM -img_mask12:tex,mask,masksam12 -img_bgra_mask12:tex,mask,masksam12,bgra -img_12_mask12:tex,mask,masksam12,sam12 -img_21_mask12:tex,mask,masksam12,sam21 -img_22_mask12:tex,mask,masksam12,sam22 -img_12_bgra_mask12:tex,mask,masksam12,sam12,bgra -img_21_bgra_mask12:tex,mask,masksam12,sam21,bgra -img_22_bgra_mask12:tex,mask,masksam12,sam22,bgra -img_mask12_nomul:tex,mask,masksam12,nomul -img_bgra_mask12_nomul:tex,mask,masksam12,nomul,bgra -img_12_mask12_nomul:tex,mask,masksam12,sam12,nomul -img_21_mask12_nomul:tex,mask,masksam12,sam21,nomul -img_22_mask12_nomul:tex,mask,masksam12,sam22,nomul -img_12_bgra_mask12_nomul:tex,mask,masksam12,sam12,bgra,nomul -img_21_bgra_mask12_nomul:tex,mask,masksam12,sam21,bgra,nomul -img_22_bgra_mask12_nomul:tex,mask,masksam12,sam22,bgra,nomul - -img_mask21:tex,mask,masksam21 -img_bgra_mask21:tex,mask,masksam21,bgra -img_12_mask21:tex,mask,masksam21,sam12 -img_21_mask21:tex,mask,masksam21,sam21 -img_22_mask21:tex,mask,masksam21,sam22 -img_12_bgra_mask21:tex,mask,masksam21,sam12,bgra -img_21_bgra_mask21:tex,mask,masksam21,sam21,bgra -img_22_bgra_mask21:tex,mask,masksam21,sam22,bgra -img_mask21_nomul:tex,mask,masksam21,nomul -img_bgra_mask21_nomul:tex,mask,masksam21,nomul,bgra -img_12_mask21_nomul:tex,mask,masksam21,sam12,nomul -img_21_mask21_nomul:tex,mask,masksam21,sam21,nomul -img_22_mask21_nomul:tex,mask,masksam21,sam22,nomul -img_12_bgra_mask21_nomul:tex,mask,masksam21,sam12,bgra,nomul -img_21_bgra_mask21_nomul:tex,mask,masksam21,sam21,bgra,nomul -img_22_bgra_mask21_nomul:tex,mask,masksam21,sam22,bgra,nomul - -img_mask22:tex,mask,masksam22 -img_bgra_mask22:tex,mask,masksam22,bgra -img_12_mask22:tex,mask,masksam22,sam12 -img_21_mask22:tex,mask,masksam22,sam21 -img_22_mask22:tex,mask,masksam22,sam22 -img_12_bgra_mask22:tex,mask,masksam22,sam12,bgra -img_21_bgra_mask22:tex,mask,masksam22,sam21,bgra -img_22_bgra_mask22:tex,mask,masksam22,sam22,bgra -img_mask22_nomul:tex,mask,masksam22,nomul -img_bgra_mask22_nomul:tex,mask,masksam22,nomul,bgra -img_12_mask22_nomul:tex,mask,masksam22,sam12,nomul -img_21_mask22_nomul:tex,mask,masksam22,sam21,nomul -img_22_mask22_nomul:tex,mask,masksam22,sam22,nomul -img_12_bgra_mask22_nomul:tex,mask,masksam22,sam12,bgra,nomul -img_21_bgra_mask22_nomul:tex,mask,masksam22,sam21,bgra,nomul -img_22_bgra_mask22_nomul:tex,mask,masksam22,sam22,bgra,nomul +img_mask12:tex,img,mask,masksam12 +img_bgra_mask12:tex,img,mask,masksam12,bgra +img_12_mask12:tex,img,mask,masksam12,sam12 +img_21_mask12:tex,img,mask,masksam12,sam21 +img_22_mask12:tex,img,mask,masksam12,sam22 +img_12_bgra_mask12:tex,img,mask,masksam12,sam12,bgra +img_21_bgra_mask12:tex,img,mask,masksam12,sam21,bgra +img_22_bgra_mask12:tex,img,mask,masksam12,sam22,bgra +img_mask12_nomul:tex,img,mask,masksam12,nomul +img_bgra_mask12_nomul:tex,img,mask,masksam12,nomul,bgra +img_12_mask12_nomul:tex,img,mask,masksam12,sam12,nomul +img_21_mask12_nomul:tex,img,mask,masksam12,sam21,nomul +img_22_mask12_nomul:tex,img,mask,masksam12,sam22,nomul +img_12_bgra_mask12_nomul:tex,img,mask,masksam12,sam12,bgra,nomul +img_21_bgra_mask12_nomul:tex,img,mask,masksam12,sam21,bgra,nomul +img_22_bgra_mask12_nomul:tex,img,mask,masksam12,sam22,bgra,nomul + +img_mask21:tex,img,mask,masksam21 +img_bgra_mask21:tex,img,mask,masksam21,bgra +img_12_mask21:tex,img,mask,masksam21,sam12 +img_21_mask21:tex,img,mask,masksam21,sam21 +img_22_mask21:tex,img,mask,masksam21,sam22 +img_12_bgra_mask21:tex,img,mask,masksam21,sam12,bgra +img_21_bgra_mask21:tex,img,mask,masksam21,sam21,bgra +img_22_bgra_mask21:tex,img,mask,masksam21,sam22,bgra +img_mask21_nomul:tex,img,mask,masksam21,nomul +img_bgra_mask21_nomul:tex,img,mask,masksam21,nomul,bgra +img_12_mask21_nomul:tex,img,mask,masksam21,sam12,nomul +img_21_mask21_nomul:tex,img,mask,masksam21,sam21,nomul +img_22_mask21_nomul:tex,img,mask,masksam21,sam22,nomul +img_12_bgra_mask21_nomul:tex,img,mask,masksam21,sam12,bgra,nomul +img_21_bgra_mask21_nomul:tex,img,mask,masksam21,sam21,bgra,nomul +img_22_bgra_mask21_nomul:tex,img,mask,masksam21,sam22,bgra,nomul + +img_mask22:tex,img,mask,masksam22 +img_bgra_mask22:tex,img,mask,masksam22,bgra +img_12_mask22:tex,img,mask,masksam22,sam12 +img_21_mask22:tex,img,mask,masksam22,sam21 +img_22_mask22:tex,img,mask,masksam22,sam22 +img_12_bgra_mask22:tex,img,mask,masksam22,sam12,bgra +img_21_bgra_mask22:tex,img,mask,masksam22,sam21,bgra +img_22_bgra_mask22:tex,img,mask,masksam22,sam22,bgra +img_mask22_nomul:tex,img,mask,masksam22,nomul +img_bgra_mask22_nomul:tex,img,mask,masksam22,nomul,bgra +img_12_mask22_nomul:tex,img,mask,masksam22,sam12,nomul +img_21_mask22_nomul:tex,img,mask,masksam22,sam21,nomul +img_22_mask22_nomul:tex,img,mask,masksam22,sam22,nomul +img_12_bgra_mask22_nomul:tex,img,mask,masksam22,sam12,bgra,nomul +img_21_bgra_mask22_nomul:tex,img,mask,masksam22,sam21,bgra,nomul +img_22_bgra_mask22_nomul:tex,img,mask,masksam22,sam22,bgra,nomul # Some AFILL versions -img_afill:tex,afill -img_bgra_afill:tex,afill,bgra -img_nomul_afill:tex,nomul,afill -img_bgra_nomul_afill:tex,nomul,afill,bgra -img_12_afill:tex,sam12,afill -img_21_afill:tex,sam21,afill -img_22_afill:tex,sam22,afill -img_12_bgra_afill:tex,sam12,bgra,afill -img_21_bgra_afill:tex,sam21,bgra,afill -img_22_bgra_afill:tex,sam22,bgra,afill -img_12_nomul_afill:tex,sam12,nomul,afill -img_21_nomul_afill:tex,sam21,nomul,afill -img_22_nomul_afill:tex,sam22,nomul,afill -img_12_bgra_nomul_afill:tex,sam12,bgra,nomul,afill -img_21_bgra_nomul_afill:tex,sam21,bgra,nomul,afill -img_22_bgra_nomul_afill:tex,sam22,bgra,nomul,afill +img_afill:tex,img,afill +img_bgra_afill:tex,img,afill,bgra +img_nomul_afill:tex,img,nomul,afill +img_bgra_nomul_afill:tex,img,nomul,afill,bgra +img_12_afill:tex,img,sam12,afill +img_21_afill:tex,img,sam21,afill +img_22_afill:tex,img,sam22,afill +img_12_bgra_afill:tex,img,sam12,bgra,afill +img_21_bgra_afill:tex,img,sam21,bgra,afill +img_22_bgra_afill:tex,img,sam22,bgra,afill +img_12_nomul_afill:tex,img,sam12,nomul,afill +img_21_nomul_afill:tex,img,sam21,nomul,afill +img_22_nomul_afill:tex,img,sam22,nomul,afill +img_12_bgra_nomul_afill:tex,img,sam12,bgra,nomul,afill +img_21_bgra_nomul_afill:tex,img,sam21,bgra,nomul,afill +img_22_bgra_nomul_afill:tex,img,sam22,bgra,nomul,afill