sna: Reuse the cached upload as a source GPU bo

References: https://bugs.freedesktop.org/show_bug.cgi?id=42426
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-03-13 22:00:25 +00:00
parent 0acec16853
commit d23ee0380b
1 changed files with 5 additions and 0 deletions

View File

@ -2236,6 +2236,11 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags)
if (priv->cpu_damage == NULL)
goto done;
if (priv->gpu_bo->proxy) {
assert((flags & MOVE_WRITE) ==0);
goto done;
}
if (priv->mapped) {
assert(priv->stride);
pixmap->devPrivate.ptr = priv->ptr;