diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-25 19:52:13 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-25 19:55:49 +0100 |
commit | 786a770f528a0daee2971494352672cb89f48384 (patch) | |
tree | 32a6cdff0c7d7ff968cd124d4ffeafc0dc92b1d5 | |
parent | bd98001a49be061f0f2cb008b515f5505c8a63a4 (diff) |
sna/video: Flush the video state at the end of the operation
Or in the case where a second command is received prior to the batch
being flushed, the vertex data is not flushed and leads to the a
miscompution of the number of vertices emitted.
Reported-by: Elias Probst <mail@eliasprobst.eu>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40332
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/gen4_render.c | 2 | ||||
-rw-r--r-- | src/sna/gen5_render.c | 2 | ||||
-rw-r--r-- | src/sna/gen6_render.c | 3 | ||||
-rw-r--r-- | src/sna/gen7_render.c | 2 |
4 files changed, 9 insertions, 0 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index 75555332..bddc681b 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -1701,6 +1701,8 @@ gen4_render_video(struct sna *sna, box++; } + gen4_vertex_flush(sna); + _kgem_set_mode(&sna->kgem, KGEM_RENDER); return TRUE; } diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index b282666b..c7668b9f 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -1711,6 +1711,8 @@ gen5_render_video(struct sna *sna, box++; } + gen5_vertex_flush(sna); + _kgem_set_mode(&sna->kgem, KGEM_RENDER); return TRUE; } diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 7b22ea20..5641b3ca 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -1596,6 +1596,7 @@ static void gen6_emit_composite_state(struct sna *sna, static void gen6_align_vertex(struct sna *sna, const struct sna_composite_op *op) { + assert (sna->render_state.gen6.vertex_offset == 0); if (op->floats_per_vertex != sna->render_state.gen6.floats_per_vertex) { DBG(("aligning vertex: was %d, now %d floats per vertex, %d->%d\n", sna->render_state.gen6.floats_per_vertex, @@ -1900,6 +1901,8 @@ gen6_render_video(struct sna *sna, box++; } + gen6_vertex_flush(sna); + _kgem_set_mode(&sna->kgem, KGEM_RENDER); return TRUE; } diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 502590e6..379ff56f 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2033,6 +2033,8 @@ gen7_render_video(struct sna *sna, box++; } + gen7_vertex_flush(sna); + _kgem_set_mode(&sna->kgem, KGEM_RENDER); return TRUE; } |