summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-01-21 22:40:11 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-01-21 22:40:11 +0000
commit29e11e2e6f80f6485ed69ea72e09e8d9b31fd8e8 (patch)
treee7401c08b8dd76d1c2376252c70d63adaaef6bcf
parent2c441079cbd52902d356b652659e2be84726940e (diff)
sna: Restore gc->serialNumber correctly after falling back
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73856 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 4a2b6141..b1744ae2 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4021,7 +4021,8 @@ static bool must_check sna_gc_move_to_cpu(GCPtr gc,
} else
changes &= ~GCClipMask;
- if (changes || drawable->serialNumber != sgc->serial) {
+ if (changes || drawable->serialNumber != (sgc->serial & DRAWABLE_SERIAL_BITS)) {
+ long tmp = gc->serialNumber;
gc->serialNumber = sgc->serial;
if (fb_gc(gc)->bpp != drawable->bitsPerPixel) {
@@ -4042,8 +4043,7 @@ static bool must_check sna_gc_move_to_cpu(GCPtr gc,
}
fbValidateGC(gc, changes, drawable);
-
- sgc->serial = drawable->serialNumber;
+ gc->serialNumber = tmp;
}
sgc->changes = 0;
@@ -15733,6 +15733,7 @@ sna_validate_gc(GCPtr gc, unsigned long changes, DrawablePtr drawable)
assert(RegionNil(gc->pCompositeClip) || gc->pCompositeClip->extents.y2 - drawable->y <= drawable->height);
sna_gc(gc)->changes |= changes;
+ sna_gc(gc)->serial = gc->serialNumber;
}
static const GCFuncs sna_gc_funcs = {