mesa: Fix orientation adjustment for reading stencil pixels.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 6 Apr 2009 19:36:54 +0000 (20:36 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 6 Apr 2009 19:38:37 +0000 (20:38 +0100)
Fixes conform spcorner.c & spclear.c failure.

src/mesa/state_tracker/st_cb_readpixels.c

index ce7a8cda4e86e7167b4149c89c190c740f90011d..e151efcb88fe5d834db6d9306504edb2091d6c92 100644 (file)
@@ -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 */