class Device

The FidelityFX Cauldron Framework api/platform-agnostic representation of the rendering device.

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

Methods

Return type

Description

static Device*

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

bool

FeatureSupported (DeviceFeature requestedFeature) const
Queries if a requested feature is supported.

void

GetFeatureInfo (DeviceFeature feature, void* pFeatureInfo) = 0
Returns a feature information structure for features supporting feature queries.

ShaderModel

Queries the highest supported shader model on the current device.

uint32_t

Gets the minimum wave lane count information for the current device.

uint32_t

Gets the maximum wave lane count information for the current device.

void

Flush all command queues.

CommandList *

Runs the device through frame initialization, and returns a CommandList to record into for the duration of the frame.

void

Ends the current frame. Also closes the current frame’s CommandList and submits it to the device for execution.

void

SubmitCmdListBatch ( std::vector<CommandList *>& cmdLists, CommandQueue queueType, bool isFirstSubmissionOfFrame )
Submits batch of command lists to the device for execution.

const wchar_t*

GetDeviceName () const
Gets the current device name.

const wchar_t*

Gets the current driver version (requires AGS be enabled).

const wchar_t*

Gets the graphics API in use.

const wchar_t*

Gets a short-form name for the used API.

const wchar_t*

Gets a pretty-fied string to use to represent device name and API.

const wchar_t*

Gets the current graphics API version (requires AGS be enabled).

void

FlushQueue (CommandQueue queueType) = 0
Flush the specified queue.

uint64_t

QueryPerformanceFrequency (CommandQueue queueType) = 0
Query the performance counter frequency on a given queue.

CommandList *

CreateCommandList (const wchar_t* name, CommandQueue queueType) = 0
Creates a CommanList.

void

CreateSwapChain ( SwapChain *& pSwapChain, const SwapChainCreationParams& params, CommandQueue queueType ) = 0
Creates a SwapChain.

uint64_t

PresentSwapChain (SwapChain * pSwapChain) = 0
For SwapChain present and signaling (for synchronization).

uint64_t

SignalQueue (CommandQueue queueType) = 0
Used to signal a command queue.

uint64_t

QueryLastCompletedValue (CommandQueue queueType) = 0
Used to query the last completed signal on the command queue.

void

WaitOnQueue (uint64_t waitValue, CommandQueue queueType) const = 0
Used to wait until a signal value has been processed.

uint64_t

ExecuteCommandLists ( std::vector<CommandList *>& cmdLists, CommandQueue queuType, bool isFirstSubmissionOfFrame = false, bool isLastSubmissionOfFrame = false ) = 0
Execute the provided command lists, returns a signal ID that can be used to query completion.

void

ExecuteCommandListsImmediate ( std::vector<CommandList *>& cmdLists, CommandQueue queuType ) = 0
Similar to execute command list, but will wait until completion.

void

ExecuteResourceTransitionImmediate ( uint32_t barrierCount, const Barrier * pBarriers ) = 0
Transition a resource in place (blocking call).

void

ExecuteTextureResourceCopyImmediate ( uint32_t resourceCopyCount, const TextureCopyDesc * pCopyDescs ) = 0
Copy to a texture resource in place (blocking call).

void

SetVRSInfo (const VariableShadingRateInfo & variableShadingRateInfo)
Set VariableShadingRateInfo to use.

const VariableShadingRateInfo *

GetVRSInfo () const
Gets the currently set VariableShadingRateInfo.

void

Sets callback to call when device removed event occurs during presenting backbuffer.

bool

Gets whether Anti-Lag 2.0 is available on the system.

bool

Gets the current state of Anti-Lag 2.0.

void

SetAntiLag2Enabled (bool enable)
Sets the current state of Anti-Lag 2.0.

void

SetAntiLag2FramerateLimiter (uint32_t maxFPS)
Sets the framerate limiter for Anti-Lag 2.0. Zero disables the limiter.

void

Update Anti-Lag 2.0 state.

const DeviceInternal*

GetImpl () const = 0
Gets the internal implementation for api/platform parameter accessors.

DeviceInternal*

GetImpl () = 0

Detailed description

The FidelityFX Cauldron Framework api/platform-agnostic representation of the rendering device.

Methods

CreateDevice

Copied!

static Device* CreateDevice ()

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


FeatureSupported

Copied!

bool FeatureSupported (DeviceFeature  requestedFeature) const

Queries if a requested feature is supported.


GetFeatureInfo

Copied!

virtual void GetFeatureInfo (DeviceFeature  feature, void* pFeatureInfo) = 0

Returns a feature information structure for features supporting feature queries.


MaxSupportedShaderModel

Copied!

ShaderModel  MaxSupportedShaderModel () const

Queries the highest supported shader model on the current device.


GetMinWaveLaneCount

Copied!

uint32_t GetMinWaveLaneCount () const

Gets the minimum wave lane count information for the current device.


GetMaxWaveLaneCount

Copied!

uint32_t GetMaxWaveLaneCount () const

Gets the maximum wave lane count information for the current device.


FlushAllCommandQueues

Copied!

void FlushAllCommandQueues ()

Flush all command queues.


BeginFrame

Copied!

CommandList * BeginFrame ()

