sna/gen2,3: Unmap the old GPU bo when replacing due to render target constaints

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-12-03 12:10:23 +00:00
parent 3dbf17f00e
commit 0420adfb9d
2 changed files with 2 additions and 0 deletions

View File

@ -1609,6 +1609,7 @@ gen2_composite_set_target(struct sna *sna,
if (bo == NULL)
return false;
sna_pixmap_unmap(op->dst.pixmap, priv);
kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
priv->gpu_bo = bo;

View File

@ -3197,6 +3197,7 @@ gen3_composite_set_target(struct sna *sna,
if (bo == NULL)
return false;
sna_pixmap_unmap(op->dst.pixmap, priv);
kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
priv->gpu_bo = bo;
}