Commit a2c2a910 by Cody Northrop Committed by Commit Bot

Capture/Replay: Fixes for PUBG:Mobile

This CL does the following: * Skip calls from KHR_debug and EXT_debug_marker * Update an assert in setDeletedBuffer * Warn when capturing an invalid call Test: Capture first 2000 frames of PUBG:Mobile Bug: b/165824228 Bug: angleproject:4048 Change-Id: Ib7fa616a1b5c8ed7c83daaaf0779b41acd31a7f0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2366828 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent ea3f501e
......@@ -3215,6 +3215,39 @@ void CaptureMidExecutionSetup(const gl::Context *context,
// Allow the replayState object to be destroyed conveniently.
replayState.setBufferBinding(context, gl::BufferBinding::Array, nullptr);
}
bool SkipCall(gl::EntryPoint entryPoint)
{
switch (entryPoint)
{
case gl::EntryPoint::DebugMessageCallback:
case gl::EntryPoint::DebugMessageCallbackKHR:
case gl::EntryPoint::DebugMessageControl:
case gl::EntryPoint::DebugMessageControlKHR:
case gl::EntryPoint::DebugMessageInsert:
case gl::EntryPoint::DebugMessageInsertKHR:
case gl::EntryPoint::GetDebugMessageLog:
case gl::EntryPoint::GetDebugMessageLogKHR:
case gl::EntryPoint::GetObjectLabelKHR:
case gl::EntryPoint::GetObjectPtrLabelKHR:
case gl::EntryPoint::GetPointervKHR:
case gl::EntryPoint::InsertEventMarkerEXT:
case gl::EntryPoint::ObjectLabelKHR:
case gl::EntryPoint::ObjectPtrLabelKHR:
case gl::EntryPoint::PopDebugGroupKHR:
case gl::EntryPoint::PopGroupMarkerEXT:
case gl::EntryPoint::PushDebugGroupKHR:
case gl::EntryPoint::PushGroupMarkerEXT:
// Purposefully skip KHR_debug and EXT_debug_marker entry points
// There is no need to capture these for replaying a trace in our harness
return true;
default:
break;
}
return false;
}
} // namespace
ParamCapture::ParamCapture() : type(ParamType::TGLenum), enumGroup(gl::GLenumGroup::DefaultGroup) {}
......@@ -3975,6 +4008,9 @@ void FrameCapture::maybeCaptureClientData(const gl::Context *context, CallCaptur
void FrameCapture::captureCall(const gl::Context *context, CallCapture &&call)
{
if (SkipCall(call.entryPoint))
return;
maybeOverrideEntryPoint(context, call);
// Process client data snapshots.
......@@ -4306,7 +4342,7 @@ void ResourceTracker::setDeletedBuffer(gl::BufferID id)
// Ensure this buffer was in our starting set
// It's possible this could fire if the app deletes buffers that were never generated
ASSERT(mStartingBuffers.find(id) != mStartingBuffers.end());
ASSERT(mStartingBuffers.empty() || (mStartingBuffers.find(id) != mStartingBuffers.end()));
// In this case, the app is deleting a buffer we started with, we need to regen on loop
mBuffersToRegen.insert(id);
......
......@@ -388,6 +388,10 @@ void CaptureCallToFrameCapture(CaptureFuncT captureFunc,
return;
CallCapture call = captureFunc(context->getState(), isCallValid, captureParams...);
if (!isCallValid)
INFO() << "FrameCapture: Capturing invalid call to " << GetEntryPointName(call.entryPoint);
frameCapture->captureCall(context, std::move(call));
}
......
......@@ -2279,7 +2279,7 @@ void CaptureInsertEventMarkerEXT_marker(const State &glState,
const GLchar *marker,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CapturePushGroupMarkerEXT_marker(const State &glState,
......@@ -2288,7 +2288,7 @@ void CapturePushGroupMarkerEXT_marker(const State &glState,
const GLchar *marker,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureDiscardFramebufferEXT_attachments(const State &glState,
......@@ -2615,7 +2615,7 @@ void CaptureDebugMessageCallbackKHR_userParam(const State &glState,
const void *userParam,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureDebugMessageControlKHR_ids(const State &glState,
......@@ -2628,7 +2628,7 @@ void CaptureDebugMessageControlKHR_ids(const State &glState,
GLboolean enabled,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureDebugMessageInsertKHR_buf(const State &glState,
......@@ -2641,7 +2641,7 @@ void CaptureDebugMessageInsertKHR_buf(const State &glState,
const GLchar *buf,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureGetDebugMessageLogKHR_sources(const State &glState,
......@@ -2656,7 +2656,7 @@ void CaptureGetDebugMessageLogKHR_sources(const State &glState,
GLchar *messageLog,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureGetDebugMessageLogKHR_types(const State &glState,
......@@ -2671,7 +2671,7 @@ void CaptureGetDebugMessageLogKHR_types(const State &glState,
GLchar *messageLog,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureGetDebugMessageLogKHR_ids(const State &glState,
......@@ -2686,7 +2686,7 @@ void CaptureGetDebugMessageLogKHR_ids(const State &glState,
GLchar *messageLog,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureGetDebugMessageLogKHR_severities(const State &glState,
......@@ -2701,7 +2701,7 @@ void CaptureGetDebugMessageLogKHR_severities(const State &glState,
GLchar *messageLog,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureGetDebugMessageLogKHR_lengths(const State &glState,
......@@ -2716,7 +2716,7 @@ void CaptureGetDebugMessageLogKHR_lengths(const State &glState,
GLchar *messageLog,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureGetDebugMessageLogKHR_messageLog(const State &glState,
......@@ -2731,7 +2731,7 @@ void CaptureGetDebugMessageLogKHR_messageLog(const State &glState,
GLchar *messageLog,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureGetObjectLabelKHR_length(const State &glState,
......@@ -2743,7 +2743,7 @@ void CaptureGetObjectLabelKHR_length(const State &glState,
GLchar *label,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureGetObjectLabelKHR_label(const State &glState,
......@@ -2755,7 +2755,7 @@ void CaptureGetObjectLabelKHR_label(const State &glState,
GLchar *label,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureGetObjectPtrLabelKHR_ptr(const State &glState,
......@@ -2766,7 +2766,7 @@ void CaptureGetObjectPtrLabelKHR_ptr(const State &glState,
GLchar *label,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureGetObjectPtrLabelKHR_length(const State &glState,
......@@ -2777,7 +2777,7 @@ void CaptureGetObjectPtrLabelKHR_length(const State &glState,
GLchar *label,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureGetObjectPtrLabelKHR_label(const State &glState,
......@@ -2788,7 +2788,7 @@ void CaptureGetObjectPtrLabelKHR_label(const State &glState,
GLchar *label,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureGetPointervKHR_params(const State &glState,
......@@ -2797,7 +2797,7 @@ void CaptureGetPointervKHR_params(const State &glState,
void **params,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureObjectLabelKHR_label(const State &glState,
......@@ -2808,7 +2808,7 @@ void CaptureObjectLabelKHR_label(const State &glState,
const GLchar *label,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureObjectPtrLabelKHR_ptr(const State &glState,
......@@ -2818,7 +2818,7 @@ void CaptureObjectPtrLabelKHR_ptr(const State &glState,
const GLchar *label,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureObjectPtrLabelKHR_label(const State &glState,
......@@ -2828,7 +2828,7 @@ void CaptureObjectPtrLabelKHR_label(const State &glState,
const GLchar *label,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CapturePushDebugGroupKHR_message(const State &glState,
......@@ -2839,7 +2839,7 @@ void CapturePushDebugGroupKHR_message(const State &glState,
const GLchar *message,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
// Skipped
}
void CaptureDeleteFencesNV_fencesPacked(const State &glState,
......
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