mesa/vbo: remove redundant _mesa_is_bufferobj() calls

This is already called inside the vbo_exec_vtx_{unmap,map}()
functions.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Timothy Arceri 2017-03-30 21:14:43 +11:00
parent 3ef1ff6270
commit 2e70de7d2f

View file

@ -426,9 +426,7 @@ vbo_exec_vtx_flush(struct vbo_exec_context *exec, GLboolean keepUnmapped)
if (ctx->NewState) if (ctx->NewState)
_mesa_update_state( ctx ); _mesa_update_state( ctx );
if (_mesa_is_bufferobj(exec->vtx.bufferobj)) { vbo_exec_vtx_unmap(exec);
vbo_exec_vtx_unmap( exec );
}
if (0) if (0)
printf("%s %d %d\n", __func__, exec->vtx.prim_count, 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, exec->vtx.vert_count - 1,
NULL, 0, NULL); NULL, 0, NULL);
/* If using a real VBO, get new storage -- unless asked not to. /* Get new storage -- unless asked not to. */
*/ if (!keepUnmapped)
if (_mesa_is_bufferobj(exec->vtx.bufferobj) && !keepUnmapped) {
vbo_exec_vtx_map( exec ); vbo_exec_vtx_map( exec );
} }
} }
}
/* May have to unmap explicitly if we didn't draw: /* May have to unmap explicitly if we didn't draw:
*/ */
if (keepUnmapped && if (keepUnmapped && exec->vtx.buffer_map) {
_mesa_is_bufferobj(exec->vtx.bufferobj) &&
exec->vtx.buffer_map) {
vbo_exec_vtx_unmap( exec ); vbo_exec_vtx_unmap( exec );
} }