Function execute

Summary

#include <Source/Falcor/RenderGraph/BasePasses/ComputePass.h>

(1) void execute(ComputeContext *pContext, uint32_t nThreadX, uint32_t nThreadY, uint32_t nThreadZ=1)

(2) virtual void execute(ComputeContext *pContext, const uint3 &nThreads)

Function overload

Synopsis

#include <Source/Falcor/RenderGraph/BasePasses/ComputePass.h>

void execute(ComputeContext *pContext, uint32_t nThreadX, uint32_t nThreadY, uint32_t nThreadZ=1)

Description

Execute the pass using the given compute-context

Parameters:

[ in ] pContext - The compute context

[ in ] nThreadX - The number of threads to dispatch in the X dimension (note that this is not the number of thread groups)

[ in ] nThreadY - The number of threads to dispatch in the Y dimension (note that this is not the number of thread groups)

[ in ] nThreadZ - The number of threads to dispatch in the Z dimension (note that this is not the number of thread groups)

Source

Lines 54-60 in Source/Falcor/RenderGraph/BasePasses/ComputePass.cpp. Line 62 in Source/Falcor/RenderGraph/BasePasses/ComputePass.h.

void ComputePass::execute(ComputeContext* pContext, uint32_t nThreadX, uint32_t nThreadY, uint32_t nThreadZ)
{
    assert(mpVars);
    uint3 threadGroupSize = mpState->getProgram()->getReflector()->getThreadGroupSize();
    uint3 groups = div_round_up(uint3(nThreadX, nThreadY, nThreadZ), threadGroupSize);
    pContext->dispatch(mpState.get(), mpVars.get(), groups);
}

Synopsis

#include <Source/Falcor/RenderGraph/BasePasses/ComputePass.h>

virtual void execute(ComputeContext *pContext, const uint3 &nThreads)

Description

Execute the pass using the given compute-context

Parameters:

[ in ] pContext - The compute context

[ in ] nThreads - The number of threads to dispatch in the XYZ dimensions (note that this is not the number of thread groups)

Source

Lines 68-68 in Source/Falcor/RenderGraph/BasePasses/ComputePass.h.

virtual void execute(ComputeContext* pContext, const uint3& nThreads) { execute(pContext, nThreads.x, nThreads.y, nThreads.z); }





Add Discussion as Guest

Log in to DocsForge