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

Author: Brian Paul <[email protected]>
Date:   Thu Sep  3 14:39:53 2009 -0600

st/mesa: fix glCopyPixels(GL_STENCIL_INDEX) inverted position

If the renderbuffer orientation is Y=0=TOP we need to invert the dstY
position.

---

 src/mesa/state_tracker/st_cb_drawpixels.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c 
b/src/mesa/state_tracker/st_cb_drawpixels.c
index e00754a..a9cafbf 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -865,6 +865,10 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
       usage = PIPE_TRANSFER_READ_WRITE;
    else
       usage = PIPE_TRANSFER_WRITE;
+   
+   if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) {
+      dsty = rbDraw->Base.Height - dsty - height;
+   }
 
    ptDraw = st_cond_flush_get_tex_transfer(st_context(ctx),
                                           rbDraw->texture, 0, 0, 0,

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to