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 86f99379ee (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>
This commit is contained in:
Chris Wilson 2011-11-21 10:58:17 +00:00
parent 3b9479dc39
commit a5353a7c1d
1 changed files with 1 additions and 17 deletions

View File

@ -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);