Function bufferBarrier

Synopsis

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

bool bufferBarrier(const Buffer *pBuffer, Resource::State newState)

Description

No description yet.

Source

Lines 250-257 in Source/Falcor/Core/API/D3D12/D3D12CopyContext.cpp. Line 148 in Source/Falcor/Core/API/CopyContext.h.

bool CopyContext::bufferBarrier(const Buffer* pBuffer, Resource::State newState)
{
    if (pBuffer && pBuffer->getCpuAccess() != Buffer::CpuAccess::None) return false;
    bool recorded = d3d12GlobalResourceBarrier(pBuffer, newState, mpLowLevelData->getCommandList());
    pBuffer->setGlobalState(newState);
    mCommandsPending = mCommandsPending || recorded;
    return recorded;
}





Add Discussion as Guest

Log in