From: José Fonseca Date: Mon, 6 Apr 2009 19:36:54 +0000 (+0100) Subject: mesa: Fix orientation adjustment for reading stencil pixels. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8332925c3caadd293d0c091ef84f7268c673013c;p=mesa.git mesa: Fix orientation adjustment for reading stencil pixels. Fixes conform spcorner.c & spclear.c failure. --- diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index ce7a8cda4e8..e151efcb88f 100644 --- a/src/mesa/state_tracker/st_cb_readpixels.c +++ b/src/mesa/state_tracker/st_cb_readpixels.c @@ -68,7 +68,7 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y, GLint j; if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) { - y = ctx->DrawBuffer->Height - y - 1; + y = ctx->DrawBuffer->Height - y - height; } /* Create a read transfer from the renderbuffer's texture */