summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_render.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 71330c1f..af072f02 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -1977,6 +1977,14 @@ sna_render_composite_redirect(struct sna *sna,
box.x1 = box.x1 & ~(tile_width * 8 / op->dst.pixmap->drawable.bitsPerPixel - 1);
box.x2 = ALIGN(box.x2, tile_width * 8 / op->dst.pixmap->drawable.bitsPerPixel);
+ if (box.x1 > sna->render.max_3d_size &&
+ box.x2 <= 2*sna->render.max_3d_size)
+ box.x1 = sna->render.max_3d_size;
+
+ if (box.y1 > sna->render.max_3d_size &&
+ box.y2 <= 2*sna->render.max_3d_size)
+ box.y1 = sna->render.max_3d_size;
+
offset = box.x1 * op->dst.pixmap->drawable.bitsPerPixel / 8 / tile_width * tile_size;
} else {
if (sna->kgem.gen < 040) {
@@ -1993,6 +2001,14 @@ sna_render_composite_redirect(struct sna *sna,
box.x2 = ALIGN(box.x2, 2);
}
+ if (box.x1 > sna->render.max_3d_size &&
+ box.x2 <= 2*sna->render.max_3d_size)
+ box.x1 = sna->render.max_3d_size;
+
+ if (box.y1 > sna->render.max_3d_size &&
+ box.y2 <= 2*sna->render.max_3d_size)
+ box.y1 = sna->render.max_3d_size;
+
offset = box.x1 * op->dst.pixmap->drawable.bitsPerPixel / 8;
}