mesa: move calling _mesa_update_vao_derived_arrays into st_update_array

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-21 08:24:17 -05:00
committed by Marge Bot
parent 76a214f390
commit 0fbd82bdc4
3 changed files with 4 additions and 4 deletions

View File

@@ -546,8 +546,6 @@ _mesa_update_vao_derived_arrays(struct gl_context *ctx,
/* More than 4 updates turn the VAO to dynamic. */
if (ctx->Const.AllowDynamicVAOFastPath && ++vao->NumUpdates > 4) {
vao->IsDynamic = true;
/* IsDynamic changes how vertex elements map to vertex buffers. */
vao->NewVertexElements = true;
return;
}

View File

@@ -154,8 +154,6 @@ _mesa_update_vao_state(struct gl_context *ctx, GLbitfield filter)
bool new_vertex_buffers = false, new_vertex_elements = false;
if (vao->NewVertexBuffers || vao->NewVertexElements) {
if (!vao->IsDynamic)
_mesa_update_vao_derived_arrays(ctx, vao);
new_vertex_buffers |= vao->NewVertexBuffers;
new_vertex_elements |= vao->NewVertexElements;
vao->NewVertexBuffers = false;

View File

@@ -363,9 +363,13 @@ template<util_popcnt POPCNT> void ALWAYS_INLINE
st_update_array_impl(struct st_context *st)
{
struct gl_context *ctx = st->ctx;
struct gl_vertex_array_object *vao = ctx->Array._DrawVAO;
GLbitfield enabled_user_attribs;
GLbitfield nonzero_divisor_attribs;
if (!vao->IsDynamic && !vao->SharedAndImmutable)
_mesa_update_vao_derived_arrays(ctx, vao);
_mesa_get_derived_vao_masks(ctx, &enabled_user_attribs,
&nonzero_divisor_attribs);