summaryrefslogtreecommitdiff
path: root/src/sna/sna_tiling.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-31 10:51:02 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-31 11:21:42 +0000
commit0a748fc49d60dc2bc9494f95c4934592b111831a (patch)
treee6ae3a636cbc41c1fc64eaa73ed112deb30f5cde /src/sna/sna_tiling.c
parent9c1f8a768ca1f762c722f63bab2747e4ff1fd773 (diff)
sna: Split the tiling limits between upload and copying
The kernel has a bug that prevents pwriting buffers large than the aperture. Whilst waiting for the fix, limit the upload where possible to fit within that constraint. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_tiling.c')
-rw-r--r--src/sna/sna_tiling.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/sna_tiling.c b/src/sna/sna_tiling.c
index a3bf19d9..702192a2 100644
--- a/src/sna/sna_tiling.c
+++ b/src/sna/sna_tiling.c
@@ -144,7 +144,7 @@ sna_tiling_composite_done(struct sna *sna,
step = sna->render.max_3d_size;
if (tile->dst_x & (8*512 / tile->dst->pDrawable->bitsPerPixel - 1))
step /= 2;
- while (step * step * 4 > sna->kgem.max_tile_size)
+ while (step * step * 4 > sna->kgem.max_copy_tile_size)
step /= 2;
DBG(("%s -- %dx%d, count=%d, step size=%d\n", __FUNCTION__,
@@ -331,7 +331,7 @@ sna_tiling_fill_boxes(struct sna *sna,
pixman_region_init_rects(&region, box, n);
step = sna->render.max_3d_size;
- while (step * step * 4 > sna->kgem.max_tile_size)
+ while (step * step * 4 > sna->kgem.max_copy_tile_size)
step /= 2;
DBG(("%s (op=%d, format=%x, color=(%04x,%04x,%04x, %04x), tile.size=%d, box=%dx[(%d, %d), (%d, %d)])\n",
@@ -444,7 +444,7 @@ Bool sna_tiling_copy_boxes(struct sna *sna, uint8_t alu,
pixman_region_init_rects(&region, box, nbox);
step = sna->render.max_3d_size;
- while (step * step * 4 > sna->kgem.max_tile_size)
+ while (step * step * 4 > sna->kgem.max_copy_tile_size)
step /= 2;
DBG(("%s (alu=%d), tile.size=%d, box=%dx[(%d, %d), (%d, %d)])\n",