This just moves the exit into the caller. There is nothing else in
_mesa_update_vao_derived_arrays that dynamic VAOs care about.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>
_mesa_update_vao_derived_arrays(struct gl_context *ctx,
struct gl_vertex_array_object *vao)
{
+ assert(!vao->IsDynamic);
/* Make sure we do not run into problems with shared objects */
assert(!vao->SharedAndImmutable || (!vao->NewVertexBuffers && !vao->NewVertexElements));
/* VBO array bits. */
const GLbitfield vbos = vao->VertexAttribBufferMask;
- /* Fast path when the VAO is updated too often. */
- if (vao->IsDynamic)
- return;
-
/* More than 4 updates turn the VAO to dynamic. */
if (ctx->Const.AllowDynamicVAOFastPath && ++vao->NumUpdates > 4) {
vao->IsDynamic = true;
ctx->Array.NewVAO = false;
if (vao->NewVertexBuffers || vao->NewVertexElements) {
- _mesa_update_vao_derived_arrays(ctx, vao);
+ if (!vao->IsDynamic)
+ _mesa_update_vao_derived_arrays(ctx, vao);
new_vertex_buffers |= vao->NewVertexBuffers;
new_vertex_elements |= vao->NewVertexElements;
vao->NewVertexBuffers = false;