Function flush

Synopsis

#include <Source/Falcor/Core/API/CopyContext.h>

void flush(bool wait=false)

Description

Flush the command list. This doesn't reset the command allocator, just submits the commands

Parameters:

[ in ] wait - If true, will block execution until the GPU finished processing the commands

Source

Lines 50-69 in Source/Falcor/Core/API/CopyContext.cpp. Line 73 in Source/Falcor/Core/API/CopyContext.h.

void CopyContext::flush(bool wait)
{
    if (mCommandsPending)
    {
        mpLowLevelData->flush();
        mCommandsPending = false;
    }
    else
    {
        // We need to signal even if there are no commands to execute. We need this because some resources may have been released since the last flush(), and unless we signal they will not be released
        mpLowLevelData->getFence()->gpuSignal(mpLowLevelData->getCommandQueue());
    }
    bindDescriptorHeaps();
    if (wait)
    {
        mpLowLevelData->getFence()->syncCpu();
    }
}





Add Discussion as Guest

Log in to DocsForge