summaryrefslogtreecommitdiff
path: root/src/sna/gen3_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-01-20 16:59:58 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-01-20 17:01:24 +0000
commite6a64f872bfd026aa1ba1bd44b1298918c819849 (patch)
tree74024087abc09e46c9f04050ea8ccc2becc87a06 /src/sna/gen3_render.c
parent5de919336fc1ba1c4116e18ba0560cdb7b0589f0 (diff)
sna/gen3+: Remove bogus assertion that the vbo in included before finish
If we are carrying over a nearly full vbo from one batch to the next, we may indeed finish it prior to writing any new primitives and so the assert is truly bogus. 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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index 3a06fed5..01c0aeef 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -1617,18 +1617,19 @@ static int gen3_vertex_finish(struct sna *sna)
assert(sna->render.vertex_offset == 0);
assert(sna->render.vertex_used);
assert(sna->render.vertex_used <= sna->render.vertex_size);
- assert(sna->render.vertex_reloc[0]);
bo = sna->render.vbo;
if (bo) {
DBG(("%s: reloc = %d\n", __FUNCTION__,
sna->render.vertex_reloc[0]));
- sna->kgem.batch[sna->render.vertex_reloc[0]] =
- kgem_add_reloc(&sna->kgem, sna->render.vertex_reloc[0],
- bo, I915_GEM_DOMAIN_VERTEX << 16, 0);
+ if (sna->render.vertex_reloc[0]) {
+ sna->kgem.batch[sna->render.vertex_reloc[0]] =
+ kgem_add_reloc(&sna->kgem, sna->render.vertex_reloc[0],
+ bo, I915_GEM_DOMAIN_VERTEX << 16, 0);
- sna->render.vertex_reloc[0] = 0;
+ sna->render.vertex_reloc[0] = 0;
+ }
sna->render.vertex_used = 0;
sna->render.vertex_index = 0;
sna->render.vbo = NULL;