diff options
author | Brian Paul <[email protected]> | 2013-10-14 17:36:06 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-10-16 08:13:45 -0600 |
commit | 3c074e4d4daf8174581b83506b22ebf7dbad553f (patch) | |
tree | f0eeae34529b3b33f4f6aa1e19c9874dcc44796f /include/GL | |
parent | fa9c702164768f6ef05bdb02deff2f49a8d166de (diff) |
vbo: access VBO memory more efficiently when building display lists
Use GL_MAP_INVALIDATE_RANGE, UNSYNCHRONIZED and FLUSH_EXPLICIT flags
when mapping VBOs during display list compilation. This mirrors what
we do for immediate-mode VBO building in vbo_exec_vtx_map().
This improves performance for applications which interleave display
list compilation with execution. For example:
glNewList(A);
glBegin/End prims;
glEndList();
glCallList(A);
glNewList(B);
glBegin/End prims;
glEndList();
glCallList(B);
Mesa's vbo module tries to combine the vertex data from lists A and B
into the same VBO when there's room. Before, when we mapped the VBO for
building list B, we did so with GL_MAP_WRITE_BIT only. Even though we
were writing to an unused part of the buffer, the map would stall until
the preceeding drawing call finished.
Use the extra map flags and FlushMappedBufferRange() to avoid the stall.
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'include/GL')
0 files changed, 0 insertions, 0 deletions