mesa,st/mesa: add a fast path for non-static VAOs

Skip most of _mesa_update_vao_derived_arrays if the VAO is not static.
Drivers need a separate codepath for this.

This increases performance by 7% with glthread and the game "torcs".

The reason is that glthread uploads vertices and sets vertex buffers
every draw call, so the overhead is very noticable. glthread doesn't
hide the overhead, because the driver thread is the busiest thread.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4314>
This commit is contained in:
Marek Olšák
2020-03-27 05:07:02 -04:00
committed by Marge Bot
parent 2e3a9d7828
commit 42842306d3
5 changed files with 64 additions and 0 deletions

View File

@@ -583,6 +583,8 @@ void st_init_limits(struct pipe_screen *screen,
c->MultiDrawWithUserIndices =
screen->get_param(screen, PIPE_CAP_DRAW_INFO_START_WITH_USER_INDICES);
c->AllowDynamicVAOFastPath = true;
c->glBeginEndBufferSize =
screen->get_param(screen, PIPE_CAP_GL_BEGIN_END_BUFFER_SIZE);
}