summaryrefslogtreecommitdiff
path: root/src/sna/gen4_vertex.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-01-24 14:21:44 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-01-24 14:21:44 +0000
commit294180b3bf78f2c0ae2f1197e1c0819d99009356 (patch)
tree6351002fb067f2ce08243df75692ecd1d3c3c9b4 /src/sna/gen4_vertex.c
parent4385724dc49dd090e0a5956e287f80b92ebd70e8 (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/gen4_vertex.c')
-rw-r--r--src/sna/gen4_vertex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/gen4_vertex.c b/src/sna/gen4_vertex.c
index 38f4cf3b..4b3496cc 100644
--- a/src/sna/gen4_vertex.c
+++ b/src/sna/gen4_vertex.c
@@ -48,7 +48,7 @@ void gen4_vertex_align(struct sna *sna, const struct sna_composite_op *op)
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 (gen4_vertex_finish(sna) < op->floats_per_rect) {
+ if (gen4_vertex_finish(sna) < 2*op->floats_per_rect) {
kgem_submit(&sna->kgem);
_kgem_set_mode(&sna->kgem, KGEM_RENDER);
}