summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/i965simple
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/i965simple')
-rw-r--r--src/mesa/pipe/i965simple/brw_blit.c1
-rw-r--r--src/mesa/pipe/i965simple/brw_blit.h1
-rw-r--r--src/mesa/pipe/i965simple/brw_surface.c6
3 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/pipe/i965simple/brw_blit.c b/src/mesa/pipe/i965simple/brw_blit.c
index bbd366294f..8494f70493 100644
--- a/src/mesa/pipe/i965simple/brw_blit.c
+++ b/src/mesa/pipe/i965simple/brw_blit.c
@@ -111,6 +111,7 @@ static unsigned translate_raster_op(unsigned logicop)
/* Copy BitBlt
*/
void brw_copy_blit(struct brw_context *brw,
+ unsigned do_flip,
unsigned cpp,
short src_pitch,
struct pipe_buffer *src_buffer,
diff --git a/src/mesa/pipe/i965simple/brw_blit.h b/src/mesa/pipe/i965simple/brw_blit.h
index 7f17a70173..111c5d91d3 100644
--- a/src/mesa/pipe/i965simple/brw_blit.h
+++ b/src/mesa/pipe/i965simple/brw_blit.h
@@ -16,6 +16,7 @@ void brw_fill_blit(struct brw_context *intel,
short w, short h,
unsigned color);
void brw_copy_blit(struct brw_context *intel,
+ unsigned do_flip,
unsigned cpp,
short src_pitch,
struct pipe_buffer *src_buffer,
diff --git a/src/mesa/pipe/i965simple/brw_surface.c b/src/mesa/pipe/i965simple/brw_surface.c
index eb7835836e..518845e4b2 100644
--- a/src/mesa/pipe/i965simple/brw_surface.c
+++ b/src/mesa/pipe/i965simple/brw_surface.c
@@ -103,6 +103,7 @@ brw_surface_data(struct pipe_context *pipe,
*/
static void
brw_surface_copy(struct pipe_context *pipe,
+ unsigned do_flip,
struct pipe_surface *dst,
unsigned dstx, unsigned dsty,
struct pipe_surface *src,
@@ -118,14 +119,15 @@ brw_surface_copy(struct pipe_context *pipe,
dstx, dsty,
width, height,
pipe_surface_map(src) + src->offset,
- 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 {
brw_copy_blit(brw_context(pipe),
+ do_flip,
dst->cpp,
(short) src->pitch, src->buffer, src->offset, FALSE,
(short) dst->pitch, dst->buffer, dst->offset, FALSE,