diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-20 16:59:58 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-20 17:01:24 +0000 |
commit | e6a64f872bfd026aa1ba1bd44b1298918c819849 (patch) | |
tree | 74024087abc09e46c9f04050ea8ccc2becc87a06 /src/sna | |
parent | 5de919336fc1ba1c4116e18ba0560cdb7b0589f0 (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')
-rw-r--r-- | src/sna/gen3_render.c | 11 | ||||
-rw-r--r-- | src/sna/gen4_vertex.c | 1 |
2 files changed, 6 insertions, 6 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; diff --git a/src/sna/gen4_vertex.c b/src/sna/gen4_vertex.c index d34d0d8c..4e404670 100644 --- a/src/sna/gen4_vertex.c +++ b/src/sna/gen4_vertex.c @@ -57,7 +57,6 @@ int gen4_vertex_finish(struct sna *sna) sna->render.vertex_used, sna->render.vertex_size)); assert(sna->render.vertex_offset == 0); assert(sna->render.vertex_used); - assert(sna->render.nvertex_reloc); /* Note: we only need dword alignment (currently) */ |