Commit 3706f9eb by Ian Elliott Committed by Angle LUCI CQ

Vulkan: Fix AGI hierarchy crash for noop'd clears/queries

The ASSERT in ContextVk::endEventLogForClearOrQuery() was wrong. Certain glClear*, glBeginQuery*, and glEndQuery* commands may exit early (e.g. noop). When this happens, mQueryEventType will be set to NotInQueryCmd. In such cases, return without trying to finish a non-started debug-util-marker hierarchy. Bug: b/191489405 Change-Id: If40ed00fdc6e420ae6a11c2aeaced19e5aa45a5f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2973342Reviewed-by: 's avatarTrevor David Black <vantablack@google.com> Reviewed-by: 's avatarMark Lobodzinski <mark@lunarg.com> Reviewed-by: 's avatarIan Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
parent c51c59c7
...@@ -3065,8 +3065,6 @@ void ContextVk::endEventLog(angle::EntryPoint entryPoint, PipelineType pipelineT ...@@ -3065,8 +3065,6 @@ void ContextVk::endEventLog(angle::EntryPoint entryPoint, PipelineType pipelineT
} }
void ContextVk::endEventLogForClearOrQuery() void ContextVk::endEventLogForClearOrQuery()
{ {
ASSERT(mQueryEventType == GraphicsEventCmdBuf::InOutsideCmdBufQueryCmd ||
mQueryEventType == GraphicsEventCmdBuf::InRenderPassCmdBufQueryCmd);
if (!mRenderer->angleDebuggerMode()) if (!mRenderer->angleDebuggerMode())
{ {
return; return;
...@@ -3083,6 +3081,12 @@ void ContextVk::endEventLogForClearOrQuery() ...@@ -3083,6 +3081,12 @@ void ContextVk::endEventLogForClearOrQuery()
ASSERT(mRenderPassCommands); ASSERT(mRenderPassCommands);
commandBuffer = &mRenderPassCommands->getCommandBuffer(); commandBuffer = &mRenderPassCommands->getCommandBuffer();
break; break;
case GraphicsEventCmdBuf::NotInQueryCmd:
// The glClear* or gl*Query* command was noop'd or otherwise ended early. We could
// call handleDirtyEventLogImpl() to start the hierarchy, but it isn't clear which (if
// any) command buffer to use. We'll just skip processing this command (other than to
// let it stay queued for the next time handleDirtyEventLogImpl() is called.
return;
default: default:
UNREACHABLE(); UNREACHABLE();
} }
......
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