diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-24 14:21:44 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-24 14:21:44 +0000 |
commit | 294180b3bf78f2c0ae2f1197e1c0819d99009356 (patch) | |
tree | 6351002fb067f2ce08243df75692ecd1d3c3c9b4 /src/sna/gen3_render.c | |
parent | 4385724dc49dd090e0a5956e287f80b92ebd70e8 (diff) |
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen3_render.c')
-rw-r--r-- | src/sna/gen3_render.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |