diff options
author | Brian Paul <[email protected]> | 2008-08-19 17:41:34 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-08-19 17:41:34 -0600 |
commit | 7f9959ae8394f8e52a180f5e261b0f9470f6c5bc (patch) | |
tree | 1adf4da9f2b8a01a5884cd9f51c5e69f86aa113c /src | |
parent | 63c0970dca9c13ab83ea24f108b41f75f2a290a7 (diff) |
gallium: fix do_flip bug in sp_surface_copy()
Surfaces are always in y=0=top raster order so the caller should invert
the Y coordinate if needed; don't do it in sp_surface_copy().
Fixes a glCopyTexture regression.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_surface.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_surface.c b/src/gallium/drivers/softpipe/sp_surface.c index 7dc15c38d10..4f1bb881cb5 100644 --- a/src/gallium/drivers/softpipe/sp_surface.c +++ b/src/gallium/drivers/softpipe/sp_surface.c @@ -39,6 +39,9 @@ * Copy a rectangular region from one surface to another. * Surfaces must have same bpp. * + * Note that it's always the case that Y=0=top of the raster. + * If do_flip is non-zero, the region being copied will be flipped vertically. + * * Assumes all values are within bounds -- no checking at this level - * do it higher up if required. */ @@ -72,7 +75,7 @@ sp_surface_copy(struct pipe_context *pipe, width, height, src_map, do_flip ? -(int) src->stride : src->stride, - srcx, do_flip ? src->height - 1 - srcy : srcy); + srcx, srcy); pipe->screen->surface_unmap(pipe->screen, src); pipe->screen->surface_unmap(pipe->screen, dst); |