Mesa (master): mesa: Fix orientation adjustment for reading stencil pixels.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Mon Apr 6 19:38:44 UTC 2009


Module: Mesa
Branch: master
Commit: 8332925c3caadd293d0c091ef84f7268c673013c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8332925c3caadd293d0c091ef84f7268c673013c

Author: José Fonseca <jfonseca at vmware.com>
Date:   Mon Apr  6 20:36:54 2009 +0100

mesa: Fix orientation adjustment for reading stencil pixels.

Fixes conform spcorner.c & spclear.c failure.

---

 src/mesa/state_tracker/st_cb_readpixels.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index ce7a8cd..e151efc 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 */




More information about the mesa-commit mailing list