Commit 78fb9314 by Lubosz Sarnecki Committed by Commit Bot

FrameCapture: Capture GLES1 vertex buffer pointers.

CaptureVertexPointerGLES1 was expecting only client-side vertex arrays and not checking whether a vertex buffer was bound. This patch fixes offsets in vertex buffers for GLES1, which can be seen in apps like Dr. Driving. The mClientVertexArrayMap index is now retrieved by entrypoint name, as the arrayClientPointerIndex is unset in the vertex buffer case. Bug: angleproject:5751 Change-Id: If40cae56bcdbed57885e83c49291cb000a884b0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2859826Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
parent d469dcb1
...@@ -4068,7 +4068,29 @@ void FrameCapture::maybeCapturePreCallUpdates(const gl::Context *context, CallCa ...@@ -4068,7 +4068,29 @@ void FrameCapture::maybeCapturePreCallUpdates(const gl::Context *context, CallCa
} }
else else
{ {
index = call.params.getClientArrayPointerParameter().arrayClientPointerIndex; gl::ClientVertexArrayType type;
switch (call.entryPoint)
{
case EntryPoint::GLVertexPointer:
type = gl::ClientVertexArrayType::Vertex;
break;
case EntryPoint::GLColorPointer:
type = gl::ClientVertexArrayType::Color;
break;
case EntryPoint::GLTexCoordPointer:
type = gl::ClientVertexArrayType::TextureCoord;
break;
case EntryPoint::GLNormalPointer:
type = gl::ClientVertexArrayType::Normal;
break;
case EntryPoint::GLPointSizePointerOES:
type = gl::ClientVertexArrayType::PointSize;
break;
default:
UNREACHABLE();
type = gl::ClientVertexArrayType::InvalidEnum;
}
index = gl::GLES1Renderer::VertexArrayIndex(type, context->getState().gles1());
} }
if (call.params.hasClientArrayData()) if (call.params.hasClientArrayData())
...@@ -5062,8 +5084,11 @@ void CaptureVertexPointerGLES1(const gl::State &glState, ...@@ -5062,8 +5084,11 @@ void CaptureVertexPointerGLES1(const gl::State &glState,
ParamCapture *paramCapture) ParamCapture *paramCapture)
{ {
paramCapture->value.voidConstPointerVal = pointer; paramCapture->value.voidConstPointerVal = pointer;
paramCapture->arrayClientPointerIndex = if (!glState.getTargetBuffer(gl::BufferBinding::Array))
gl::GLES1Renderer::VertexArrayIndex(type, glState.gles1()); {
paramCapture->arrayClientPointerIndex =
gl::GLES1Renderer::VertexArrayIndex(type, glState.gles1());
}
} }
gl::Program *GetProgramForCapture(const gl::State &glState, gl::ShaderProgramID handle) gl::Program *GetProgramForCapture(const gl::State &glState, gl::ShaderProgramID handle)
......
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