diff options
author | Timothy Arceri <[email protected]> | 2017-03-30 21:14:43 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-31 11:54:37 +1100 |
commit | 2e70de7d2f703cf81cbe114a99f6328045143c26 (patch) | |
tree | 1e452a2a01cfa7e89feeb8b9401a336ea8eebcb1 | |
parent | 3ef1ff6270e56308d8d58114b1c6fe4103b6a177 (diff) |
mesa/vbo: remove redundant _mesa_is_bufferobj() calls
This is already called inside the vbo_exec_vtx_{unmap,map}()
functions.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r-- | src/mesa/vbo/vbo_exec_draw.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index c2fcb663cbe..df34f059b30 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -426,9 +426,7 @@ vbo_exec_vtx_flush(struct vbo_exec_context *exec, GLboolean keepUnmapped) if (ctx->NewState) _mesa_update_state( ctx ); - if (_mesa_is_bufferobj(exec->vtx.bufferobj)) { - vbo_exec_vtx_unmap( exec ); - } + vbo_exec_vtx_unmap(exec); if (0) printf("%s %d %d\n", __func__, exec->vtx.prim_count, @@ -443,19 +441,15 @@ vbo_exec_vtx_flush(struct vbo_exec_context *exec, GLboolean keepUnmapped) exec->vtx.vert_count - 1, NULL, 0, NULL); - /* If using a real VBO, get new storage -- unless asked not to. - */ - if (_mesa_is_bufferobj(exec->vtx.bufferobj) && !keepUnmapped) { + /* Get new storage -- unless asked not to. */ + if (!keepUnmapped) vbo_exec_vtx_map( exec ); - } } } /* May have to unmap explicitly if we didn't draw: */ - if (keepUnmapped && - _mesa_is_bufferobj(exec->vtx.bufferobj) && - exec->vtx.buffer_map) { + if (keepUnmapped && exec->vtx.buffer_map) { vbo_exec_vtx_unmap( exec ); } |