class GPUResource
The FidelityFX Cauldron Framework
api/platform-agnostic representation of a GPU resource.
File location: framework/cauldron/framework/inc/render/gpuresource.h
Methods
Return type |
Description |
---|---|
static GPUResource* |
CreateGPUResource ( const wchar_t* resourceName, void* pOwner, ResourceState initialState, void* pInitParams, bool resizable = false )
GPUResource instance creation function. Implemented per api/platform to return the correct internal resource type.
|
static GPUResource* |
GetWrappedResourceFromSDK ( const wchar_t* name, void* pSDKResource, const TextureDesc * pDesc, ResourceState initialState )
Creates a framework resource from a FidelityFX SDK resource. This resource must be manually destroyed after use by the caller.
|
static GPUResource* |
GetWrappedResourceFromSDK ( const wchar_t* name, void* pSDKResource, const BufferDesc * pDesc, ResourceState initialState )
Creates a framework resource from a FidelityFX SDK resource. This resource must be manually destroyed after use by the caller.
|
static void |
ReleaseWrappedResource (GPUResource* pResource)
Releases sdk-backed resource.
|
bool |
IsResizable () const
Returns true if the resource is resizable, false otherwise.
|
const wchar_t* |
GetName () const
Returns the resource’s name.
|
bool |
IsTexture () const
Returns true if the resource is a “Texture“.
|
bool |
IsBuffer () const
Returns true if the resource is a “Buffer“.
|
bool |
IsCopyBuffer () const
Returns true if the resource is a “CopyBuffer“.
|
bool |
IsEmptyResource () const
Returns true if the resource is not owned by anyone.
|
void |
SetOwner (void* pOwner) = 0
Sets the GPUResource’s owner. This is either a Buffer, Texture, or CopyBuffer resource.
|
const Texture * |
GetTextureResource () const
Returns the resource “Texture“ pointer if the resource is a texture. Returns nullptr otherwise.
|
const Buffer * |
GetBufferResource () const
Returns the resource “Buffer“ pointer if the resource is a buffer. Returns nullptr otherwise.
|
void* |
GetBreadcrumbsResource () const
|
const GPUResourceInternal* |
GetImpl () const = 0
Gets the internal implementation for api/platform parameter accessors.
|
GPUResourceInternal* |
GetImpl () = 0
|
ResourceState |
GetCurrentResourceState (uint32_t subResource = 0xffffffff) const
Returns the current ResourceState the GPU resource is in.
|
void |
SetCurrentResourceState ( ResourceState newState, uint32_t subResource = 0xffffffff )
Sets the GPU resource’s ResourceState.
|
Detailed description
The FidelityFX Cauldron Framework
api/platform-agnostic representation of a GPU resource.
Methods
CreateGPUResource
GPUResource instance creation function. Implemented per api/platform to return the correct internal resource type.
GetWrappedResourceFromSDK
static GPUResource* GetWrappedResourceFromSDK (
const wchar_t* name,
void* pSDKResource,
const TextureDesc * pDesc,
ResourceState initialState
)
Creates a framework resource from a FidelityFX SDK resource. This resource must be manually destroyed after use by the caller.
GetWrappedResourceFromSDK
static GPUResource* GetWrappedResourceFromSDK (
const wchar_t* name,
void* pSDKResource,
const BufferDesc * pDesc,
ResourceState initialState
)
Creates a framework resource from a FidelityFX SDK resource. This resource must be manually destroyed after use by the caller.
ReleaseWrappedResource
Releases sdk-backed resource.
IsResizable
Returns true if the resource is resizable, false otherwise.
GetName
Returns the resource’s name.
IsTexture
Returns true if the resource is a Texture
.
IsBuffer
Returns true if the resource is a Buffer
.
IsCopyBuffer
Returns true if the resource is a CopyBuffer
.
IsEmptyResource
Returns true if the resource is not owned by anyone.
SetOwner
Sets the GPUResource’s owner. This is either a Buffer, Texture, or CopyBuffer resource.
GetTextureResource
const Texture * GetTextureResource () const
Returns the resource Texture
pointer if the resource is a texture. Returns nullptr otherwise.
GetBufferResource
const Buffer * GetBufferResource () const
Returns the resource Buffer
pointer if the resource is a buffer. Returns nullptr otherwise.
GetImpl
Gets the internal implementation for api/platform parameter accessors.
GetCurrentResourceState
Returns the current ResourceState the GPU resource is in.
SetCurrentResourceState
Sets the GPU resource’s ResourceState.