AMD GPU Services (AGS)
Typedefs | Enumerations | Functions
Explicit Crossfire API

API for explicit control over Crossfire. More...

Typedefs

typedef enum AGSAfrTransferType AGSAfrTransferType
 The Crossfire API transfer types.
 
typedef enum AGSAfrTransferEngine AGSAfrTransferEngine
 The Crossfire API transfer engines.
 

Enumerations

enum  AGSAfrTransferType {
  AGS_AFR_TRANSFER_DEFAULT = 0, AGS_AFR_TRANSFER_DISABLE = 1, AGS_AFR_TRANSFER_1STEP_P2P = 2, AGS_AFR_TRANSFER_2STEP_NO_BROADCAST = 3,
  AGS_AFR_TRANSFER_2STEP_WITH_BROADCAST = 4
}
 The Crossfire API transfer types. More...
 
enum  AGSAfrTransferEngine { AGS_AFR_TRANSFERENGINE_DEFAULT = 0, AGS_AFR_TRANSFERENGINE_3D_ENGINE = 1, AGS_AFR_TRANSFERENGINE_COPY_ENGINE = 2 }
 The Crossfire API transfer engines. More...
 

Functions

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateBuffer (AGSContext *context, const D3D11_BUFFER_DESC *desc, const D3D11_SUBRESOURCE_DATA *initialData, ID3D11Buffer **buffer, AGSAfrTransferType transferType, AGSAfrTransferEngine transferEngine)
 Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine. More...
 
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateTexture1D (AGSContext *context, const D3D11_TEXTURE1D_DESC *desc, const D3D11_SUBRESOURCE_DATA *initialData, ID3D11Texture1D **texture1D, AGSAfrTransferType transferType, AGSAfrTransferEngine transferEngine)
 Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine. More...
 
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateTexture2D (AGSContext *context, const D3D11_TEXTURE2D_DESC *desc, const D3D11_SUBRESOURCE_DATA *initialData, ID3D11Texture2D **texture2D, AGSAfrTransferType transferType, AGSAfrTransferEngine transferEngine)
 Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine. More...
 
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateTexture3D (AGSContext *context, const D3D11_TEXTURE3D_DESC *desc, const D3D11_SUBRESOURCE_DATA *initialData, ID3D11Texture3D **texture3D, AGSAfrTransferType transferType, AGSAfrTransferEngine transferEngine)
 Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine. More...
 
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NotifyResourceEndWrites (AGSContext *context, ID3D11Resource *resource, const D3D11_RECT *transferRegions, const unsigned int *subresourceArray, unsigned int numSubresources)
 Function to notify the driver that we have finished writing to the resource this frame. More...
 
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NotifyResourceBeginAllAccess (AGSContext *context, ID3D11Resource *resource)
 This will notify the driver that the app will begin read/write access to the resource. More...
 
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NotifyResourceEndAllAccess (AGSContext *context, ID3D11Resource *resource)
 This is used for AGS_AFR_TRANSFER_1STEP_P2P to notify when it is safe to initiate a transfer. More...
 

Detailed Description

API for explicit control over Crossfire.

Enumeration Type Documentation

◆ AGSAfrTransferEngine

The Crossfire API transfer engines.

Enumerator
AGS_AFR_TRANSFERENGINE_DEFAULT 

Use default engine for Crossfire API transfers.

AGS_AFR_TRANSFERENGINE_3D_ENGINE 

Use 3D engine for Crossfire API transfers.

AGS_AFR_TRANSFERENGINE_COPY_ENGINE 

Use Copy engine for Crossfire API transfers.

◆ AGSAfrTransferType

The Crossfire API transfer types.

Enumerator
AGS_AFR_TRANSFER_DEFAULT 

Default Crossfire driver resource tracking.

AGS_AFR_TRANSFER_DISABLE 

Turn off driver resource tracking.

AGS_AFR_TRANSFER_1STEP_P2P 

App controlled GPU to next GPU transfer.

AGS_AFR_TRANSFER_2STEP_NO_BROADCAST 

App controlled GPU to next GPU transfer using intermediate system memory.

AGS_AFR_TRANSFER_2STEP_WITH_BROADCAST 

App controlled GPU to all render GPUs transfer using intermediate system memory.

Function Documentation

◆ agsDriverExtensionsDX11_CreateBuffer()

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateBuffer ( AGSContext *  context,
const D3D11_BUFFER_DESC *  desc,
const D3D11_SUBRESOURCE_DATA *  initialData,
ID3D11Buffer **  buffer,
AGSAfrTransferType  transferType,
AGSAfrTransferEngine  transferEngine 
)

Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine.

