From 294180b3bf78f2c0ae2f1197e1c0819d99009356 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 24 Jan 2014 14:21:44 +0000 Subject: sna/gen3+: Allow for spill when aligning vertices We need to flush the batch if we run out of space aligning our vertex buffer - but the test must anticipate the space required for the new alignment. Reported-by: Arkadiusz Miskiewicz Signed-off-by: Chris Wilson --- src/sna/gen3_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sna/gen3_render.c') diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index 941b633f..5601f4c5 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -3137,7 +3137,7 @@ gen3_align_vertex(struct sna *sna, if ((int)sna->render.vertex_size - vertex_index * op->floats_per_vertex < 2*op->floats_per_rect) { DBG(("%s: flushing vertex buffer: new index=%d, max=%d\n", __FUNCTION__, vertex_index, sna->render.vertex_size / op->floats_per_vertex)); - if (gen3_vertex_finish(sna) < op->floats_per_vertex) + if (gen3_vertex_finish(sna) < 2*op->floats_per_vertex) kgem_submit(&sna->kgem); vertex_index = (sna->render.vertex_used + op->floats_per_vertex - 1) / op->floats_per_vertex; -- cgit v1.2.3