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/gen5_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/gen5_render.c')
-rw-r--r-- | src/sna/gen5_render.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index 59ce2be6..1e904138 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -2371,8 +2371,13 @@ fallback_blt: if (!kgem_check_bo(&sna->kgem, dst_bo, src_bo, NULL)) { DBG(("%s: aperture check failed\n", __FUNCTION__)); 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; } } @@ -2421,9 +2426,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, |