summaryrefslogtreecommitdiff
path: root/src/sna/gen6_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-19 12:00:08 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-19 12:00:08 +0000
commit31f559820dbde1a028a76b9eeaeb1848aec3cc2b (patch)
tree5813b4328d6c97f238e94bbd9552c39e54bd0fec /src/sna/gen6_render.c
parentbb3ea102ca6b8aa843a10607fa140f5694cc4898 (diff)
sna/gen4+: Clear redirect bo before falling back to BLT paths
Just in case we later try to take action on the already freed redirection. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen6_render.c')
-rw-r--r--src/sna/gen6_render.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index a2b4082c..f03b893e 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -2785,8 +2785,11 @@ fallback_blt:
__FUNCTION__));
if (tmp.src.bo != src_bo)
kgem_bo_destroy(&sna->kgem, tmp.src.bo);
- if (tmp.redirect.real_bo)
+ tmp.src.bo = NULL;
+ if (tmp.redirect.real_bo) {
kgem_bo_destroy(&sna->kgem, tmp.dst.bo);
+ tmp.redirect.real_bo = NULL;
+ }
goto fallback_blt;
}
_kgem_set_mode(&sna->kgem, KGEM_RENDER);
@@ -2831,9 +2834,12 @@ fallback_blt:
return true;
fallback_tiled_dst:
- if (tmp.redirect.real_bo)
+ if (tmp.redirect.real_bo) {
kgem_bo_destroy(&sna->kgem, tmp.dst.bo);
+ tmp.redirect.real_bo = NULL;
+ }
fallback_tiled:
+ assert(tmp.src.bo == NULL);
if (sna_blt_compare_depth(&src->drawable, &dst->drawable) &&
sna_blt_copy_boxes(sna, alu,
src_bo, src_dx, src_dy,