summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-12-03 12:10:23 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-12-03 12:10:23 +0000
commit0420adfb9d92b691aabef4e0ccba3782417b4bf0 (patch)
tree3df7436470f50e628a04b6f613015af876145bc1 /src
parent3dbf17f00e200e864818b0b8ca762183cff9085f (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/sna/gen2_render.c1
-rw-r--r--src/sna/gen3_render.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index 3e907406..b539a815 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -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;
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index e841396a..b3ee5673 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -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;
}