diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-12 08:15:13 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-12 08:18:04 +0000 |
commit | d111c464bfbae57bb7141872810c88b88f30c087 (patch) | |
tree | f3fb5b2dacaf7ba6e444ae88910e3bcf3c112eac /src/sna/gen4_render.c | |
parent | ec77a07b41f1062b941774f3782b51d21e7824dd (diff) |
sna: After a size check, double check the batch before flushing
As we may fail the size check with an empty batch and a pair of large
bo, we need to check before submitting that batch in order to not run
afoul of our internal sanity checks.
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 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index c3e452d7..6b3f864e 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -2704,8 +2704,11 @@ gen4_render_fill_one(struct sna *sna, PixmapPtr dst, struct kgem_bo *bo, tmp.u.gen4.sf = 0; if (!kgem_check_bo(&sna->kgem, bo, NULL)) { - _kgem_submit(&sna->kgem); - assert(kgem_check_bo(&sna->kgem, bo, NULL)); + kgem_submit(&sna->kgem); + if (!kgem_check_bo(&sna->kgem, bo, NULL)) { + kgem_bo_destroy(&sna->kgem, tmp.src.bo); + return false; + } } gen4_bind_surfaces(sna, &tmp); |