[Mesa-dev] [PATCH] swrast: fix readback regression since inversion fix

Brian Paul brianp at vmware.com
Thu Dec 5 07:22:03 PST 2013


On 12/04/2013 08:30 PM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> 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
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>   src/mesa/drivers/dri/swrast/swrast.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
> index 73dc5c4..0e1c530 100644
> --- a/src/mesa/drivers/dri/swrast/swrast.c
> +++ b/src/mesa/drivers/dri/swrast/swrast.c
> @@ -402,7 +402,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);
>
>

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the mesa-dev mailing list