Commit 5c0e6e52 by Jamie Madill Committed by Commit Bot

Capture/Replay: Implement more state for mid-execution replay.

Includes much more state serialization. Notably Vertex Arrays were missing as well as multiple GL render states. Also fixes many serialization bugs. For example, we would not be using the correct client array and pack/unpack state in the mid-execution capture. Also depth/stencil attachments were missing from the capture. Also fixes the replay sample to work with non-zero starting frames. With these fixes we can run mid-execution replay of the T-Rex demo. Bug: angleproject:3611 Change-Id: I6945eb9b30a5137be996956b43f074a0a750b333 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1895112 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
parent 405d4cf3
...@@ -24,6 +24,8 @@ class CaptureReplaySample : public SampleApplication ...@@ -24,6 +24,8 @@ class CaptureReplaySample : public SampleApplication
return false; return false;
SetBinaryDataDir(ANGLE_CAPTURE_REPLAY_SAMPLE_DATA_DIR); SetBinaryDataDir(ANGLE_CAPTURE_REPLAY_SAMPLE_DATA_DIR);
SetupContext1Replay(); SetupContext1Replay();
eglSwapInterval(getDisplay(), 1);
return true; return true;
} }
...@@ -31,7 +33,10 @@ class CaptureReplaySample : public SampleApplication ...@@ -31,7 +33,10 @@ class CaptureReplaySample : public SampleApplication
void draw() override void draw() override
{ {
ReplayContext1Frame(kReplayFrameStart + (mCurrentFrame % kReplayFrameEnd)); // Compute the current frame, looping from kReplayFrameStart to kReplayFrameEnd.
uint32_t frame =
kReplayFrameStart + (mCurrentFrame % (kReplayFrameEnd - kReplayFrameStart));
ReplayContext1Frame(frame);
mCurrentFrame++; mCurrentFrame++;
} }
......
...@@ -356,6 +356,8 @@ class State : angle::NonCopyable ...@@ -356,6 +356,8 @@ class State : angle::NonCopyable
} }
} }
ANGLE_INLINE Buffer *getArrayBuffer() const { return getTargetBuffer(BufferBinding::Array); }
angle::Result setIndexedBufferBinding(const Context *context, angle::Result setIndexedBufferBinding(const Context *context,
BufferBinding target, BufferBinding target,
GLuint index, GLuint index,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment