diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-03 20:06:43 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-04 15:19:37 +0000 |
commit | 2653524dffc1fe0dbff7d74bfc9be535d9ececb1 (patch) | |
tree | eb27777dc0e6353d45ce98e7f75f1337e50c1523 /src/sna/sna_tiling.c | |
parent | 93a0b10f163ee79b6a6a7ea46b0a33b622b1f86e (diff) |
sna: Reduce the downsample tile size to accommodate alignment
If we need to enlarge the sampled tile due to tiling alignments, the
resulting sample can become larger than we can accommodate through the 3D
pipeline, resulting in FAIL.
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.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/sna/sna_tiling.c b/src/sna/sna_tiling.c index 00e111ce..c6e898b1 100644 --- a/src/sna/sna_tiling.c +++ b/src/sna/sna_tiling.c @@ -142,7 +142,8 @@ sna_tiling_composite_done(struct sna *sna, /* Use a small step to accommodate enlargement through tile alignment */ step = sna->render.max_3d_size; - if (tile->dst_x & (8*512 / tile->dst->pDrawable->bitsPerPixel - 1)) + if (tile->dst_x & (8*512 / tile->dst->pDrawable->bitsPerPixel - 1) || + tile->dst_y & 63) step /= 2; while (step * step * 4 > sna->kgem.max_copy_tile_size) step /= 2; @@ -330,7 +331,11 @@ sna_tiling_fill_boxes(struct sna *sna, pixman_region_init_rects(®ion, box, n); + /* Use a small step to accommodate enlargement through tile alignment */ step = sna->render.max_3d_size; + if (region.extents.x1 & (8*512 / dst->drawable.bitsPerPixel - 1) || + region.extents.y1 & 63) + step /= 2; while (step * step * 4 > sna->kgem.max_copy_tile_size) step /= 2; @@ -443,7 +448,10 @@ Bool sna_tiling_blt_copy_boxes(struct sna *sna, uint8_t alu, pixman_region_init_rects(®ion, box, nbox); + /* Use a small step to accommodate enlargement through tile alignment */ step = sna->render.max_3d_size; + if (region.extents.x1 & (8*512 / bpp - 1) || region.extents.y1 & 63) + step /= 2; while (step * step * 4 > sna->kgem.max_copy_tile_size) step /= 2; |