diff options
author | Brian <[email protected]> | 2008-03-20 14:20:25 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2008-03-20 15:04:08 -0600 |
commit | 3aa8c660ffa9763dbdfdf2d75e991a08e41c29b6 (patch) | |
tree | 3dd6c5c231aaca5f2d6a6f7dbdd20c93c5b50c61 /src/mesa/state_tracker | |
parent | c2044eaca96abfae153651ec609b5af2fd0b6fb0 (diff) |
gallium: Y-invert blit depending on framebuffer orientation
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_blit.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c index 64314a5078f..63211d8b66e 100644 --- a/src/mesa/state_tracker/st_cb_blit.c +++ b/src/mesa/state_tracker/st_cb_blit.c @@ -85,11 +85,14 @@ st_BlitFramebuffer(GLcontext *ctx, struct pipe_surface *srcSurf = srcRb->surface; struct pipe_surface *dstSurf = dstRb->surface; - srcY0 = srcRb->Base.Height - srcY0; - srcY1 = srcRb->Base.Height - srcY1; - - dstY0 = dstRb->Base.Height - dstY0; - dstY1 = dstRb->Base.Height - dstY1; + if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) { + /* invert Y */ + srcY0 = srcRb->Base.Height - srcY0; + srcY1 = srcRb->Base.Height - srcY1; + + dstY0 = dstRb->Base.Height - dstY0; + dstY1 = dstRb->Base.Height - dstY1; + } util_blit_pixels(st->blit, srcSurf, srcX0, srcY0, srcX1, srcY1, |