diff options
-rw-r--r-- | src/sna/gen2_render.c | 3 | ||||
-rw-r--r-- | src/sna/gen3_render.c | 3 | ||||
-rw-r--r-- | src/sna/gen4_render.c | 3 | ||||
-rw-r--r-- | src/sna/gen5_render.c | 3 | ||||
-rw-r--r-- | src/sna/gen6_render.c | 3 | ||||
-rw-r--r-- | src/sna/gen7_render.c | 3 | ||||
-rw-r--r-- | src/sna/sna_render.c | 17 |
7 files changed, 19 insertions, 16 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c index 3db9ce73..ed48ce6d 100644 --- a/src/sna/gen2_render.c +++ b/src/sna/gen2_render.c @@ -2890,7 +2890,8 @@ fallback: extents.y2 = box[i].y2; } if (!sna_render_composite_redirect(sna, &tmp, - extents.x1, extents.y1, + extents.x1 + dst_dx, + extents.y1 + dst_dy, extents.x2 - extents.x1, extents.y2 - extents.y1)) goto fallback_tiled; diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index 0f0345c4..fc006ac4 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -3879,7 +3879,8 @@ fallback_blt: extents.y2 = box[i].y2; } if (!sna_render_composite_redirect(sna, &tmp, - extents.x1, extents.y1, + extents.x1 + dst_dx, + extents.y1 + dst_dy, extents.x2 - extents.x1, extents.y2 - extents.y1)) goto fallback_tiled; diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index 459b428f..700a271b 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -2485,7 +2485,8 @@ fallback_blt: extents.y2 = box[i].y2; } if (!sna_render_composite_redirect(sna, &tmp, - extents.x1, extents.y1, + extents.x1 + dst_dx, + extents.y1 + dst_dy, extents.x2 - extents.x1, extents.y2 - extents.y1)) goto fallback_tiled; diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index 7246ed68..b9c7a92a 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -2801,7 +2801,8 @@ fallback_blt: } if (!sna_render_composite_redirect(sna, &tmp, - extents.x1, extents.y1, + extents.x1 + dst_dx, + extents.y1 + dst_dy, extents.x2 - extents.x1, extents.y2 - extents.y1)) goto fallback_tiled; diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 59372f86..213b80bf 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -3278,7 +3278,8 @@ fallback_blt: extents.y2 = box[i].y2; } if (!sna_render_composite_redirect(sna, &tmp, - extents.x1, extents.y1, + extents.x1 + dst_dx, + extents.y1 + dst_dy, extents.x2 - extents.x1, extents.y2 - extents.y1)) goto fallback_tiled; diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 8a5d95cf..731d952b 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -3262,7 +3262,8 @@ fallback_blt: extents.y2 = box[i].y2; } if (!sna_render_composite_redirect(sna, &tmp, - extents.x1, extents.y1, + extents.x1 + dst_dx, + extents.y1 + dst_dy, extents.x2 - extents.x1, extents.y2 - extents.y1)) goto fallback_tiled; diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c index 1625b91b..676f5c73 100644 --- a/src/sna/sna_render.c +++ b/src/sna/sna_render.c @@ -836,10 +836,6 @@ sna_render_pixmap_partial(struct sna *sna, box.x1 = 0; if (box.y1 < 0) box.y1 = 0; - if (box.x2 > pixmap->drawable.width) - box.x2 = pixmap->drawable.width; - if (box.y2 > pixmap->drawable.height) - box.y2 = pixmap->drawable.height; DBG(("%s: unaligned box (%d, %d), (%d, %d)\n", __FUNCTION__, box.x1, box.y1, box.x2, box.y2)); @@ -854,19 +850,20 @@ sna_render_pixmap_partial(struct sna *sna, /* Ensure we align to an even tile row */ box.y1 = box.y1 & ~(2*tile_height - 1); box.y2 = ALIGN(box.y2, 2*tile_height); - if (box.y2 > pixmap->drawable.height) - box.y2 = pixmap->drawable.height; assert(tile_width * 8 >= pixmap->drawable.bitsPerPixel); box.x1 = box.x1 & ~(tile_width * 8 / pixmap->drawable.bitsPerPixel - 1); box.x2 = ALIGN(box.x2, tile_width * 8 / pixmap->drawable.bitsPerPixel); - if (box.x2 > pixmap->drawable.width) - box.x2 = pixmap->drawable.width; offset = box.x1 * pixmap->drawable.bitsPerPixel / 8 / tile_width * tile_size; } else offset = box.x1 * pixmap->drawable.bitsPerPixel / 8; + if (box.x2 > pixmap->drawable.width) + box.x2 = pixmap->drawable.width; + if (box.y2 > pixmap->drawable.height) + box.y2 = pixmap->drawable.height; + w = box.x2 - box.x1; h = box.y2 - box.y1; DBG(("%s box=(%d, %d), (%d, %d): (%d, %d)/(%d, %d)\n", __FUNCTION__, @@ -889,8 +886,8 @@ sna_render_pixmap_partial(struct sna *sna, channel->bo->pitch = bo->pitch; - channel->offset[0] = x - box.x1; - channel->offset[1] = y - box.y1; + channel->offset[0] = -box.x1; + channel->offset[1] = -box.y1; channel->scale[0] = 1.f/w; channel->scale[1] = 1.f/h; channel->width = w; |