diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-02-13 17:34:29 +0100 |
---|---|---|
committer | Michel Dänzer <daenzer@vmware.com> | 2009-02-13 17:34:29 +0100 |
commit | 7c8836e9ef49d938aa55a1c385b95c6371c301f1 (patch) | |
tree | a7354d9e30c00e6ea3fd19f847232f6afa76bccc /src/mesa/state_tracker/st_cb_readpixels.c | |
parent | 5af34758e3bba55cb8c227ae1256818e8f112727 (diff) |
gallium: Various coordinate fixups for texture transfers.
Fixes glReadPixels, gl(Copy)TexSubImage, glCopyPixels.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_readpixels.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_readpixels.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index e763827c3c..5a4a7f0a61 100644 --- a/src/mesa/state_tracker/st_cb_readpixels.c +++ b/src/mesa/state_tracker/st_cb_readpixels.c @@ -213,7 +213,7 @@ st_fast_readpixels(GLcontext *ctx, struct st_renderbuffer *strb, GLint row, col, dy, dstStride; if (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP) { - y = strb->texture->height[0] - y - 1; + y = strb->texture->height[0] - y - height; } trans = screen->get_tex_transfer(screen, strb->texture, 0, 0, 0, @@ -229,7 +229,7 @@ st_fast_readpixels(GLcontext *ctx, struct st_renderbuffer *strb, } if (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP) { - y = height - y - 1; + y = height - 1; dy = -1; } else { @@ -365,7 +365,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, } if (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP) { - y = strb->Base.Height - 1 - y; + y = strb->Base.Height - y - height; } /* Create a read transfer from the renderbuffer's texture */ @@ -374,7 +374,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, /* determine bottom-to-top vs. top-to-bottom order */ if (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP) { - y = trans->height - 1 - y; + y = height - 1; yStep = -1; } else { |