SDK Types

Structure and enumeration definitions used by the FidelityFX SDK.

Typedefs

Type

Description

typedef void*

A typedef representing the graphics device.

typedef void*

A typedef representing a command list or command buffer.

typedef void*

A typedef for a root signature.

typedef void*

A typedef for a command signature, used for indirect workloads.

typedef void*

A typedef for a pipeline state object.

typedef void*

(*FfxAllocFunc )(size_t size)
Allocate block of memory.

typedef void*

(*FfxReallocFunc )( void *ptr, size_t size )
Reallocate block of memory.

typedef void

(*FfxFreeFunc )(void *ptr)
Free block of memory.

typedef FfxConstantAllocation

(*FfxConstantBufferAllocator )( void *data, const FfxUInt64 dataSize )
A function definition for a constant buffer allocation callback.

Enumerations

Name

Description

FfxAddressMode

The address mode used when reading a texture.
FFX_ADDRESS_MODE_WRAP – Wrap when reading texture.
FFX_ADDRESS_MODE_MIRROR – Mirror when reading texture.
FFX_ADDRESS_MODE_CLAMP – Clamp when reading texture.
FFX_ADDRESS_MODE_BORDER – Border color when reading texture.
FFX_ADDRESS_MODE_MIRROR_ONCE – Mirror once when reading texture.

FfxBarrierType

An enumeration for barrier types.
FFX_BARRIER_TYPE_TRANSITION = 0
FFX_BARRIER_TYPE_UAV

FfxBindStage

An enumeration for view binding stages.
FFX_BIND_PIXEL_SHADER_STAGE = 1 << 0
FFX_BIND_VERTEX_SHADER_STAGE = 1 << 1
FFX_BIND_COMPUTE_SHADER_STAGE = 1 << 2

FfxDescriptiorType

An enumeration for various descriptor types.
FFX_DESCRIPTOR_TEXTURE_SRV = 0
FFX_DESCRIPTOR_BUFFER_SRV
FFX_DESCRIPTOR_TEXTURE_UAV
FFX_DESCRIPTOR_BUFFER_UAV

FfxEffect

An enumeration of all the effects which constitute the FidelityFX SDK.
FFX_EFFECT_FSR2 = 0 – FidelityFX Super Resolution v2.
FFX_EFFECT_FSR1 – FidelityFX Super Resolution.
FFX_EFFECT_SPD – FidelityFX Single Pass Downsampler.
FFX_EFFECT_BLUR – FidelityFX Blur.
FFX_EFFECT_BREADCRUMBS – FidelityFX Breadcrumbs.
FFX_EFFECT_BRIXELIZER – FidelityFX Brixelizer.
FFX_EFFECT_BRIXELIZER_GI – FidelityFX Brixelizer GI.
FFX_EFFECT_CACAO – FidelityFX Combined Adaptive Compute Ambient Occlusion.
FFX_EFFECT_CAS – FidelityFX Contrast Adaptive Sharpening.
FFX_EFFECT_DENOISER – FidelityFX Denoiser.
FFX_EFFECT_LENS – FidelityFX Lens.
FFX_EFFECT_PARALLEL_SORT – FidelityFX Parallel Sort.
FFX_EFFECT_SSSR – FidelityFX Stochastic Screen Space Reflections.
FFX_EFFECT_VARIABLE_SHADING – FidelityFX Variable Shading.
FFX_EFFECT_LPM – FidelityFX Luma Preserving Mapper.
FFX_EFFECT_DOF – FidelityFX Depth of Field.
FFX_EFFECT_CLASSIFIER – FidelityFX Classifier.
FFX_EFFECT_FSR3UPSCALER – FidelityFX Super Resolution v3.
FFX_EFFECT_FRAMEINTERPOLATION – FidelityFX Frame Interpolation, part of FidelityFX Super Resolution v3.
FFX_EFFECT_OPTICALFLOW – FidelityFX Optical Flow, part of FidelityFX Super Resolution v3.
FFX_EFFECT_SHAREDRESOURCES = 127 – FidelityFX Shared resources effect ID.
FFX_EFFECT_SHAREDAPIBACKEND = 128 – FidelityFX Shared backend context used with DLL API.

