summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-21 10:58:17 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-21 10:58:17 +0000
commita5353a7c1d1f02b887f61f543c8e4bd4e8bd104f (patch)
tree54ebae82089981ba84a2595e9d4f76df8f3b15be
parent3b9479dc39d32fd97f80c1e5e0fac67d36ee5e40 (diff)
sna/gen4: Use the special composite rect emission for fill_one()
In order to workaround a bug in the shaders on gen4, we need to flush the pipeline after every rectangle. The recently introduced fill-one mechanism for gen4, missed this vital step triggering a random hang with an otherwise sane batchbuffer (the missing flush is hard to spot!). Fixes regression from 86f99379ee5 (sna/gen4: Add fill-one). Reported-by: Albert Damen <albrt@gmx.net> Reported-by: Fryderyk Dziarmagowski <fdziarmagowski@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43083 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen4_render.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index c0a32a40..dbb7c43e 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -2662,23 +2662,7 @@ gen4_render_fill_one(struct sna *sna, PixmapPtr dst, struct kgem_bo *bo,
gen4_fill_bind_surfaces(sna, &tmp);
gen4_align_vertex(sna, &tmp);
- if (!gen4_get_rectangles(sna, &tmp, 1)) {
- gen4_fill_bind_surfaces(sna, &tmp);
- gen4_get_rectangles(sna, &tmp, 1);
- }
-
- DBG((" (%d, %d), (%d, %d)\n", x1, y1, x2, y2));
- OUT_VERTEX(x2, y2);
- OUT_VERTEX_F(1);
- OUT_VERTEX_F(1);
-
- OUT_VERTEX(x1, y2);
- OUT_VERTEX_F(0);
- OUT_VERTEX_F(1);
-
- OUT_VERTEX(x1, y1);
- OUT_VERTEX_F(0);
- OUT_VERTEX_F(0);
+ gen4_render_fill_rectangle(sna, &tmp, x1, y1, x2 - x1, y2 - y1);
gen4_vertex_flush(sna);
kgem_bo_destroy(&sna->kgem, tmp.src.bo);