Function unmap

Synopsis

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

void unmap()

Description

Unmap the buffer

Source

Lines 122-134 in Source/Falcor/Core/API/D3D12/D3D12Buffer.cpp. Line 247 in Source/Falcor/Core/API/Buffer.h.

void Buffer::unmap()
{
    // Only unmap read buffers, write buffers are persistently mapped
    D3D12_RANGE r{};
    if (mpStagingResource)
    {
        mpStagingResource->mApiHandle->Unmap(0, &r);
    }
    else if (mCpuAccess == CpuAccess::Read)
    {
        mApiHandle->Unmap(0, &r);
    }
}





Add Discussion as Guest

Log in to DocsForge