r300g: align the height of NPOT textures to POT
[mesa.git] / src / gallium / winsys / g3dvl / nouveau / nouveau_swapbuffers.c
index 16e6d5543cbc04b95f39c36b4c4ccce5abc859c1..77e46a2054bedf369a5016954e9f2fb9361b0ed3 100644 (file)
@@ -9,6 +9,7 @@ nouveau_copy_buffer(dri_drawable_t *dri_drawable, struct pipe_surface *surf,
                    const drm_clip_rect_t *rect)
 {
        struct nouveau_context_vl       *nv = dri_drawable->private;
+       struct pipe_context             *pipe = nv->base.nvc->pctx[nv->base.pctx_id];
        drm_clip_rect_t                 *pbox;
        int                             nbox, i;
 
@@ -20,7 +21,6 @@ nouveau_copy_buffer(dri_drawable_t *dri_drawable, struct pipe_surface *surf,
        pbox = dri_drawable->cliprects;
        nbox = dri_drawable->num_cliprects;
 
-       nv->base.surface_copy_prep(&nv->base, nv->base.frontbuffer, surf);
        for (i = 0; i < nbox; i++, pbox++) {
                int sx, sy, dx, dy, w, h;
 
@@ -31,7 +31,8 @@ nouveau_copy_buffer(dri_drawable_t *dri_drawable, struct pipe_surface *surf,
                w  = pbox->x2 - pbox->x1;
                h  = pbox->y2 - pbox->y1;
 
-               nv->base.surface_copy(&nv->base, dx, dy, sx, sy, w, h);
+               pipe->surface_copy(pipe, nv->base.frontbuffer,
+                                  dx, dy, surf, sx, sy, w, h);
        }
 
        FIRE_RING(nv->base.nvc->channel);