Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5c0e6e5

Browse files
null77Commit Bot
authored andcommitted
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: Tim Van Patten <timvp@google.com>
1 parent 405d4cf commit 5c0e6e5

File tree

3 files changed

+338
-69
lines changed

3 files changed

+338
-69
lines changed

samples/capture_replay/CaptureReplay.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,19 @@ class CaptureReplaySample : public SampleApplication
2424
return false;
2525
SetBinaryDataDir(ANGLE_CAPTURE_REPLAY_SAMPLE_DATA_DIR);
2626
SetupContext1Replay();
27+
28+
eglSwapInterval(getDisplay(), 1);
2729
return true;
2830
}
2931

3032
void destroy() override {}
3133

3234
void draw() override
3335
{
34-
ReplayContext1Frame(kReplayFrameStart + (mCurrentFrame % kReplayFrameEnd));
36+
// Compute the current frame, looping from kReplayFrameStart to kReplayFrameEnd.
37+
uint32_t frame =
38+
kReplayFrameStart + (mCurrentFrame % (kReplayFrameEnd - kReplayFrameStart));
39+
ReplayContext1Frame(frame);
3540
mCurrentFrame++;
3641
}
3742

0 commit comments

Comments
 (0)