From abacebe06d9f3d2fe1b7d256bd86cddbfa592a85 Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 17 Dec 2011 13:43:14 +0100 Subject: libX11 libxtrans mesa xserver git update 17 dec 2011 --- mesalib/src/mesa/swrast/s_blit.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'mesalib/src/mesa/swrast/s_blit.c') diff --git a/mesalib/src/mesa/swrast/s_blit.c b/mesalib/src/mesa/swrast/s_blit.c index 2817ec12f..803ad2e89 100644 --- a/mesalib/src/mesa/swrast/s_blit.c +++ b/mesalib/src/mesa/swrast/s_blit.c @@ -478,7 +478,15 @@ simple_blit(struct gl_context *ctx, ASSERT(srcX1 - srcX0 == dstX1 - dstX0); ASSERT(srcY1 - srcY0 == dstY1 - dstY0); - /* determine if copy should be bottom-to-top or top-to-bottom */ + /* From the GL_ARB_framebuffer_object spec: + * + * "If the source and destination buffers are identical, and the source + * and destination rectangles overlap, the result of the blit operation + * is undefined." + * + * However, we provide the expected result anyway by flipping the order of + * the memcpy of rows. + */ if (srcY0 > dstY0) { /* src above dst: copy bottom-to-top */ yStep = 1; -- cgit v1.2.3