summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-07-25 15:41:29 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-07-25 15:41:29 +0100
commit954d9c6aca792098cb16a46b4ec8d5fc104b15a9 (patch)
tree95d0d52a7cc47b20ed6164778176cc358928a6ab
parent484b072072c8297a87940c9e32097923f0a77c8f (diff)
sna: Initialise single-shot tile offsets before use
As noted by the compiler amidst all the noise. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 94dcabf0..66d3e93b 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -9466,6 +9466,13 @@ sna_poly_fill_rect_tiled_8x8_blt(DrawablePtr drawable,
sna_damage_add_rectangles(damage, r, n, dx, dy);
if (n == 1) {
+ tx = (r->x - origin->x) % 8;
+ if (tx < 8)
+ tx = 8 - tx;
+ ty = (r->y - origin->y) % 8;
+ if (ty < 8)
+ ty = 8 - ty;
+
b = sna->kgem.batch + sna->kgem.nbatch;
b[0] = XY_PAT_BLT | tx << 12 | ty << 8 | 3 << 20 | (br00 & BLT_DST_TILED);
b[1] = br13;