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* |
CreateDevice ()
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 |
MaxSupportedShaderModel () const
Queries the highest supported shader model on the current device.
|
uint32_t |
GetMinWaveLaneCount () const
Gets the minimum wave lane count information for the current device.
|
uint32_t |
GetMaxWaveLaneCount () const
Gets the maximum wave lane count information for the current device.
|
void |
Flush all command queues.
|
BeginFrame ()
Runs the device through frame initialization, and returns a CommandList to record into for the duration of the frame.
|
|
void |
EndFrame ()
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* |
GetDriverVersion () const
Gets the current driver version (requires AGS be enabled).
|
const wchar_t* |
GetGraphicsAPI () const
Gets the graphics API in use.
|
const wchar_t* |
GetGraphicsAPIShort () const
Gets a short-form name for the used API.
|
const wchar_t* |
GetGraphicsAPIPretty () const
Gets a pretty-fied string to use to represent device name and API.
|
const wchar_t* |
GetGraphicsAPIVersion () const
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.
|
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 |
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 |
RegisterDeviceRemovedCallback ( DeviceRemovedCallback callback, void* customData )
Sets callback to call when device removed event occurs during presenting backbuffer.
|
bool |
GetAntiLag2FeatureSupported () const
Gets whether Anti-Lag 2.0 is available on the system.
|
bool |
GetAntiLag2Enabled () const
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 |
UpdateAntiLag2 () = 0
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
Device instance creation function. Implemented per api/platform to return the correct internal resource type.
FeatureSupported
Queries if a requested feature is supported.
GetFeatureInfo
Returns a feature information structure for features supporting feature queries.
MaxSupportedShaderModel
Queries the highest supported shader model on the current device.
GetMinWaveLaneCount
Gets the minimum wave lane count information for the current device.
GetMaxWaveLaneCount
Gets the maximum wave lane count information for the current device.
FlushAllCommandQueues
Flush all command queues.
BeginFrame
CommandList * BeginFrame ()
Runs the device through frame initialization, and returns a CommandList to record into for the duration of the frame.
EndFrame
Ends the current frame. Also closes the current frame’s CommandList and submits it to the device for execution.
SubmitCmdListBatch
void SubmitCmdListBatch (
std::vector<CommandList *>& cmdLists,
CommandQueue queueType,
bool isFirstSubmissionOfFrame
)
Submits batch of command lists to the device for execution.
GetDeviceName
Gets the current device name.
GetDriverVersion
Gets the current driver version (requires AGS be enabled).
GetGraphicsAPI
Gets the graphics API in use.
GetGraphicsAPIShort
Gets a short-form name for the used API.
GetGraphicsAPIPretty
Gets a pretty-fied string to use to represent device name and API.
GetGraphicsAPIVersion
Gets the current graphics API version (requires AGS be enabled).
FlushQueue
Flush the specified queue.
QueryPerformanceFrequency
Query the performance counter frequency on a given queue.
CreateCommandList
virtual CommandList * CreateCommandList (
const wchar_t* name,
CommandQueue queueType
) = 0
Creates a CommanList.
CreateSwapChain
virtual void CreateSwapChain (
SwapChain *& pSwapChain,
const SwapChainCreationParams& params,
CommandQueue queueType
) = 0
Creates a SwapChain.
PresentSwapChain
virtual uint64_t PresentSwapChain (SwapChain * pSwapChain) = 0
For SwapChain present and signaling (for synchronization).
SignalQueue
Used to signal a command queue.
QueryLastCompletedValue
Used to query the last completed signal on the command queue.
WaitOnQueue
Used to wait until a signal value has been processed.
ExecuteCommandLists
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
virtual void ExecuteCommandListsImmediate (
std::vector<CommandList *>& cmdLists,
CommandQueue queuType
) = 0
Similar to execute command list, but will wait until completion.
ExecuteResourceTransitionImmediate
virtual void ExecuteResourceTransitionImmediate (
uint32_t barrierCount,
const Barrier * pBarriers
) = 0
Transition a resource in place (blocking call).
ExecuteTextureResourceCopyImmediate
virtual void ExecuteTextureResourceCopyImmediate (
uint32_t resourceCopyCount,
const TextureCopyDesc * pCopyDescs
) = 0
Copy to a texture resource in place (blocking call).
SetVRSInfo
void SetVRSInfo (const VariableShadingRateInfo & variableShadingRateInfo)
Set VariableShadingRateInfo to use.
GetVRSInfo
const VariableShadingRateInfo * GetVRSInfo () const
Gets the currently set VariableShadingRateInfo.
RegisterDeviceRemovedCallback
void RegisterDeviceRemovedCallback (
DeviceRemovedCallback callback,
void* customData
)
Sets callback to call when device removed event occurs during presenting backbuffer.
GetAntiLag2FeatureSupported
Gets whether Anti-Lag 2.0 is available on the system.
GetAntiLag2Enabled
Gets the current state of Anti-Lag 2.0.
SetAntiLag2Enabled
Sets the current state of Anti-Lag 2.0.
SetAntiLag2FramerateLimiter
Sets the framerate limiter for Anti-Lag 2.0. Zero disables the limiter.
UpdateAntiLag2
Update Anti-Lag 2.0 state.
GetImpl
Gets the internal implementation for api/platform parameter accessors.