FfxFilterType

The type of filtering to perform when reading a texture.
FFX_FILTER_TYPE_MINMAGMIP_POINT – Point sampling.
FFX_FILTER_TYPE_MINMAGMIP_LINEAR – Sampling with interpolation.
FFX_FILTER_TYPE_MINMAGLINEARMIP_POINT – Use linear interpolation for minification and magnification; use point sampling for mip-level sampling.

FfxGpuJobType

An enumeration for different render job types.
FFX_GPU_JOB_CLEAR_FLOAT = 0 – The GPU job is performing a floating-point clear.
FFX_GPU_JOB_COPY = 1 – The GPU job is performing a copy.
FFX_GPU_JOB_COMPUTE = 2 – The GPU job is performing a compute dispatch.
FFX_GPU_JOB_BARRIER = 3 – The GPU job is performing a barrier.
FFX_GPU_JOB_DISCARD = 4 – The GPU job is performing a floating-point clear.

FfxHeapType

An enumeration for different heap types.
FFX_HEAP_TYPE_DEFAULT = 0 – Local memory.
FFX_HEAP_TYPE_UPLOAD – Heap used for uploading resources.
FFX_HEAP_TYPE_READBACK – Heap used for reading back resources.

FfxMsgType

An enumeration for message types that can be passed.
FFX_MESSAGE_TYPE_ERROR = 0
FFX_MESSAGE_TYPE_WARNING = 1
FFX_MESSAGE_TYPE_COUNT

FfxResourceDimension

An enumeration of surface dimensions.
FFX_RESOURCE_DIMENSION_TEXTURE_1D – A resource with a single dimension.
FFX_RESOURCE_DIMENSION_TEXTURE_2D – A resource with two dimensions.

FfxResourceFlags

An enumeration of surface dimensions.
FFX_RESOURCE_FLAGS_NONE = 0 – No flags.
FFX_RESOURCE_FLAGS_ALIASABLE = (1 << 0) – A bit indicating a resource does not need to persist across frames.
FFX_RESOURCE_FLAGS_UNDEFINED = (1 << 1) – Special case flag used internally when importing resources that require additional setup.

FfxResourceInitDataType

An enumeration for resource init data types that can be passed.
FFX_RESOURCE_INIT_DATA_TYPE_INVALID = 0
FFX_RESOURCE_INIT_DATA_TYPE_UNINITIALIZED
FFX_RESOURCE_INIT_DATA_TYPE_BUFFER
FFX_RESOURCE_INIT_DATA_TYPE_VALUE

FfxResourceStates

An enumeration of resource states.
FFX_RESOURCE_STATE_COMMON = (1 << 0)
FFX_RESOURCE_STATE_UNORDERED_ACCESS = (1 << 1) – Indicates a resource is in the state to be used as UAV.
FFX_RESOURCE_STATE_COMPUTE_READ = (1 << 2) – Indicates a resource is in the state to be read by compute shaders.
FFX_RESOURCE_STATE_PIXEL_READ = (1 << 3) – Indicates a resource is in the state to be read by pixel shaders.
FFX_RESOURCE_STATE_PIXEL_COMPUTE_READ = (FFX_RESOURCE_STATE_PIXEL_READ | FFX_RESOURCE_STATE_COMPUTE_READ) – Indicates a resource is in the state to be read by pixel or compute shaders.
FFX_RESOURCE_STATE_COPY_SRC = (1 << 4) – Indicates a resource is in the state to be used as source in a copy command.
FFX_RESOURCE_STATE_COPY_DEST = (1 << 5) – Indicates a resource is in the state to be used as destination in a copy command.
FFX_RESOURCE_STATE_GENERIC_READ = (FFX_RESOURCE_STATE_COPY_SRC | FFX_RESOURCE_STATE_COMPUTE_READ) – Indicates a resource is in generic (slow) read state.
FFX_RESOURCE_STATE_INDIRECT_ARGUMENT = (1 << 6) – Indicates a resource is in the state to be used as an indirect command argument.
FFX_RESOURCE_STATE_PRESENT = (1 << 7) – Indicates a resource is in the state to be used to present to the swap chain.
FFX_RESOURCE_STATE_RENDER_TARGET = (1 << 8) – Indicates a resource is in the state to be used as render target.

