跳至内容

SDKWrapper

SDKWrapper

函数

ffxGetScratchMemorySize

size_t ffxGetScratchMemorySize(size_t maxContexts)

查询后端所需的暂存缓冲区内存量。

参数

名称类型默认
maxContextssize_t

返回: size_t

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 55 行, 第 16 列)

ffxGetInterface

FfxErrorCode ffxGetInterface(FfxInterface *backendInterface, cauldron::Device *device, void *scratchBuffer, size_t scratchBufferSize, size_t maxContexts)

使用后端的函数指针初始化 FfxInterface。

参数

名称类型默认
backendInterfaceFfxInterface *
devicecauldron::Device *
scratchBuffervoid *
scratchBufferSizesize_t
maxContextssize_t

返回值: FfxErrorCode

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 59 行, 第 16 列)

ffxGetCommandList

FfxCommandList ffxGetCommandList(cauldron::CommandList *cauldronCmdList)

从 CommandList 创建 FfxCommandList。

参数

名称类型默认
cauldronCmdListcauldron::CommandList *

返回值: FfxCommandList

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 63 行, 第 16 列)

ffxGetPipeline

FfxPipeline ffxGetPipeline(cauldron::PipelineObject *cauldronPipeline)

从 PipelineObject 创建 FfxPipeline。

参数

名称类型默认
cauldronPipelinecauldron::PipelineObject *

返回值: FfxPipeline

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 67 行, 第 16 列)

ffxGetResource

FfxResource ffxGetResource(const cauldron::GPUResource *cauldronResource, const wchar_t *name=nullptr, FfxResourceStates state=FFX_RESOURCE_STATE_COMPUTE_READ, FfxResourceUsage additionalUsages=(FfxResourceUsage) 0)

从 GPUResource 获取 FfxResource。

参数

名称类型默认
cauldronResourceconst cauldron::GPUResource *
nameconst wchar_t *nullptr
stateFfxResourceStatesFFX_RESOURCE_STATE_COMPUTE_READ
additionalUsagesFfxResourceUsage(FfxResourceUsage) 0

返回值: FfxResource

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 71 行, 第 16 列)

ffxReplaceSwapchainForFrameinterpolation

FfxErrorCode ffxReplaceSwapchainForFrameinterpolation(FfxCommandQueue gameQueue, FfxSwapchain &gameSwapChain, const void *replacementParameters)

为支持 FSR 3 帧插值,将当前交换链替换为提供的 FfxSwapchain。

参数

名称类型默认
gameQueueFfxCommandQueue
gameSwapChainFfxSwapchain &
replacementParametersconst void *

返回值: FfxErrorCode

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 117 行, 第 24 列)

ffxRegisterFrameinterpolationUiResource

FfxErrorCode ffxRegisterFrameinterpolationUiResource(FfxSwapchain gameSwapChain, FfxResource uiResource, uint32_t flags)

为支持 FSR 3 帧插值,使用提供的 FfxSwapchain 注册用于 UI 的 FfxResource。

参数

名称类型默认
gameSwapChainFfxSwapchain
uiResourceFfxResource
flagsuint32_t

返回值: FfxErrorCode

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 121 行, 第 24 列)

ffxGetInterpolationCommandlist

FfxErrorCode ffxGetInterpolationCommandlist(FfxSwapchain gameSwapChain, FfxCommandList &gameCommandlist)

为支持 FSR 3 帧插值,从 FfxSwapchain 获取 FfxCommandList。

参数

名称类型默认
gameSwapChainFfxSwapchain
gameCommandlistFfxCommandList &

返回值: FfxErrorCode

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 125 行, 第 24 列)

ffxGetSwapchain

FfxSwapchain ffxGetSwapchain(cauldron::SwapChain *pSwapChain)

从 Cauldron SwapChain 获取 FfxSwapchain。

参数

名称类型默认
pSwapChaincauldron::SwapChain *

返回值: FfxSwapchain

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 129 行, 第 24 列)

ffxGetCommandQueue

