diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-08-19 20:27:29 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-08-19 20:27:29 +0100 |
commit | 3d0cd2dfcac7b855d60c86070a874c6d950466a6 (patch) | |
tree | f9a4822a2dfb2d16ac2143d63a48b85af3b4ae69 /src | |
parent | 819971e7a62e695fe4b75af80557b783c8caafd3 (diff) |
sna/dri2: Extend the active buffer tracking to TearFree
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_dri2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index f1d7a6e2..2b4075b0 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -535,13 +535,18 @@ sna_dri2_pixmap_update_bo(struct sna *sna, PixmapPtr pixmap, struct kgem_bo *bo) if (private->bo == bo) return; + assert(private->bo->active_scanout > 0); + private->bo->active_scanout--; + DBG(("%s: dropping flush hint from handle=%d\n", __FUNCTION__, private->bo->handle)); private->bo->flush = false; kgem_bo_destroy(&sna->kgem, private->bo); + buffer->name = kgem_bo_flink(&sna->kgem, bo); buffer->pitch = bo->pitch; private->bo = ref(bo); + bo->active_scanout++; DBG(("%s: adding flush hint to handle=%d\n", __FUNCTION__, bo->handle)); bo->flush = true; |