mesa: don't call _mesa_update_vao_derived_arrays for dynamic VAOs

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>
This commit is contained in:
Marek Olšák
2022-11-18 18:43:19 -05:00
committed by Marge Bot
parent dcad210d12
commit c2557a5652
2 changed files with 3 additions and 5 deletions
+1 -4
View File
@@ -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;
+2 -1
View File
@@ -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;