Parameters
[in]contextPointer to a context.
[in]descPointer to the D3D11 resource description.
[in]initialDataOptional pointer to the initializing data for the resource.
[out]bufferReturned pointer to the resource.
[in]transferTypeThe transfer behavior.
[in]transferEngineThe transfer engine to use.

◆ agsDriverExtensionsDX11_CreateTexture1D()

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateTexture1D ( AGSContext *  context,
const D3D11_TEXTURE1D_DESC *  desc,
const D3D11_SUBRESOURCE_DATA *  initialData,
ID3D11Texture1D **  texture1D,
AGSAfrTransferType  transferType,
AGSAfrTransferEngine  transferEngine 
)

Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine.

Parameters
[in]contextPointer to a context.
[in]descPointer to the D3D11 resource description.
[in]initialDataOptional pointer to the initializing data for the resource.
[out]texture1DReturned pointer to the resource.
[in]transferTypeThe transfer behavior.
[in]transferEngineThe transfer engine to use.

◆ agsDriverExtensionsDX11_CreateTexture2D()

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateTexture2D ( AGSContext *  context,
const D3D11_TEXTURE2D_DESC *  desc,
const D3D11_SUBRESOURCE_DATA *  initialData,
ID3D11Texture2D **  texture2D,
AGSAfrTransferType  transferType,
AGSAfrTransferEngine  transferEngine 
)

Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine.

Parameters
[in]contextPointer to a context.
[in]descPointer to the D3D11 resource description.
[in]initialDataOptional pointer to the initializing data for the resource.
[out]texture2DReturned pointer to the resource.
[in]transferTypeThe transfer behavior.
[in]transferEngineThe transfer engine to use.

◆ agsDriverExtensionsDX11_CreateTexture3D()

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateTexture3D ( AGSContext *  context,
const D3D11_TEXTURE3D_DESC *  desc,
const D3D11_SUBRESOURCE_DATA *  initialData,
ID3D11Texture3D **  texture3D,
AGSAfrTransferType  transferType,
AGSAfrTransferEngine  transferEngine 
)

Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine.

Parameters
[in]contextPointer to a context.
[in]descPointer to the D3D11 resource description.
[in]initialDataOptional pointer to the initializing data for the resource.
[out]texture3DReturned pointer to the resource.
[in]transferTypeThe transfer behavior.
[in]transferEngineThe transfer engine to use.

◆ agsDriverExtensionsDX11_NotifyResourceBeginAllAccess()

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NotifyResourceBeginAllAccess ( AGSContext *  context,
ID3D11Resource *  resource 
)

This will notify the driver that the app will begin read/write access to the resource.

Parameters
[in]contextPointer to a context.
[in]resourcePointer to the resource.

◆ agsDriverExtensionsDX11_NotifyResourceEndAllAccess()

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NotifyResourceEndAllAccess ( AGSContext *  context,
ID3D11Resource *  resource 
)

This is used for AGS_AFR_TRANSFER_1STEP_P2P to notify when it is safe to initiate a transfer.

This call in frame N-(NumGpus-1) allows a 1 step P2P in frame N to start. This should be called after agsDriverExtensionsDX11_NotifyResourceEndWrites.

Parameters
[in]contextPointer to a context.
[in]resourcePointer to the resource.

◆ agsDriverExtensionsDX11_NotifyResourceEndWrites()

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NotifyResourceEndWrites ( AGSContext *  context,
ID3D11Resource *  resource,
const D3D11_RECT *  transferRegions,
const unsigned int *  subresourceArray,
unsigned int  numSubresources 
)

Function to notify the driver that we have finished writing to the resource this frame.

This will initiate a transfer for AGS_AFR_TRANSFER_1STEP_P2P, AGS_AFR_TRANSFER_2STEP_NO_BROADCAST, and AGS_AFR_TRANSFER_2STEP_WITH_BROADCAST.

Parameters
[in]contextPointer to a context.
[in]resourcePointer to the resource.
[in]transferRegionsAn array of transfer regions (can be null to specify the whole area).
[in]subresourceArrayAn array of subresource indices (can be null to specify all subresources).
[in]numSubresourcesThe number of subresources in subresourceArray OR number of transferRegions. Use 0 to specify ALL subresources and one transferRegion (which may be null if specifying the whole area).