summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sna/kgem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 8d2295af..701c2c20 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -602,7 +602,7 @@ static void __kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo)
if(!bo->reusable)
goto destroy;
- if (bo->purgeable && !bo->rq) {
+ if (bo->purgeable && !bo->rq && !bo->needs_flush) {
assert(!bo->purged);
if (!gem_madvise(kgem->fd, bo->handle, I915_MADV_DONTNEED)) {