summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-11 14:52:54 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-11 15:00:59 +0100
commitad8af95dd35921118f45d6cff355c80cf0906ff0 (patch)
tree3abf9df67dbd18e0cbc41781614aa37333094a1a /src
parentf1048e14d5ef34970cb717e2a37d1c6bb4ea3a34 (diff)
i830: Do not cache in-flight non-reusable buffers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/i830_uxa.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index e96f0a9e..544eb391 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -556,8 +556,15 @@ void i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo * bo)
priv = i830_get_pixmap_intel(pixmap);
+ if (priv == NULL && bo == NULL)
+ return;
+
if (priv != NULL) {
- if (list_is_empty(&priv->batch)) {
+ if (priv->bo == bo)
+ return;
+
+ if (list_is_empty(&priv->batch) ||
+ !drm_intel_bo_is_reusable(priv->bo)) {
dri_bo_unreference(priv->bo);
} else {
list_add(&priv->in_flight, &intel->in_flight);