FfxResourceType

FFX_RESOURCE_TYPE_BUFFER – The resource is a buffer.
FFX_RESOURCE_TYPE_TEXTURE1D – The resource is a 1-dimensional texture.
FFX_RESOURCE_TYPE_TEXTURE2D – The resource is a 2-dimensional texture.
FFX_RESOURCE_TYPE_TEXTURE_CUBE – The resource is a cube map.
FFX_RESOURCE_TYPE_TEXTURE3D – The resource is a 3-dimensional texture.

FfxResourceUsage

An enumeration of resource usage.
FFX_RESOURCE_USAGE_READ_ONLY = 0 – No usage flags indicate a resource is read only.
FFX_RESOURCE_USAGE_RENDERTARGET = (1<<0) – Indicates a resource will be used as render target.
FFX_RESOURCE_USAGE_UAV = (1<<1) – Indicates a resource will be used as UAV.
FFX_RESOURCE_USAGE_DEPTHTARGET = (1<<2) – Indicates a resource will be used as depth target.
FFX_RESOURCE_USAGE_INDIRECT = (1<<3) – Indicates a resource will be used as indirect argument buffer.
FFX_RESOURCE_USAGE_ARRAYVIEW = (1<<4) – Indicates a resource that will generate array views. Works on 2D and cubemap textures.
FFX_RESOURCE_USAGE_DCC_RENDERTARGET = (1<<5) – Indicates a resource that should specify optimal render target memory access flags (for console use)

FfxResourceViewDimension

An enumeration of resource view dimensions.
FFX_RESOURCE_VIEW_DIMENSION_BUFFER – A resource view on a buffer.
FFX_RESOURCE_VIEW_DIMENSION_TEXTURE_1D – A resource view on a single dimension.
FFX_RESOURCE_VIEW_DIMENSION_TEXTURE_1D_ARRAY – A resource view on a single dimensional array.
FFX_RESOURCE_VIEW_DIMENSION_TEXTURE_2D – A resource view on two dimensions.
FFX_RESOURCE_VIEW_DIMENSION_TEXTURE_2D_ARRAY – A resource view on two dimensional array.
FFX_RESOURCE_VIEW_DIMENSION_TEXTURE_3D – A resource view on three dimensions.

FfxResourceViewType

An enumeration of all resource view types.
FFX_RESOURCE_VIEW_UNORDERED_ACCESS – The resource view is an unordered access view (UAV).
FFX_RESOURCE_VIEW_SHADER_READ – The resource view is a shader resource view (SRV).

FfxShaderModel

An enumeration of all supported shader models.
FFX_SHADER_MODEL_5_1 – Shader model 5.1.
FFX_SHADER_MODEL_6_0 – Shader model 6.0.
FFX_SHADER_MODEL_6_1 – Shader model 6.1.
FFX_SHADER_MODEL_6_2 – Shader model 6.2.
FFX_SHADER_MODEL_6_3 – Shader model 6.3.
FFX_SHADER_MODEL_6_4 – Shader model 6.4.
FFX_SHADER_MODEL_6_5 – Shader model 6.5.
FFX_SHADER_MODEL_6_6 – Shader model 6.6.
FFX_SHADER_MODEL_6_7 – Shader model 6.7.

FfxSurfaceFormat

