summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/i915simple/i915_surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_surface.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_surface.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/pipe/i915simple/i915_surface.c b/src/mesa/pipe/i915simple/i915_surface.c
index 1bdaba773f1..6d4b8a0aa9f 100644
--- a/src/mesa/pipe/i915simple/i915_surface.c
+++ b/src/mesa/pipe/i915simple/i915_surface.c
@@ -83,6 +83,7 @@ i915_get_tex_surface(struct pipe_context *pipe,
*/
static void
i915_surface_copy(struct pipe_context *pipe,
+ unsigned do_flip,
struct pipe_surface *dst,
unsigned dstx, unsigned dsty,
struct pipe_surface *src,
@@ -98,14 +99,15 @@ i915_surface_copy(struct pipe_context *pipe,
dstx, dsty,
width, height,
pipe_surface_map(src),
- src->pitch,
- srcx, srcy);
+ do_flip ? -src->pitch : src->pitch,
+ srcx, do_flip ? 1 - srcy - height : srcy);
pipe_surface_unmap(src);
pipe_surface_unmap(dst);
}
else {
i915_copy_blit( i915_context(pipe),
+ do_flip,
dst->cpp,
(short) src->pitch, src->buffer, src->offset,
(short) dst->pitch, dst->buffer, dst->offset,