Function prepareForDispatch

Synopsis

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

bool prepareForDispatch(ComputeState *pState, ComputeVars *pVars)

Description

No description yet.

Source

Lines 82-99 in Source/Falcor/Core/API/D3D12/D3D12ComputeContext.cpp. Line 82 in Source/Falcor/Core/API/ComputeContext.h.

bool ComputeContext::prepareForDispatch(ComputeState* pState, ComputeVars* pVars)
{
    assert(pState);
    auto pCSO = pState->getCSO(pVars);
    // Apply the vars. Must be first because applyComputeVars() might cause a flush
    if (pVars)
    {
        if (applyComputeVars(pVars, pCSO->getDesc().getProgramKernels()->getRootSignature().get()) == false) return false;
    }
    else mpLowLevelData->getCommandList()->SetComputeRootSignature(RootSignature::getEmpty()->getApiHandle());
    mpLastBoundComputeVars = pVars;
    mpLowLevelData->getCommandList()->SetPipelineState(pCSO->getApiHandle());
    mCommandsPending = true;
    return true;
}





Add Discussion as Guest

Log in to DocsForge