aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glamor/glamor_setspans.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glamor/glamor_setspans.c')
-rw-r--r--xorg-server/glamor/glamor_setspans.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/xorg-server/glamor/glamor_setspans.c b/xorg-server/glamor/glamor_setspans.c
index 22fe88ce5..a51e4c5be 100644
--- a/xorg-server/glamor/glamor_setspans.c
+++ b/xorg-server/glamor/glamor_setspans.c
@@ -48,7 +48,11 @@ _glamor_set_spans(DrawablePtr drawable, GCPtr gc, char *src,
goto fail;
}
- /* XXX Shall we set alu here? */
+ if (gc->alu != GXcopy) {
+ glamor_fallback("SetSpans with non-copy ALU.\n");
+ goto fail;
+ }
+
if (!glamor_set_planemask(dest_pixmap, gc->planemask))
goto fail;
@@ -86,10 +90,12 @@ _glamor_set_spans(DrawablePtr drawable, GCPtr gc, char *src,
glamor_fallback("to %p (%c)\n",
drawable, glamor_get_drawable_location(drawable));
- if (glamor_prepare_access(drawable, GLAMOR_ACCESS_RW)) {
+ if (glamor_prepare_access(drawable, GLAMOR_ACCESS_RW) &&
+ glamor_prepare_access_gc(gc)) {
fbSetSpans(drawable, gc, src, points, widths, numPoints, sorted);
- glamor_finish_access(drawable, GLAMOR_ACCESS_RW);
}
+ glamor_finish_access_gc(gc);
+ glamor_finish_access(drawable);
ret = TRUE;
done: