diff options
author | Eric Anholt <[email protected]> | 2011-12-08 09:28:32 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-12-14 13:18:00 -0800 |
commit | b2469ff043de303402a188c58865dabde14fd03b (patch) | |
tree | d00d37b2fafe1c31552094c985edb6fc17df4516 /src/mesa | |
parent | 657f3214e7b2df525fb0637f764682c1157b766e (diff) |
swrast: Add a note about overlapping support for framebuffer blit.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/swrast/s_blit.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c index 2817ec12ff9..803ad2e899d 100644 --- a/src/mesa/swrast/s_blit.c +++ b/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; |