aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-08-26 10:26:21 +0200
committermarha <marha@users.sourceforge.net>2013-08-26 10:26:21 +0200
commitbe8a3ecf0bebc7134452778070cd83b7decf7f71 (patch)
treee3a5d81a99754c393062ed811bece6e0787e3767 /mesalib/src/mesa/drivers
parent7403278d95051a554e2cbec3fafdde8ce9c6d200 (diff)
parent5ee5b91b019005aa27273dff01388a68c12be293 (diff)
downloadvcxsrv-be8a3ecf0bebc7134452778070cd83b7decf7f71.tar.gz
vcxsrv-be8a3ecf0bebc7134452778070cd83b7decf7f71.tar.bz2
vcxsrv-be8a3ecf0bebc7134452778070cd83b7decf7f71.zip
Merge remote-tracking branch 'origin/released'
* origin/released: xserver mesa fontconfig libX11 libxcb libxcb/xcb-proto xkeyboard-config git update 26 Aug 2013
Diffstat (limited to 'mesalib/src/mesa/drivers')
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index 60157af98..798efa680 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -1537,6 +1537,9 @@ setup_glsl_blit_framebuffer(struct gl_context *ctx,
"}\n";
fs_source = ralloc_asprintf(mem_ctx,
+ "#ifdef GL_ES\n"
+ "precision highp float;\n"
+ "#endif\n"
"uniform %s texSampler;\n"
"varying vec2 texCoords;\n"
"void main()\n"
@@ -1561,6 +1564,9 @@ setup_glsl_blit_framebuffer(struct gl_context *ctx,
_mesa_is_desktop_gl(ctx) ? "130" : "300 es");
fs_source = ralloc_asprintf(mem_ctx,
"#version %s\n"
+ "#ifdef GL_ES\n"
+ "precision highp float;\n"
+ "#endif\n"
"uniform %s texSampler;\n"
"in vec2 texCoords;\n"
"out vec4 out_color;\n"
@@ -2139,6 +2145,9 @@ meta_glsl_clear_init(struct gl_context *ctx, struct clear_state *clear)
" gl_Position = position;\n"
"}\n";
const char *fs_source =
+ "#ifdef GL_ES\n"
+ "precision highp float;\n"
+ "#endif\n"
"uniform vec4 color;\n"
"void main()\n"
"{\n"
@@ -2198,6 +2207,9 @@ meta_glsl_clear_init(struct gl_context *ctx, struct clear_state *clear)
const char *fs_int_source =
ralloc_asprintf(shader_source_mem_ctx,
"#version %s\n"
+ "#ifdef GL_ES\n"
+ "precision highp float;\n"
+ "#endif\n"
"uniform ivec4 color;\n"
"out ivec4 out_color;\n"
"\n"
@@ -3426,6 +3438,9 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
fs_source = ralloc_asprintf(mem_ctx,
"#extension GL_EXT_texture_array : enable\n"
+ "#ifdef GL_ES\n"
+ "precision highp float;\n"
+ "#endif\n"
"uniform %s texSampler;\n"
"varying vec3 texCoords;\n"
"void main()\n"
@@ -3449,6 +3464,9 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
_mesa_is_desktop_gl(ctx) ? "130" : "300 es");
fs_source = ralloc_asprintf(mem_ctx,
"#version %s\n"
+ "#ifdef GL_ES\n"
+ "precision highp float;\n"
+ "#endif\n"
"uniform %s texSampler;\n"
"in vec3 texCoords;\n"
"out vec4 out_color;\n"
@@ -4004,6 +4022,11 @@ decompress_texture_image(struct gl_context *ctx,
verts[3].x = 0.0F;
verts[3].y = height;
+ _mesa_MatrixMode(GL_PROJECTION);
+ _mesa_LoadIdentity();
+ _mesa_Ortho(0.0, width, 0.0, height, -1.0, 1.0);
+ _mesa_set_viewport(ctx, 0, 0, width, height);
+
/* upload new vertex data */
_mesa_BufferSubData(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts);