aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_blit.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-17 13:43:14 +0100
committerMarc Haesen <marc@hc-consult.be>2011-12-17 13:43:14 +0100
commitabacebe06d9f3d2fe1b7d256bd86cddbfa592a85 (patch)
treea05bb04105e9dd1cda779071d9ca274b86840c7e /mesalib/src/mesa/swrast/s_blit.c
parent47913e82955ec8e2b1ba4d4b145497dede9163b5 (diff)
downloadvcxsrv-abacebe06d9f3d2fe1b7d256bd86cddbfa592a85.tar.gz
vcxsrv-abacebe06d9f3d2fe1b7d256bd86cddbfa592a85.tar.bz2
vcxsrv-abacebe06d9f3d2fe1b7d256bd86cddbfa592a85.zip
libX11 libxtrans mesa xserver git update 17 dec 2011
Diffstat (limited to 'mesalib/src/mesa/swrast/s_blit.c')
-rw-r--r--mesalib/src/mesa/swrast/s_blit.c10
1 files changed, 9 insertions, 1 deletions
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;