FrameCapture: Capture GLES1 matrix stack.

Capture the modelview and projection matrix stack. This is required for
GLES1 applications that do not reset the stack every frame.

Bug: angleproject:6181
Change-Id: I71befc15ca287cf91fcebf9d972c7badaeb23605
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035050
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
This commit is contained in:
Lubosz Sarnecki 2021-07-16 12:19:23 +02:00 коммит произвёл Angle LUCI CQ
Родитель edb4a7a8da
Коммит ef406f1b43
1 изменённых файлов: 22 добавлений и 0 удалений

Просмотреть файл

@ -3498,6 +3498,28 @@ void CaptureMidExecutionSetup(const gl::Context *context,
{
capCap(GL_TEXTURE_2D, currentTextureState);
}
cap(CaptureMatrixMode(replayState, true, gl::MatrixType::Projection));
for (angle::Mat4 projectionMatrix :
apiState.gles1().getMatrixStack(gl::MatrixType::Projection))
{
cap(CapturePushMatrix(replayState, true));
cap(CaptureLoadMatrixf(replayState, true, projectionMatrix.elements().data()));
}
cap(CaptureMatrixMode(replayState, true, gl::MatrixType::Modelview));
for (angle::Mat4 modelViewMatrix :
apiState.gles1().getMatrixStack(gl::MatrixType::Modelview))
{
cap(CapturePushMatrix(replayState, true));
cap(CaptureLoadMatrixf(replayState, true, modelViewMatrix.elements().data()));
}
gl::MatrixType currentMatrixMode = apiState.gles1().getMatrixMode();
if (currentMatrixMode != gl::MatrixType::Modelview)
{
cap(CaptureMatrixMode(replayState, true, currentMatrixMode));
}
}
// Rasterizer state. Missing ES 3.x features.