An enumeration of surface formats.
FFX_SURFACE_FORMAT_UNKNOWN – Unknown format.
FFX_SURFACE_FORMAT_R32G32B32A32_TYPELESS – 32 bit per channel, 4 channel typeless format
FFX_SURFACE_FORMAT_R32G32B32A32_UINT – 32 bit per channel, 4 channel uint format
FFX_SURFACE_FORMAT_R32G32B32A32_FLOAT – 32 bit per channel, 4 channel float format
FFX_SURFACE_FORMAT_R16G16B16A16_FLOAT – 16 bit per channel, 4 channel float format
FFX_SURFACE_FORMAT_R32G32B32_FLOAT – 32 bit per channel, 3 channel float format
FFX_SURFACE_FORMAT_R32G32_FLOAT – 32 bit per channel, 2 channel float format
FFX_SURFACE_FORMAT_R8_UINT – 8 bit per channel, 1 channel float format
FFX_SURFACE_FORMAT_R32_UINT – 32 bit per channel, 1 channel float format
FFX_SURFACE_FORMAT_R8G8B8A8_TYPELESS – 8 bit per channel, 4 channel typeless format
FFX_SURFACE_FORMAT_R8G8B8A8_UNORM – 8 bit per channel, 4 channel unsigned normalized format
FFX_SURFACE_FORMAT_R8G8B8A8_SNORM – 8 bit per channel, 4 channel signed normalized format
FFX_SURFACE_FORMAT_R8G8B8A8_SRGB – 8 bit per channel, 4 channel srgb normalized
FFX_SURFACE_FORMAT_B8G8R8A8_TYPELESS – 8 bit per channel, 4 channel typeless format
FFX_SURFACE_FORMAT_B8G8R8A8_UNORM – 8 bit per channel, 4 channel unsigned normalized format
FFX_SURFACE_FORMAT_B8G8R8A8_SRGB – 8 bit per channel, 4 channel srgb normalized
FFX_SURFACE_FORMAT_R11G11B10_FLOAT – 32 bit 3 channel float format
FFX_SURFACE_FORMAT_R10G10B10A2_UNORM – 10 bit per 3 channel, 2 bit for 1 channel normalized format
FFX_SURFACE_FORMAT_R16G16_FLOAT – 16 bit per channel, 2 channel float format
FFX_SURFACE_FORMAT_R16G16_UINT – 16 bit per channel, 2 channel unsigned int format
FFX_SURFACE_FORMAT_R16G16_SINT – 16 bit per channel, 2 channel signed int format
FFX_SURFACE_FORMAT_R16_FLOAT – 16 bit per channel, 1 channel float format
FFX_SURFACE_FORMAT_R16_UINT – 16 bit per channel, 1 channel unsigned int format
FFX_SURFACE_FORMAT_R16_UNORM – 16 bit per channel, 1 channel unsigned normalized format
FFX_SURFACE_FORMAT_R16_SNORM – 16 bit per channel, 1 channel signed normalized format
FFX_SURFACE_FORMAT_R8_UNORM – 8 bit per channel, 1 channel unsigned normalized format
FFX_SURFACE_FORMAT_R8G8_UNORM – 8 bit per channel, 2 channel unsigned normalized format
FFX_SURFACE_FORMAT_R8G8_UINT – 8 bit per channel, 2 channel unsigned integer format
FFX_SURFACE_FORMAT_R32_FLOAT – 32 bit per channel, 1 channel float format
FFX_SURFACE_FORMAT_R9G9B9E5_SHAREDEXP – 9 bit per channel, 5 bit exponent format

Structs

Name

Description

FfxAllocationCallbacks

A structure encapsulating a set of allocation callbacks.

FfxBarrierDescription

A structure containing the data required to create a barrier.

FfxBreadcrumbsBlockData

Information about single AMD FidelityFX Breadcrumbs Library GPU memory block.

FfxClearFloatJobDescription

A structure describing a clear render job.

FfxComputeJobDescription

A structure describing a compute render job.

FfxConstantBuffer

A structure containing a constant buffer.

FfxCopyJobDescription

A structure describing a copy render job.

FfxCreateResourceDescription

A structure containing the data required to create a resource.

FfxDeviceCapabilities

A structure encapsulating a collection of device capabilities.

FfxDimensions2D

A structure encapsulating a 2-dimensional point, using 32bit unsigned integers.

FfxEffectBindlessConfig

A structure encapsulating the bindless descriptor configuration of an effect.

FfxFloatCoords2D

