summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-09-03 14:39:53 -0600
committerBrian Paul <brianp@vmware.com>2009-09-03 16:07:46 -0600
commitbeb05393c8d92d71ccb0f4af0bcdbe58ae8a9cdd (patch)
tree44ce7b82e227d7a59d1a93dc280a26bae290026d /src
parent8fc945cd847aa5d343a5f76eb2f9f2c9075cccdd (diff)
st/mesa: fix glCopyPixels(GL_STENCIL_INDEX) inverted position
If the renderbuffer orientation is Y=0=TOP we need to invert the dstY position.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c4
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 e00754a036..a9cafbf8cd 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,