summaryrefslogtreecommitdiff
path: root/src/sna/gen4_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-01-20 14:58:42 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-01-20 15:00:50 +0000
commit650c9d5ce80afc1d4c8d9f77f6679f085fa4dc9d (patch)
tree895513081af928aed1971aa8531129fd59c5bb43 /src/sna/gen4_render.c
parent492952e0d6362a046a666956afdf8f9bc0f2b7e7 (diff)
sna/gen3+: Reset vertex relocation state after discarding the batch
Fixes a regression from commit a6ecb6d31d8c543f38fca0be6b0ec82e59dcd8d2 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Jan 16 09:14:40 2013 +0000 sna: Discard the batch if we are discarding the only buffer in it as we may keep a stale relocation for the vertex buffer alive if we attempt to clear the bo using the render engine before discarding it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen4_render.c')
-rw-r--r--src/sna/gen4_render.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index a27d3e4a..e1f45281 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -2789,6 +2789,10 @@ static void gen4_render_reset(struct sna *sna)
DBG(("%s: discarding unmappable vbo\n", __FUNCTION__));
discard_vbo(sna);
}
+
+ sna->render.vertex_offset = 0;
+ sna->render.nvertex_reloc = 0;
+ sna->render.vb_id = 0;
}
static void gen4_render_fini(struct sna *sna)