Function copyBufferRegion

Synopsis

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

void copyBufferRegion(const Buffer *pDst, uint64_t dstOffset, const Buffer *pSrc, uint64_t srcOffset, uint64_t numBytes)

Description

Copy part of a buffer

Source

Lines 307-313 in Source/Falcor/Core/API/D3D12/D3D12CopyContext.cpp. Line 103 in Source/Falcor/Core/API/CopyContext.h.

void CopyContext::copyBufferRegion(const Buffer* pDst, uint64_t dstOffset, const Buffer* pSrc, uint64_t srcOffset, uint64_t numBytes)
{
    resourceBarrier(pDst, Resource::State::CopyDest);
    resourceBarrier(pSrc, Resource::State::CopySource);
    mpLowLevelData->getCommandList()->CopyBufferRegion(pDst->getApiHandle(), dstOffset, pSrc->getApiHandle(), pSrc->getGpuAddressOffset() + srcOffset, numBytes);
    mCommandsPending = true;
}





Add Discussion as Guest

Log in to DocsForge