sna: Make sure all sna_write_boxes* flag the GTT is dirty
Better would be to start passing in the sna_pixmap so that we can mark the GTT as dirty in a single location, and only if we do indeed then do a GTT update or pwrite. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
005075de9d
commit
b443077536
|
|
@ -2889,6 +2889,7 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, const BoxRec *box, unsigned int fl
|
|||
pixmap->devKind,
|
||||
0, 0,
|
||||
box, 1);
|
||||
priv->gtt_dirty = true;
|
||||
}
|
||||
if (!ok)
|
||||
return false;
|
||||
|
|
@ -2920,6 +2921,7 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, const BoxRec *box, unsigned int fl
|
|||
pixmap->devKind,
|
||||
0, 0,
|
||||
box, n);
|
||||
priv->gtt_dirty = true;
|
||||
}
|
||||
if (!ok)
|
||||
return false;
|
||||
|
|
@ -3581,11 +3583,11 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags)
|
|||
pixmap->devKind);
|
||||
} else {
|
||||
ok = sna_write_boxes(sna, pixmap,
|
||||
priv->gpu_bo, 0, 0,
|
||||
pixmap->devPrivate.ptr,
|
||||
pixmap->devKind,
|
||||
0, 0,
|
||||
box, n);
|
||||
priv->gpu_bo, 0, 0,
|
||||
pixmap->devPrivate.ptr,
|
||||
pixmap->devKind,
|
||||
0, 0,
|
||||
box, n);
|
||||
}
|
||||
if (!ok)
|
||||
return NULL;
|
||||
|
|
@ -4976,6 +4978,8 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
|
|||
src_dx, src_dy,
|
||||
box, n))
|
||||
goto fallback;
|
||||
|
||||
dst_priv->gtt_dirty = true;
|
||||
}
|
||||
|
||||
assert(dst_priv->clear == false);
|
||||
|
|
|
|||
|
|
@ -1719,6 +1719,8 @@ blt_put_composite(struct sna *sna,
|
|||
&box, 1);
|
||||
assert(ok);
|
||||
}
|
||||
|
||||
dst_priv->gtt_dirty = true;
|
||||
}
|
||||
|
||||
fastcall static void blt_put_composite_box(struct sna *sna,
|
||||
|
|
@ -1755,6 +1757,8 @@ fastcall static void blt_put_composite_box(struct sna *sna,
|
|||
box, 1);
|
||||
assert(ok);
|
||||
}
|
||||
|
||||
dst_priv->gtt_dirty = true;
|
||||
}
|
||||
|
||||
static void blt_put_composite_boxes(struct sna *sna,
|
||||
|
|
@ -1792,6 +1796,8 @@ static void blt_put_composite_boxes(struct sna *sna,
|
|||
box, n);
|
||||
assert(ok);
|
||||
}
|
||||
|
||||
dst_priv->gtt_dirty = true;
|
||||
}
|
||||
|
||||
fastcall static void
|
||||
|
|
@ -1837,6 +1843,8 @@ blt_put_composite_with_alpha(struct sna *sna,
|
|||
&box, 1,
|
||||
0xffffffff, op->u.blt.pixel);
|
||||
}
|
||||
|
||||
dst_priv->gtt_dirty = true;
|
||||
}
|
||||
|
||||
fastcall static void
|
||||
|
|
@ -1874,6 +1882,8 @@ blt_put_composite_box_with_alpha(struct sna *sna,
|
|||
box, 1,
|
||||
0xffffffff, op->u.blt.pixel);
|
||||
}
|
||||
|
||||
dst_priv->gtt_dirty = true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -1912,6 +1922,8 @@ blt_put_composite_boxes_with_alpha(struct sna *sna,
|
|||
box, n,
|
||||
0xffffffff, op->u.blt.pixel);
|
||||
}
|
||||
|
||||
dst_priv->gtt_dirty = true;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
|||
Loading…
Reference in New Issue