diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 58d78fec66f..98bfefb0fc8 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -517,6 +517,7 @@ void _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)); @@ -542,10 +543,6 @@ _mesa_update_vao_derived_arrays(struct gl_context *ctx, /* 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; diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c index b1f94213721..3ea9c62350b 100644 --- a/src/mesa/main/draw.c +++ b/src/mesa/main/draw.c @@ -153,7 +153,8 @@ _mesa_update_vao_state(struct gl_context *ctx, GLbitfield filter) 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;