Commit 152450f8 by Ian Elliott Committed by Angle LUCI CQ

Fix ContextVk::handleNoopDrawEvent() for when no cmd buffer

ContextVk::handleNoopDrawEvent() was created to handle no-op glDraw*'s. However, it assumed/assert'd a valid mRenderPassCommandBuffer. That is not always the case. Fix this by having handleDirtyEventLogImpl() check for a valid command buffer. Bug: b/189967673 Bug: b/184888395 Change-Id: Ice7c5da842a6f41f27c24af8e858147d01be86bc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2935756Reviewed-by: 's avatarIan Elliott <ianelliott@google.com> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
parent bcb678a5
...@@ -1293,9 +1293,9 @@ angle::Result ContextVk::handleDirtyEventLogImpl(vk::CommandBuffer *commandBuffe ...@@ -1293,9 +1293,9 @@ angle::Result ContextVk::handleDirtyEventLogImpl(vk::CommandBuffer *commandBuffe
// to call the vkCmd*DebugUtilsLabelEXT functions in order to communicate to debuggers // to call the vkCmd*DebugUtilsLabelEXT functions in order to communicate to debuggers
// (e.g. AGI) the OpenGL ES commands that the application uses. // (e.g. AGI) the OpenGL ES commands that the application uses.
// Exit early if no OpenGL ES commands have been logged or if calling the // Exit early if no OpenGL ES commands have been logged, or if no command buffer (for a no-op
// vkCmd*DebugUtilsLabelEXT functions is not enabled. // draw), or if calling the vkCmd*DebugUtilsLabelEXT functions is not enabled.
if (mEventLog.empty() || !mRenderer->angleDebuggerMode()) if (mEventLog.empty() || commandBuffer == nullptr || !mRenderer->angleDebuggerMode())
{ {
return angle::Result::Continue; return angle::Result::Continue;
} }
...@@ -3033,12 +3033,6 @@ void ContextVk::endEventLog(angle::EntryPoint entryPoint) ...@@ -3033,12 +3033,6 @@ void ContextVk::endEventLog(angle::EntryPoint entryPoint)
angle::Result ContextVk::handleNoopDrawEvent() angle::Result ContextVk::handleNoopDrawEvent()
{ {
if (!mRenderer->angleDebuggerMode())
{
return angle::Result::Continue;
}
ASSERT(mRenderPassCommandBuffer);
// Even though this draw call is being no-op'd, we still must handle the dirty event log // Even though this draw call is being no-op'd, we still must handle the dirty event log
return handleDirtyEventLogImpl(mRenderPassCommandBuffer); return handleDirtyEventLogImpl(mRenderPassCommandBuffer);
} }
......
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