diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2011-08-23 14:04:07 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2011-09-26 16:47:02 +0800 |
commit | 54c91079d2bd21d3fd97b6d5fa3ba5c4a86b6337 (patch) | |
tree | 2e5eeefd93811c61d2b1fe0187e61174e640cb98 /glamor/glamor_render.c | |
parent | b4f265c7f9bcb7824df19ea915ab32fe84d9ec53 (diff) |
glamor-gles2: Add explicit precision qualifiers for gles2.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'glamor/glamor_render.c')
-rw-r--r-- | glamor/glamor_render.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index cec6c8d25..bc6347883 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -71,12 +71,14 @@ static GLuint glamor_create_composite_fs(struct shader_key *key) { const char *source_solid_fetch = + GLAMOR_DEFAULT_PRECISION "uniform vec4 source;\n" "vec4 get_source()\n" "{\n" " return source;\n" "}\n"; const char *source_alpha_pixmap_fetch = + GLAMOR_DEFAULT_PRECISION "varying vec2 source_texture;\n" "uniform sampler2D source_sampler;\n" "vec4 get_source()\n" @@ -84,6 +86,7 @@ glamor_create_composite_fs(struct shader_key *key) " return texture2D(source_sampler, source_texture);\n" "}\n"; const char *source_pixmap_fetch = + GLAMOR_DEFAULT_PRECISION "varying vec2 source_texture;\n" "uniform sampler2D source_sampler;\n" "vec4 get_source()\n" @@ -91,12 +94,14 @@ glamor_create_composite_fs(struct shader_key *key) " return vec4(texture2D(source_sampler, source_texture).rgb, 1);\n" "}\n"; const char *mask_solid_fetch = + GLAMOR_DEFAULT_PRECISION "uniform vec4 mask;\n" "vec4 get_mask()\n" "{\n" " return mask;\n" "}\n"; const char *mask_alpha_pixmap_fetch = + GLAMOR_DEFAULT_PRECISION "varying vec2 mask_texture;\n" "uniform sampler2D mask_sampler;\n" "vec4 get_mask()\n" @@ -104,6 +109,7 @@ glamor_create_composite_fs(struct shader_key *key) " return texture2D(mask_sampler, mask_texture);\n" "}\n"; const char *mask_pixmap_fetch = + GLAMOR_DEFAULT_PRECISION "varying vec2 mask_texture;\n" "uniform sampler2D mask_sampler;\n" "vec4 get_mask()\n" @@ -111,21 +117,25 @@ glamor_create_composite_fs(struct shader_key *key) " return vec4(texture2D(mask_sampler, mask_texture).rgb, 1);\n" "}\n"; const char *in_source_only = + GLAMOR_DEFAULT_PRECISION "void main()\n" "{\n" " gl_FragColor = get_source();\n" "}\n"; const char *in_normal = + GLAMOR_DEFAULT_PRECISION "void main()\n" "{\n" " gl_FragColor = get_source() * get_mask().a;\n" "}\n"; const char *in_ca_source = + GLAMOR_DEFAULT_PRECISION "void main()\n" "{\n" " gl_FragColor = get_source() * get_mask();\n" "}\n"; const char *in_ca_alpha = + GLAMOR_DEFAULT_PRECISION "void main()\n" "{\n" " gl_FragColor = get_source().a * get_mask();\n" |