A structure encapsulating a 2-dimensional set of floating point coordinates.

FfxFrameGenerationDispatchDescription

A structure describing the parameters to pass to frame generation passes.

FfxGpuJobDescription

A structure describing a single render job.

FfxIntCoords2D

A structure encapsulating a 2-dimensional point.

FfxInternalResourceDescription

An internal structure housing all that is needed for backend resource descriptions.

FfxPipelineDescription

A structure containing the description used to create a “FfxPipeline“ structure.

FfxPipelineState

A structure encapsulating a single pass of an algorithm.

FfxPresentCallbackDescription

A structure describing the parameters passed from the presentation thread to the ui composition callback function.

FfxRect2D

A structure encapsulating a 2-dimensional rect.

FfxResource

An outward facing structure containing a resource.

FfxResourceBinding

A structure defining a resource bind point.

FfxResourceDescription

A structure describing a resource.

FfxResourceInitData

An structure housing all that is needed for resource initialization.

FfxResourceInternal

An internal structure containing a handle to a resource and resource views.

FfxRootConstantAllocation

A structure describing a constant buffer allocation.

FfxRootConstantDescription

A structure containing the data required to create root constant buffer mappings.

FfxSamplerDescription

A structure containing the data required to create sampler mappings.

FfxShaderBlob

A single shader blob and a description of its resources.

FfxStaticResourceDescription

A structure describing a static resource.

FfxViewDescription

A structure defining the view to create.

Macros

Name

Description

FFX_MUTEX std::mutex

FidelityFX mutex wrapper.

POPULATE_SHADER_BLOB_FFX (info, index)

Macro definition to copy header shader blob information into its SDK structural representation.

Detailed description

Structure and enumeration definitions used by the FidelityFX SDK.

Typedefs

FfxDevice

Copied!

typedef void* FfxDevice

A typedef representing the graphics device.


FfxCommandList

Copied!

typedef void* FfxCommandList

A typedef representing a command list or command buffer.


FfxRootSignature

Copied!

typedef void* FfxRootSignature

A typedef for a root signature.


FfxCommandSignature

Copied!

typedef void* FfxCommandSignature

A typedef for a command signature, used for indirect workloads.


FfxPipeline

Copied!

typedef void* FfxPipeline

A typedef for a pipeline state object.


FfxAllocFunc

Copied!

typedef void* (*FfxAllocFunc )(size_t size)

Allocate block of memory.

The callback function for requesting memory of provided size. size cannot be 0.

Parameters:

size

Size in bytes of memory to allocate.

Return values:

NULL

The operation failed.

Anything

else The operation completed successfully.


FfxReallocFunc

Copied!

typedef void* (*FfxReallocFunc )(
    void *ptr,
    size_t size
    )

Reallocate block of memory.

The callback function for reallocating provided block of memory to new location with specified size. When provided with NULL as ptr then it should behave as FfxBreadcrumbsAllocFunc. If the operation failed then contents of ptr cannot be changed. size cannot be 0.

Parameters:

ptr

A pointer to previous block of memory.

size

Size in bytes of memory to allocate.

Return values:

NULL

The operation failed.

Anything

else The operation completed successfully.


FfxFreeFunc

Copied!

typedef void (*FfxFreeFunc )(void *ptr)

Free block of memory.

The callback function for freeing provided block of memory. ptr cannot be NULL.

Parameters:

ptr

A pointer to block of memory.


FfxConstantBufferAllocator

Copied!

typedef FfxConstantAllocation (*FfxConstantBufferAllocator )(
    void *data,
    const FfxUInt64 dataSize
    )

A function definition for a constant buffer allocation callback.

Used to provide a constant buffer allocator to the calling backend

Parameters:

data

The constant buffer data.

dataSize

The size of the constant buffer data.


Macros

FFX_MUTEX

Copied!

#define FFX_MUTEX std::mutex

FidelityFX mutex wrapper.


POPULATE_SHADER_BLOB_FFX

Copied!

#define POPULATE_SHADER_BLOB_FFX (info, index)

Macro definition to copy header shader blob information into its SDK structural representation.