Mesa (9.2): swrast: fix readback regression since inversion fix

Carl Worth cworth at kemper.freedesktop.org
Fri Dec 13 04:20:45 UTC 2013


Module: Mesa
Branch: 9.2
Commit: a6524c6d81dc27b45a6e6c9020dbfcf74fb3d643
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a6524c6d81dc27b45a6e6c9020dbfcf74fb3d643

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Dec  5 13:30:17 2013 +1000

swrast: fix readback regression since inversion fix

This readback from the frontbuffer with swrast was broken, that bug
just made it more obviously broken, this fixes it by inverting the
sub image gets. Also fixes a few other piglits.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72327
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72325

(for 9.2 the patches this depends on were asked to be backported separately
 in an email).
Cc: "9.2" "10.0" mesa-stable at lists.fedoraproject.org
Reviewed-by: Brian Paul <brianp at vmware.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>

(cherry picked from commit 0b16042377a6981ff9bba92387889524a3547b3f)

---

 src/mesa/drivers/dri/swrast/swrast.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index a29a9ea..3870673 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -397,7 +397,7 @@ swrast_map_renderbuffer(struct gl_context *ctx,
       stride = w * cpp;
       xrb->Base.Buffer = malloc(h * stride);
 
-      sPriv->swrast_loader->getImage(dPriv, x, y, w, h,
+      sPriv->swrast_loader->getImage(dPriv, x, rb->Height - y - h, w, h,
 				     (char *) xrb->Base.Buffer,
 				     dPriv->loaderPrivate);
 




More information about the mesa-commit mailing list