summaryrefslogtreecommitdiff
path: root/src/i830_uxa.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-11 14:52:54 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2010-05-17 20:21:30 +0100
commit9249ec0ecb937785f2e5e5b2b5296189c96707ac (patch)
tree3cf60fb238ceae7c53e8915f49257db2a94b4257 /src/i830_uxa.c
parent639728c14b2bf58032a2710cf0fb214204b83e27 (diff)
i830: Do not cache in-flight non-reusable buffers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit ad8af95dd35921118f45d6cff355c80cf0906ff0) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'src/i830_uxa.c')
-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 db8a5048..6e2e7b52 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -537,8 +537,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);