OSDN Git Service

gallium: fix do_flip bug on glCopyTexImage / surface_copy() path
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 18 Aug 2008 19:15:09 +0000 (13:15 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 18 Aug 2008 19:18:01 +0000 (13:18 -0600)
src/mesa/state_tracker/st_cb_texture.c

index cf194a9..6177ac6 100644 (file)
@@ -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 */