From: Brian Paul Date: Mon, 18 Aug 2008 19:15:09 +0000 (-0600) Subject: gallium: fix do_flip bug on glCopyTexImage / surface_copy() path X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=145a45e9d6807add8229f1fc9c63fbb6951b1b88;p=mesa.git gallium: fix do_flip bug on glCopyTexImage / surface_copy() path --- diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index cf194a937fc..6177ac63f03 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 */