src/third_party/angle/src/libANGLE/renderer/vulkan/CommandProcessor.cpp
// Return the fence for the last submit. This may mean waiting on the worker to process tasks to
// actually get to the last submit
Return the fence for the last submit. This may mean waiting on the worker to process tasks to
actually get to the last submit
Return the fence for the last submit . This may mean waiting on the worker to process tasks to actually get to the last submit
vk::Shared<vk::Fence> CommandProcessor::getLastSubmittedFence(const vk::Context *context) const
{
    ANGLE_TRACE_EVENT0("gpu.angle", "CommandProcessor::getLastSubmittedFence");
    std::unique_lock<std::mutex> lock(mWorkerMutex);
    if (context->getRenderer()->getFeatures().asynchronousCommandProcessing.enabled)
    {
        mWorkerIdleCondition.wait(lock, [this] { return (mTasks.empty() && mWorkerThreadIdle); });
    }
    return mTaskProcessor.getLastSubmittedFenceWithLock(getDevice());
}
vk :: Shared < vk :: Fence > CommandProcessor :: getLastSubmittedFence ( const vk :: Context * context ) const { ANGLE_TRACE_EVENT0 ( " " , " " ) ; std :: unique_lock < std :: mutex > lock ( mWorkerMutex ) ; if ( context -> getRenderer ( ) -> getFeatures ( ) . asynchronousCommandProcessing . enabled ) { mWorkerIdleCondition . wait ( lock , [ this ] { return ( mTasks . empty ( ) && mWorkerThreadIdle ) ; } ) ; } return mTaskProcessor . getLastSubmittedFenceWithLock ( getDevice ( ) ) ; }
Return the fence for the last submit.
Return the fence for the last submit .
// Worker thread is idle and command queue is empty so good to continue