Capture/Replay: Only perform call updates on valid calls.

Bug: angleproject:5133
Change-Id: Ib1a6ae1ca9ff9717c4e51f8908f5a4ee132d72ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035443
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/capture/FrameCapture.cpp b/src/libANGLE/capture/FrameCapture.cpp
index c93bf98..774db1a 100644
--- a/src/libANGLE/capture/FrameCapture.cpp
+++ b/src/libANGLE/capture/FrameCapture.cpp
@@ -5040,21 +5040,18 @@
         return;
     }
 
-    maybeOverrideEntryPoint(context, call);
-
-    maybeCapturePreCallUpdates(context, call);
-
     if (isCallValid)
     {
+        maybeOverrideEntryPoint(context, call);
+        maybeCapturePreCallUpdates(context, call);
         mFrameCalls.emplace_back(std::move(call));
+        maybeCapturePostCallUpdates(context);
     }
     else
     {
         INFO() << "FrameCapture: Not capturing invalid call to "
                << GetEntryPointName(call.entryPoint);
     }
-
-    maybeCapturePostCallUpdates(context);
 }
 
 void FrameCaptureShared::maybeCapturePostCallUpdates(const gl::Context *context)
diff --git a/src/tests/capture_replay_tests/capture_replay_expectations.txt b/src/tests/capture_replay_tests/capture_replay_expectations.txt
index ea0411d..c513bf4 100644
--- a/src/tests/capture_replay_tests/capture_replay_expectations.txt
+++ b/src/tests/capture_replay_tests/capture_replay_expectations.txt
@@ -60,7 +60,6 @@
 GPUTestConfigTest.GPUTestConfigConditions_D3D11/*
 ImageTest.SourceCubeTargetExternal/*
 PBOExtensionTest.*
-RobustBufferAccessBehaviorTest.*
 Texture2DTest.DefineMultipleLevelsWithoutMipmapping/*
 VertexAttributeTest.*