Commit a9504808 by Tobin Ehlis Committed by Commit Bot

Vulkan: ATrace marker fix-ups

Fix a couple of mislabled atrace markers and add explicit markers for inside/outside renderpass flushes. Bug: b/156403378 Change-Id: I4045846e54ff54bc8fc3dd6ef47339f6f5eb8e87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2327828Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: 's avatarTobin Ehlis <tobine@google.com> Commit-Queue: Tobin Ehlis <tobine@google.com>
parent dcc56215
...@@ -17,7 +17,7 @@ CommandProcessor::CommandProcessor() : mWorkerThreadIdle(true) {} ...@@ -17,7 +17,7 @@ CommandProcessor::CommandProcessor() : mWorkerThreadIdle(true) {}
void CommandProcessor::queueCommands(const vk::CommandProcessorTask &commands) void CommandProcessor::queueCommands(const vk::CommandProcessorTask &commands)
{ {
ANGLE_TRACE_EVENT0("gpu.angle", "RendererVk::queueCommands"); ANGLE_TRACE_EVENT0("gpu.angle", "CommandProcessor::queueCommands");
std::lock_guard<std::mutex> queueLock(mWorkerMutex); std::lock_guard<std::mutex> queueLock(mWorkerMutex);
ASSERT(commands.commandBuffer == nullptr || !commands.commandBuffer->empty()); ASSERT(commands.commandBuffer == nullptr || !commands.commandBuffer->empty());
mCommandsQueue.push(commands); mCommandsQueue.push(commands);
......
...@@ -1705,7 +1705,7 @@ angle::Result ContextVk::synchronizeCpuGpuTime() ...@@ -1705,7 +1705,7 @@ angle::Result ContextVk::synchronizeCpuGpuTime()
// Make sure nothing is running // Make sure nothing is running
ASSERT(!hasRecordedCommands()); ASSERT(!hasRecordedCommands());
ANGLE_TRACE_EVENT0("gpu.angle", "RendererVk::synchronizeCpuGpuTime"); ANGLE_TRACE_EVENT0("gpu.angle", "ContextVk::synchronizeCpuGpuTime");
// Create a query used to receive the GPU timestamp // Create a query used to receive the GPU timestamp
vk::QueryHelper timestampQuery; vk::QueryHelper timestampQuery;
...@@ -4447,6 +4447,7 @@ angle::Result ContextVk::endRenderPass() ...@@ -4447,6 +4447,7 @@ angle::Result ContextVk::endRenderPass()
if (mRenderer->getFeatures().enableCommandProcessingThread.enabled) if (mRenderer->getFeatures().enableCommandProcessingThread.enabled)
{ {
vk::CommandProcessorTask task = {this, &mPrimaryCommands, mRenderPassCommands}; vk::CommandProcessorTask task = {this, &mPrimaryCommands, mRenderPassCommands};
ANGLE_TRACE_EVENT0("gpu.angle", "ContextVk::flushInsideRenderPassCommands");
queueCommandsToWorker(task); queueCommandsToWorker(task);
getNextAvailableCommandBuffer(&mRenderPassCommands, true); getNextAvailableCommandBuffer(&mRenderPassCommands, true);
} }
...@@ -4492,7 +4493,7 @@ void ContextVk::getNextAvailableCommandBuffer(vk::CommandBufferHelper **commandB ...@@ -4492,7 +4493,7 @@ void ContextVk::getNextAvailableCommandBuffer(vk::CommandBufferHelper **commandB
void ContextVk::recycleCommandBuffer(vk::CommandBufferHelper *commandBuffer) void ContextVk::recycleCommandBuffer(vk::CommandBufferHelper *commandBuffer)
{ {
ANGLE_TRACE_EVENT0("gpu.angle", "RendererVk::waitForWorkerThreadIdle"); ANGLE_TRACE_EVENT0("gpu.angle", "ContextVk::recycleCommandBuffer");
std::lock_guard<std::mutex> queueLock(mCommandBufferQueueMutex); std::lock_guard<std::mutex> queueLock(mCommandBufferQueueMutex);
ASSERT(commandBuffer->empty()); ASSERT(commandBuffer->empty());
mAvailableCommandBuffers.push(commandBuffer); mAvailableCommandBuffers.push(commandBuffer);
...@@ -4584,6 +4585,7 @@ angle::Result ContextVk::flushOutsideRenderPassCommands() ...@@ -4584,6 +4585,7 @@ angle::Result ContextVk::flushOutsideRenderPassCommands()
if (mRenderer->getFeatures().enableCommandProcessingThread.enabled) if (mRenderer->getFeatures().enableCommandProcessingThread.enabled)
{ {
vk::CommandProcessorTask task = {this, &mPrimaryCommands, mOutsideRenderPassCommands}; vk::CommandProcessorTask task = {this, &mPrimaryCommands, mOutsideRenderPassCommands};
ANGLE_TRACE_EVENT0("gpu.angle", "ContextVk::flushOutsideRenderPassCommands");
queueCommandsToWorker(task); queueCommandsToWorker(task);
getNextAvailableCommandBuffer(&mOutsideRenderPassCommands, false); getNextAvailableCommandBuffer(&mOutsideRenderPassCommands, false);
} }
......
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