class Buffer

The FidelityFX Cauldron Framework api/platform-agnostic representation of a buffer gpu resource.

File location: framework/cauldron/framework/inc/render/buffer.h

Typedefs

Type

Description

typedef void

(*ResizeFunction )( BufferDesc &, uint32_t, uint32_t, uint32_t, uint32_t )
Function signature for buffer ResizeFunction (when needed).

Methods

Return type

Description

const BufferDesc &

GetDesc () const
Gets a constant view on the buffer’s “BufferDesc“ description.

const GPUResource *

GetResource () const
Gets a constant pointer to the buffer’s underlaying “GPUResource“.

GPUResource *

Gets a modifiable pointer to the buffer’s underlaying “GPUResource“.

void

CopyData (const void* pData, size_t size) = 0
Copy callback used when loading buffer data. Implemented internally per api/platform.

void

CopyData ( const void* pData, size_t size, UploadContext * pUploadCtx, ResourceState postCopyState ) = 0

BufferAddressInfo

GetAddressInfo () const = 0
Gets the buffer’s “BufferAddressInfo“ for resource binding. Implemented internally per api/platform.

void

OnRenderingResolutionResize ( uint32_t outputWidth, uint32_t outputHeight, uint32_t renderingWidth, uint32_t renderingHeight )
Callback function executed on a buffer with resizing support to handle resourc recreation when size changes are needed.

static Buffer*

CreateBufferResource ( const BufferDesc * pDesc, ResourceState initialState, ResizeFunction fn = nullptr, void* customOwner = nullptr )
Buffer instance creation function. Implemented per api/platform to return the correct internal resource type.

Detailed description

The FidelityFX Cauldron Framework api/platform-agnostic representation of a buffer gpu resource.

The FidelityFX Cauldron Framework api/platform-agnostic representation of a dynamic buffer pool.

The dynamic resource pool is the allocation construct used to back all resource creation in FidelityFX Cauldron Framework.

Typedefs

ResizeFunction

Copied!

typedef void (*ResizeFunction )(
    BufferDesc &,
    uint32_t,
    uint32_t,
    uint32_t,
    uint32_t
    )

Function signature for buffer ResizeFunction (when needed).


Methods

GetDesc

Copied!

const BufferDesc & GetDesc () const

Gets a constant view on the buffer’s BufferDesc description.


GetResource

Copied!

const GPUResource * GetResource () const

Gets a constant pointer to the buffer’s underlaying GPUResource.


GetResource

Copied!

GPUResource * GetResource ()

Gets a modifiable pointer to the buffer’s underlaying GPUResource.


CopyData

Copied!

virtual void CopyData (const void* pData, size_t size) = 0

Copy callback used when loading buffer data. Implemented internally per api/platform.


GetAddressInfo

Copied!

virtual BufferAddressInfo  GetAddressInfo () const = 0

Gets the buffer’s BufferAddressInfo for resource binding. Implemented internally per api/platform.


OnRenderingResolutionResize

Copied!

void OnRenderingResolutionResize (
    uint32_t outputWidth,
    uint32_t outputHeight,
    uint32_t renderingWidth,
    uint32_t renderingHeight
)

Callback function executed on a buffer with resizing support to handle resourc recreation when size changes are needed.


CreateBufferResource

Copied!

static Buffer* CreateBufferResource (
    const BufferDesc * pDesc,
    ResourceState  initialState,
    ResizeFunction  fn = nullptr,
    void* customOwner = nullptr
)

Buffer instance creation function. Implemented per api/platform to return the correct internal resource type.


Related pages

  • Visit the FidelityFX SDK product page for download links and more information.

Looking for more documentation on GPUOpen?

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNAâ„¢ 2 GPUs, AMD Ryzenâ„¢ CPUs, and so much more.

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!