From 145a45e9d6807add8229f1fc9c63fbb6951b1b88 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 18 Aug 2008 13:15:09 -0600 Subject: gallium: fix do_flip bug on glCopyTexImage / surface_copy() path --- src/mesa/state_tracker/st_cb_texture.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index cf194a937f..6177ac63f0 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1098,6 +1098,10 @@ st_copy_texsubimage(GLcontext *ctx, stImage->face, stImage->level, destZ, PIPE_BUFFER_USAGE_GPU_WRITE); + if (do_flip) + srcY = strb->surface->height - srcY - height; + + /* for surface_copy(), y=0=top, always */ pipe->surface_copy(pipe, do_flip, /* dest */ -- cgit v1.2.3