diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-11-19 12:00:08 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-11-19 12:00:08 +0000 |
commit | 31f559820dbde1a028a76b9eeaeb1848aec3cc2b (patch) | |
tree | 5813b4328d6c97f238e94bbd9552c39e54bd0fec /src/sna/gen4_render.c | |
parent | bb3ea102ca6b8aa843a10607fa140f5694cc4898 (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/gen4_render.c')
-rw-r--r-- | src/sna/gen4_render.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index b1224087..c6a1e6d2 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -2411,8 +2411,13 @@ fallback_blt: kgem_submit(&sna->kgem); if (!kgem_check_bo(&sna->kgem, dst_bo, src_bo, NULL)) { 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; } } @@ -2441,9 +2446,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, |