Runs the device through frame initialization, and returns a CommandList to record into for the duration of the frame.


EndFrame

Copied!

void EndFrame ()

Ends the current frame. Also closes the current frame’s CommandList and submits it to the device for execution.


SubmitCmdListBatch

Copied!

void SubmitCmdListBatch (
    std::vector<CommandList *>& cmdLists,
    CommandQueue  queueType,
    bool isFirstSubmissionOfFrame
)

Submits batch of command lists to the device for execution.


GetDeviceName

Copied!

const wchar_t* GetDeviceName () const

Gets the current device name.


GetDriverVersion

Copied!

const wchar_t* GetDriverVersion () const

Gets the current driver version (requires AGS be enabled).


GetGraphicsAPI

Copied!

const wchar_t* GetGraphicsAPI () const

Gets the graphics API in use.


GetGraphicsAPIShort

Copied!

const wchar_t* GetGraphicsAPIShort () const

Gets a short-form name for the used API.


GetGraphicsAPIPretty

Copied!

const wchar_t* GetGraphicsAPIPretty () const

Gets a pretty-fied string to use to represent device name and API.


GetGraphicsAPIVersion

Copied!

const wchar_t* GetGraphicsAPIVersion () const

Gets the current graphics API version (requires AGS be enabled).


FlushQueue

Copied!

virtual void FlushQueue (CommandQueue  queueType) = 0

Flush the specified queue.


QueryPerformanceFrequency

Copied!

virtual uint64_t QueryPerformanceFrequency (CommandQueue  queueType) = 0

Query the performance counter frequency on a given queue.


CreateCommandList

Copied!

virtual CommandList * CreateCommandList (
    const wchar_t* name,
    CommandQueue  queueType
) = 0

Creates a CommanList.


CreateSwapChain

Copied!

virtual void CreateSwapChain (
    SwapChain *& pSwapChain,
    const SwapChainCreationParams& params,
    CommandQueue  queueType
) = 0

Creates a SwapChain.


PresentSwapChain

Copied!

virtual uint64_t PresentSwapChain (SwapChain * pSwapChain) = 0

For SwapChain present and signaling (for synchronization).


SignalQueue

Copied!

virtual uint64_t SignalQueue (CommandQueue  queueType) = 0

Used to signal a command queue.


QueryLastCompletedValue

Copied!

virtual uint64_t QueryLastCompletedValue (CommandQueue  queueType) = 0

Used to query the last completed signal on the command queue.


WaitOnQueue

Copied!

virtual void WaitOnQueue (uint64_t waitValue, CommandQueue  queueType) const = 0

Used to wait until a signal value has been processed.


ExecuteCommandLists

Copied!

virtual uint64_t ExecuteCommandLists (
    std::vector<CommandList *>& cmdLists,
    CommandQueue  queuType,
    bool isFirstSubmissionOfFrame = false,
    bool isLastSubmissionOfFrame = false
) = 0

Execute the provided command lists, returns a signal ID that can be used to query completion.


ExecuteCommandListsImmediate

Copied!

virtual void ExecuteCommandListsImmediate (
    std::vector<CommandList *>& cmdLists,
    CommandQueue  queuType
) = 0

Similar to execute command list, but will wait until completion.


ExecuteResourceTransitionImmediate

Copied!

virtual void ExecuteResourceTransitionImmediate (
    uint32_t barrierCount,
    const Barrier * pBarriers
) = 0

Transition a resource in place (blocking call).


ExecuteTextureResourceCopyImmediate

Copied!

virtual void ExecuteTextureResourceCopyImmediate (
    uint32_t resourceCopyCount,
    const TextureCopyDesc * pCopyDescs
) = 0

Copy to a texture resource in place (blocking call).


SetVRSInfo

Copied!

void SetVRSInfo (const VariableShadingRateInfo & variableShadingRateInfo)

Set VariableShadingRateInfo to use.


GetVRSInfo

Copied!

const VariableShadingRateInfo * GetVRSInfo () const

Gets the currently set VariableShadingRateInfo.


RegisterDeviceRemovedCallback

Copied!

void RegisterDeviceRemovedCallback (
    DeviceRemovedCallback  callback,
    void* customData
)

Sets callback to call when device removed event occurs during presenting backbuffer.


GetAntiLag2FeatureSupported

Copied!

bool GetAntiLag2FeatureSupported () const

Gets whether Anti-Lag 2.0 is available on the system.


GetAntiLag2Enabled

Copied!

bool GetAntiLag2Enabled () const

Gets the current state of Anti-Lag 2.0.


SetAntiLag2Enabled

Copied!

void SetAntiLag2Enabled (bool enable)

Sets the current state of Anti-Lag 2.0.


SetAntiLag2FramerateLimiter

Copied!

void SetAntiLag2FramerateLimiter (uint32_t maxFPS)

Sets the framerate limiter for Anti-Lag 2.0. Zero disables the limiter.


UpdateAntiLag2

Copied!

virtual void UpdateAntiLag2 () = 0

Update Anti-Lag 2.0 state.


GetImpl

Copied!

virtual const DeviceInternal* GetImpl () const = 0

Gets the internal implementation for api/platform parameter accessors.