Commit 34445b29 by Cody Northrop Committed by Commit Bot

FrameCapture: More fixes for app updates

* Disable GL_EXT_map_buffer_range during capture, several native GLES drivers do not support it. * Unmap buffers before updating them during Reset. Some native drivers require it. Test: Temple Run on multiple systems Bug: angleproject:4845 Change-Id: I9aea9c220320095aee87da107320b8fcad6c0a2f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2447029Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent ef897a9c
...@@ -3475,6 +3475,10 @@ void Context::initCaps() ...@@ -3475,6 +3475,10 @@ void Context::initCaps()
INFO() << "Limiting binary format support count to zero while FrameCapture enabled" INFO() << "Limiting binary format support count to zero while FrameCapture enabled"
<< std::endl; << std::endl;
mDisplay->overrideFrontendFeatures({"disable_program_binary"}, true); mDisplay->overrideFrontendFeatures({"disable_program_binary"}, true);
INFO() << "Disabling GL_EXT_map_buffer_range during capture, it is not supported on "
<< "some native drivers" << std::endl;
mState.mExtensions.mapBufferRange = false;
} }
// Disable support for OES_get_program_binary // Disable support for OES_get_program_binary
......
...@@ -839,6 +839,18 @@ void MaybeResetResources(std::stringstream &out, ...@@ -839,6 +839,18 @@ void MaybeResetResources(std::stringstream &out,
BufferSet &buffersToRestore = resourceTracker->getBuffersToRestore(); BufferSet &buffersToRestore = resourceTracker->getBuffersToRestore();
for (const gl::BufferID id : buffersToRestore) for (const gl::BufferID id : buffersToRestore)
{ {
if (resourceTracker->getStartingBuffersMappedCurrent(id))
{
// Some drivers require the buffer to be unmapped before you can update data,
// which violates the spec. See gl::Buffer::bufferDataImpl().
for (CallCapture &call : bufferUnmapCalls[id])
{
out << " ";
WriteCppReplayForCall(call, dataTracker, out, header, binaryData);
out << ";\n";
}
}
// Emit their restore calls // Emit their restore calls
for (CallCapture &call : bufferRestoreCalls[id]) for (CallCapture &call : bufferRestoreCalls[id])
{ {
......
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