FfxCommandQueue ffxGetCommandQueue(cauldron::Device *pDevice)

从 Cauldron Device 获取 FfxCommandQueue。

参数

名称类型默认
pDevicecauldron::Device *

返回值: FfxCommandQueue

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 133 行, 第 24 列)

ffxGetResourceDescription

FfxResourceDescription ffxGetResourceDescription(cauldron::GPUResource *pResource)

从 Cauldron GPUResource 获取 FfxResourceDescription。

参数

名称类型默认
pResourcecauldron::GPUResource *

返回值: FfxResourceDescription

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 137 行, 第 24 列)

ffxGetFrameinterpolationTexture

FfxResource ffxGetFrameinterpolationTexture(FfxSwapchain ffxSwapChain)

为支持 FSR 3 帧插值,从 FfxSwapchain 获取代表后缓冲区的 FfxResource。

参数

名称类型默认
ffxSwapChainFfxSwapchain

返回值: FfxResource

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 141 行, 第 24 列)

ffxSetupFrameInterpolationSwapChain

void ffxSetupFrameInterpolationSwapChain()

为 FSR 3 插值配置交换链。

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 145 行, 第 24 列)

ffxRestoreApplicationSwapChain

void ffxRestoreApplicationSwapChain()

将交换链恢复到配置 FSR 3 插值之前的状态(请参阅 ffxSetupFrameInterpolationSwapChain)。

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 149 行, 第 24 列)

ffxAllocateConstantBuffer

FfxConstantAllocation ffxAllocateConstantBuffer(void *data, FfxUInt64 dataSize)

使用我们自己的分配器执行常量缓冲区分配。

参数

名称类型默认
datavoid *
dataSizeFfxUInt64

返回值: FfxConstantAllocation

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 154 行, 第 23 列)

GetFrameworkSurfaceFormat

static cauldron::ResourceFormat GetFrameworkSurfaceFormat(FfxSurfaceFormat format)

参数

名称类型默认
formatFfxSurfaceFormat

返回值: cauldron::ResourceFormat

属性: static

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 159 行, 第 33 列)

GetFrameworkResourceFlags

static cauldron::ResourceFlags GetFrameworkResourceFlags(FfxResourceUsage flags)

参数

名称类型默认
flagsFfxResourceUsage

返回值: cauldron::ResourceFlags

属性: static

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 225 行, 第 32 列)

GetFrameworkState

inline cauldron::ResourceState GetFrameworkState(FfxResourceStates state)

参数

名称类型默认
stateFfxResourceStates

返回值: cauldron::ResourceState

属性: inline

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 244 行, 第 32 列)

GetFrameworkTextureDescription

inline cauldron::TextureDesc GetFrameworkTextureDescription(FfxResourceDescription desc)

参数

名称类型默认
descFfxResourceDescription

返回值: cauldron::TextureDesc

属性: inline

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 276 行, 第 30 列)

GetFrameworkBufferDescription

inline cauldron::BufferDesc GetFrameworkBufferDescription(FfxResourceDescription desc)

参数

名称类型默认
descFfxResourceDescription

返回值: cauldron::BufferDesc

属性: inline

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 296 行, 第 29 列)

GetFfxSurfaceFormat

inline FfxSurfaceFormat GetFfxSurfaceFormat(cauldron::ResourceFormat format)

参数

名称类型默认
formatcauldron::ResourceFormat

返回值: FfxSurfaceFormat

属性: inline

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 450 行, 第 25 列)

GetFfxResourceDescription

inline FfxResourceDescription GetFfxResourceDescription(const cauldron::GPUResource *pResource, FfxResourceUsage additionalUsages)

参数

名称类型默认
pResourceconst cauldron::GPUResource *
additionalUsagesFfxResourceUsage

返回值: FfxResourceDescription

属性: inline

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 537 行, 第 31 列)

来源: framework/cauldron/framework/inc/core/backend_interface.h (第 50 行, 第 1 列)

© . This site is unofficial and not affiliated with AMD.