diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-11-02 21:13:45 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-11-02 21:39:13 +0000 |
commit | add663919eb6aca1f5bbb39549d56f481ea0f273 (patch) | |
tree | 35317a19a8b17684f094e4f0449071d1fc4c28cf /src/sna/gen6_render.c | |
parent | d41f847c75c3bce85fda6e7508995b45679944e8 (diff) |
sna: Eliminate the redundancy between is_mappable/can_map
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen6_render.c')
-rw-r--r-- | src/sna/gen6_render.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 9797ef94..8c570007 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -3483,8 +3483,10 @@ static void gen6_render_reset(struct sna *sna) sna->render_state.gen6.drawrect_limit = -1; sna->render_state.gen6.surface_table = -1; - assert(sna->render.vbo == NULL || - kgem_bo_is_mappable(&sna->kgem, sna->render.vbo)); + if (sna->render.vbo && !kgem_bo_can_map(&sna->kgem, sna->render.vbo)) { + DBG(("%s: discarding unmappable vbo\n", __FUNCTION__)); + discard_vbo(sna); + } sna->render.vertex_offset = 0; sna->render.nvertex_reloc = 0; |