From 264aaf99df120ad18d280353bff634a10475d32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 25 May 2021 17:44:17 -0400 Subject: [PATCH] mesa: don't save/restore VAO NumUpdates and IsDynamic to fix update tracking NumUpdates is used to indicate whether a VAO is static or dynamic, but if we restored an older value, it could incorrectly indicate that it's not dynamic. This fixes a small performance issue with torcs. Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/main/attrib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index e5672a9ee5a..98c4b8afdc7 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1359,8 +1359,7 @@ copy_array_object(struct gl_context *ctx, dest->NonZeroDivisorMask = src->NonZeroDivisorMask; dest->_AttributeMapMode = src->_AttributeMapMode; dest->NewArrays = src->NewArrays; - dest->NumUpdates = src->NumUpdates; - dest->IsDynamic = src->IsDynamic; + /* skip NumUpdates and IsDynamic because they can only increase, not decrease */ } /**