Browse Source

chore: cherry-pick 2882e1afd982 from angle (#26407)

Jeremy Rose 4 years ago
parent
commit
00be2b2470
2 changed files with 36 additions and 0 deletions
  1. 1 0
      patches/angle/.patches
  2. 35 0
      patches/angle/cherry-pick-2882e1afd982.patch

+ 1 - 0
patches/angle/.patches

@@ -1,3 +1,4 @@
 update_the_active_texture_cache_before_changing_the_texture_binding.patch
 fix_stale_validation_cache_on_buffer_deletion.patch
 d3d11_fix_bug_with_static_vertex_attributes.patch
+cherry-pick-2882e1afd982.patch

+ 35 - 0
patches/angle/cherry-pick-2882e1afd982.patch

@@ -0,0 +1,35 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jamie Madill <[email protected]>
+Date: Tue, 20 Oct 2020 09:45:23 -0400
+Subject: Fix missing validation cache update on VAO binding.
+
+Bug: chromium:1139398
+Change-Id: I85a0d7a72bc2c97b07ebc5f86effd8e36aefd544
+Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2485581
+Reviewed-by: Geoff Lang <[email protected]>
+Commit-Queue: Jamie Madill <[email protected]>
+
+diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
+index f73391da2bd3461ab5c53b30e9fed7376773a051..1ce952124cc02c3d4fbeec0b18095b6d92740369 100644
+--- a/src/libANGLE/Context.cpp
++++ b/src/libANGLE/Context.cpp
+@@ -8675,6 +8675,7 @@ void StateCache::onVertexArrayBindingChange(Context *context)
+     updateActiveAttribsMask(context);
+     updateVertexElementLimits(context);
+     updateBasicDrawStatesError();
++    updateBasicDrawElementsError();
+ }
+ 
+ void StateCache::onProgramExecutableChange(Context *context)
+diff --git a/src/libANGLE/Context.h b/src/libANGLE/Context.h
+index 9c2abcae729775701cc5b37f1599b849db5978d3..ba0884c4e6bf327e8f2cdd0faf780c897a95c119 100644
+--- a/src/libANGLE/Context.h
++++ b/src/libANGLE/Context.h
+@@ -202,6 +202,7 @@ class StateCache final : angle::NonCopyable
+     // 2. onVertexArrayBufferStateChange.
+     // 3. onBufferBindingChange.
+     // 4. onVertexArrayStateChange.
++    // 5. onVertexArrayBindingStateChange.
+     intptr_t getBasicDrawElementsError(Context *context) const
+     {
+         if (mCachedBasicDrawElementsError != kInvalidPointer)