diff options
author | marha <marha@users.sourceforge.net> | 2013-08-19 09:07:37 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-08-19 09:07:37 +0200 |
commit | 2d042f719910c5aa1ba9f4a47b21009c729c345e (patch) | |
tree | 2b20d89d5f1ca342ca6f1d817c18b324adf7086f /mesalib/src/mesa/drivers/common | |
parent | c3d3ea464f7f4e53e8fe3e11ecada36cb209ba4d (diff) | |
parent | 854ec4da20ddff9b830be0a7d5b81d8cb4774132 (diff) | |
download | vcxsrv-2d042f719910c5aa1ba9f4a47b21009c729c345e.tar.gz vcxsrv-2d042f719910c5aa1ba9f4a47b21009c729c345e.tar.bz2 vcxsrv-2d042f719910c5aa1ba9f4a47b21009c729c345e.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
fontconfig libX11 libXdmcp libxcb xkeyboard-config mesa pixman xserver git update 19 aug 2013
Conflicts:
fontconfig/src/fccache.c
Diffstat (limited to 'mesalib/src/mesa/drivers/common')
-rw-r--r-- | mesalib/src/mesa/drivers/common/meta.c | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c index 4a3497c9a..60157af98 100644 --- a/mesalib/src/mesa/drivers/common/meta.c +++ b/mesalib/src/mesa/drivers/common/meta.c @@ -704,9 +704,14 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) _mesa_LoadIdentity(); _mesa_MatrixMode(GL_PROJECTION); _mesa_LoadIdentity(); - _mesa_Ortho(0.0, ctx->DrawBuffer->Width, - 0.0, ctx->DrawBuffer->Height, - -1.0, 1.0); + + /* glOrtho with width = 0 or height = 0 generates GL_INVALID_VALUE. + * This can occur when there is no draw buffer. + */ + if (ctx->DrawBuffer->Width != 0 && ctx->DrawBuffer->Height != 0) + _mesa_Ortho(0.0, ctx->DrawBuffer->Width, + 0.0, ctx->DrawBuffer->Height, + -1.0, 1.0); } if (state & MESA_META_CLIP) { @@ -956,7 +961,7 @@ _mesa_meta_end(struct gl_context *ctx) if (ctx->Extensions.ARB_vertex_shader) _mesa_use_shader_program(ctx, GL_VERTEX_SHADER, save->VertexShader); - if (ctx->Extensions.ARB_geometry_shader4) + if (_mesa_has_geometry_shaders(ctx)) _mesa_use_shader_program(ctx, GL_GEOMETRY_SHADER_ARB, save->GeometryShader); @@ -1879,19 +1884,24 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx, const GLenum rb_base_format = _mesa_base_tex_format(ctx, colorReadRb->InternalFormat); - newTex = alloc_texture(tex, srcW, srcH, rb_base_format); - setup_copypix_texture(ctx, tex, newTex, srcX, srcY, srcW, srcH, + /* Using the exact source rectangle to create the texture does incorrect + * linear filtering along the edges. So, allocate the texture extended along + * edges by one pixel in x, y directions. + */ + newTex = alloc_texture(tex, srcW + 2, srcH + 2, rb_base_format); + setup_copypix_texture(ctx, tex, newTex, + srcX - 1, srcY - 1, srcW + 2, srcH + 2, rb_base_format, filter); /* texcoords (after texture allocation!) */ { - verts[0].s = 0.0F; - verts[0].t = 0.0F; - verts[1].s = tex->Sright; - verts[1].t = 0.0F; - verts[2].s = tex->Sright; - verts[2].t = tex->Ttop; - verts[3].s = 0.0F; - verts[3].t = tex->Ttop; + verts[0].s = 1.0F; + verts[0].t = 1.0F; + verts[1].s = tex->Sright - 1.0F; + verts[1].t = 1.0F; + verts[2].s = tex->Sright - 1.0F; + verts[2].t = tex->Ttop - 1.0F; + verts[3].s = 1.0F; + verts[3].t = tex->Ttop - 1.0F; /* upload new vertex data */ _mesa_BufferSubData(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); |