AMD GPU Services (AGS)
Classes | Typedefs | Enumerations | Functions
Device creation and cleanup

It is now mandatory to call agsDriverExtensionsDX11_CreateDevice when creating a device if the user wants to access any DX11 AMD extensions. The corresponding agsDriverExtensionsDX11_DestroyDevice call must be called to release the device and free up the internal resources allocated by the create call. More...

Classes

struct  AGSDX11DeviceCreationParams
 The struct to specify the existing DX11 device creation parameters. More...
 
struct  AGSDX11ExtensionParams
 The struct to specify DX11 additional device creation parameters. More...
 
struct  AGSDX11ReturnedParams
 The struct to hold all the returned parameters from the device creation call. More...
 

Typedefs

typedef enum AGSCrossfireMode AGSCrossfireMode
 The different modes to control Crossfire behavior.
 
typedef struct AGSDX11DeviceCreationParams AGSDX11DeviceCreationParams
 The struct to specify the existing DX11 device creation parameters.
 
typedef struct AGSDX11ExtensionParams AGSDX11ExtensionParams
 The struct to specify DX11 additional device creation parameters.
 
typedef struct AGSDX11ReturnedParams AGSDX11ReturnedParams
 The struct to hold all the returned parameters from the device creation call.
 

Enumerations

enum  AGSCrossfireMode { AGS_CROSSFIRE_MODE_DRIVER_AFR = 0, AGS_CROSSFIRE_MODE_EXPLICIT_AFR, AGS_CROSSFIRE_MODE_DISABLE }
 The different modes to control Crossfire behavior. More...
 

Functions

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateDevice (AGSContext *context, const AGSDX11DeviceCreationParams *creationParams, const AGSDX11ExtensionParams *extensionParams, AGSDX11ReturnedParams *returnedParams)
 Function used to create a D3D11 device with additional AMD-specific initialization parameters. More...
 
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_DestroyDevice (AGSContext *context, ID3D11Device *device, unsigned int *deviceReferences, ID3D11DeviceContext *immediateContext, unsigned int *immediateContextReferences)
 Function to destroy the D3D11 device and its immediate context. More...
 

Detailed Description

It is now mandatory to call agsDriverExtensionsDX11_CreateDevice when creating a device if the user wants to access any DX11 AMD extensions. The corresponding agsDriverExtensionsDX11_DestroyDevice call must be called to release the device and free up the internal resources allocated by the create call.

Enumeration Type Documentation

◆ AGSCrossfireMode

The different modes to control Crossfire behavior.

Enumerator
AGS_CROSSFIRE_MODE_DRIVER_AFR 

Use the default driver-based AFR rendering. If this mode is specified, do NOT use the agsDriverExtensionsDX11_Create*() APIs to create resources.

AGS_CROSSFIRE_MODE_EXPLICIT_AFR 

Use the AGS Crossfire API functions to perform explicit AFR rendering without requiring a CF driver profile.

AGS_CROSSFIRE_MODE_DISABLE 

Completely disable AFR rendering.

Function Documentation

◆ agsDriverExtensionsDX11_CreateDevice()

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateDevice ( AGSContext *  context,
const AGSDX11DeviceCreationParams creationParams,
const AGSDX11ExtensionParams extensionParams,
AGSDX11ReturnedParams returnedParams 
)

Function used to create a D3D11 device with additional AMD-specific initialization parameters.

When using the HLSL shader extensions please note:

  • The shader compiler should not use the D3DCOMPILE_SKIP_OPTIMIZATION (/Od) option, otherwise it will not work.
  • The shader compiler needs D3DCOMPILE_ENABLE_STRICTNESS (/Ges) enabled.
Parameters
[in]contextPointer to a context. This is generated by agsInitialize
[in]creationParamsPointer to the struct to specify the existing DX11 device creation parameters.
[in]extensionParamsOptional pointer to the struct to specify DX11 additional device creation parameters.
[out]returnedParamsPointer to struct to hold all the returned parameters from the call.

◆ agsDriverExtensionsDX11_DestroyDevice()

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_DestroyDevice ( AGSContext *  context,
ID3D11Device *  device,
unsigned int *  deviceReferences,
ID3D11DeviceContext *  immediateContext,
unsigned int *  immediateContextReferences 
)

Function to destroy the D3D11 device and its immediate context.

This call will also cleanup any AMD-specific driver extensions for D3D11.

Parameters
[in]contextPointer to a context.
[in]devicePointer to the D3D11 device.
[out]deviceReferencesOptional pointer to an unsigned int that will be set to the value returned from device->Release().
[in]immediateContextPointer to the D3D11 immediate device context.
[out]immediateContextReferencesOptional pointer to an unsigned int that will be set to the value returned from immediateContext->Release().