Commit 078ebbcf by Lubosz Sarnecki Committed by Commit Bot

FrameCatpure: Move capturing default vertex attribs to function.

Don't capture these on GLES1, due to the unavailability of glVertexAtrrib4fv. Bug: angleproject:5893 Change-Id: Iafbc9219cfc0a0c1d0a55e112ee88d7180ed94f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2877235 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent e40edf92
...@@ -2251,6 +2251,24 @@ void CaptureIndexedBuffers(const gl::State &glState, ...@@ -2251,6 +2251,24 @@ void CaptureIndexedBuffers(const gl::State &glState,
} }
} }
void CaptureDefaultVertexAttribs(const gl::State &replayState,
const gl::State &apiState,
std::vector<CallCapture> *setupCalls)
{
const std::vector<gl::VertexAttribCurrentValueData> &currentValues =
apiState.getVertexAttribCurrentValues();
for (GLuint attribIndex = 0; attribIndex < gl::MAX_VERTEX_ATTRIBS; ++attribIndex)
{
const gl::VertexAttribCurrentValueData &defaultValue = currentValues[attribIndex];
if (!IsDefaultCurrentValue(defaultValue))
{
Capture(setupCalls, CaptureVertexAttrib4fv(replayState, true, attribIndex,
defaultValue.Values.FloatValues));
}
}
}
void CaptureMidExecutionSetup(const gl::Context *context, void CaptureMidExecutionSetup(const gl::Context *context,
std::vector<CallCapture> *setupCalls, std::vector<CallCapture> *setupCalls,
ResourceTracker *resourceTracker, ResourceTracker *resourceTracker,
...@@ -2357,18 +2375,10 @@ void CaptureMidExecutionSetup(const gl::Context *context, ...@@ -2357,18 +2375,10 @@ void CaptureMidExecutionSetup(const gl::Context *context,
// Must happen after buffer data initialization. // Must happen after buffer data initialization.
// TODO(http://anglebug.com/3662): Complete state capture. // TODO(http://anglebug.com/3662): Complete state capture.
// Capture default vertex attribs // Capture default vertex attribs. Do not capture on GLES1.
const std::vector<gl::VertexAttribCurrentValueData> &currentValues = if (!context->isGLES1())
apiState.getVertexAttribCurrentValues();
for (GLuint attribIndex = 0; attribIndex < gl::MAX_VERTEX_ATTRIBS; ++attribIndex)
{ {
const gl::VertexAttribCurrentValueData &defaultValue = currentValues[attribIndex]; CaptureDefaultVertexAttribs(replayState, apiState, setupCalls);
if (!IsDefaultCurrentValue(defaultValue))
{
Capture(setupCalls, CaptureVertexAttrib4fv(replayState, true, attribIndex,
defaultValue.Values.FloatValues));
}
} }
// Capture vertex array objects // Capture vertex array objects
......
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