From c1205a6b0fe3d87b32fbb460ed9394ed9f8307b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 25 May 2021 17:13:17 -0400 Subject: [PATCH] mesa: don't call _mesa_set_draw_vao in glPushClientAttrib Pushing states doesn't affect draws. Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/main/attrib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 8231af08336..9bf45145adc 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1391,9 +1391,6 @@ copy_array_attrib(struct gl_context *ctx, /* skip ArrayBufferObj */ /* skip IndexBufferObj */ - - /* Invalidate array state. It will be updated during the next draw. */ - _mesa_set_draw_vao(ctx, ctx->Array._EmptyVAO, 0); } /** @@ -1454,6 +1451,9 @@ restore_array_attrib(struct gl_context *ctx, copy_array_attrib(ctx, dest, src, true); } + /* Invalidate array state. It will be updated during the next draw. */ + _mesa_set_draw_vao(ctx, ctx->Array._EmptyVAO, 0); + if (is_vao_name_zero || !src->VAO->IndexBufferObj || _mesa_IsBuffer(src->VAO->IndexBufferObj->Name)) { _mesa_BindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB,