AMD GPU Services (AGS)
Classes | Typedefs | Enumerations | Functions
General API functions

API for initialization, cleanup, HDR display modes and Crossfire GPU count. More...

Classes

struct  AGSConfiguration
 The configuration options that can be passed in to agsInit. More...
 
struct  AGSGPUInfo
 The top level GPU information returned from agsInit. More...
 
struct  AGSDisplaySettings
 The struct to specify the display settings to the driver. More...
 

Typedefs

typedef void *(__stdcall * AGS_ALLOC_CALLBACK) (size_t allocationSize)
 AGS user defined allocation prototype.
 
typedef void(__stdcall * AGS_FREE_CALLBACK) (void *allocationPtr)
 AGS user defined free prototype.
 

Enumerations

enum  AGSDriverVersionResult { AGS_SOFTWAREVERSIONCHECK_OK, AGS_SOFTWAREVERSIONCHECK_OLDER, AGS_SOFTWAREVERSIONCHECK_UNDEFINED }
 The result returned from agsCheckDriverVersion. More...
 

Functions

AMD_AGS_API AGSDriverVersionResult agsCheckDriverVersion (const char *radeonSoftwareVersionReported, unsigned int radeonSoftwareVersionRequired)
 Helper function to check the installed software version against the required software version. More...
 
AMD_AGS_API AGSReturnCode agsInit (AGSContext **context, const AGSConfiguration *config, AGSGPUInfo *gpuInfo)
 Function used to initialize the AGS library. More...
 
AMD_AGS_API AGSReturnCode agsDeInit (AGSContext *context)
 Function used to clean up the AGS library. More...
 
AMD_AGS_API AGSReturnCode agsSetDisplayMode (AGSContext *context, int deviceIndex, int displayIndex, const AGSDisplaySettings *settings)
 Function used to set a specific display into HDR mode. More...
 

Detailed Description

API for initialization, cleanup, HDR display modes and Crossfire GPU count.

Enumeration Type Documentation

◆ AGSDriverVersionResult

The result returned from agsCheckDriverVersion.

Enumerator
AGS_SOFTWAREVERSIONCHECK_OK 

The reported Radeon Software Version is newer or the same as the required version.

AGS_SOFTWAREVERSIONCHECK_OLDER 

The reported Radeon Software Version is older than the required version.

AGS_SOFTWAREVERSIONCHECK_UNDEFINED 

The check could not determine as result. This could be because it is a private or custom driver or just invalid arguments.

Function Documentation

◆ agsCheckDriverVersion()

AMD_AGS_API AGSDriverVersionResult agsCheckDriverVersion ( const char *  radeonSoftwareVersionReported,
unsigned int  radeonSoftwareVersionRequired 
)

Helper function to check the installed software version against the required software version.

Parameters
[in]radeonSoftwareVersionReportedThe Radeon Software Version returned from AGSGPUInfo::radeonSoftwareVersion.
[in]radeonSoftwareVersionRequiredThe Radeon Software Version to check against. This is specificed using AGS_MAKE_VERSION.
Returns
The result of the check.

◆ agsDeInit()

AMD_AGS_API AGSReturnCode agsDeInit ( AGSContext *  context)

Function used to clean up the AGS library.

Parameters
[in]contextPointer to a context. This function will deallocate the context from the heap.

◆ agsInit()

AMD_AGS_API AGSReturnCode agsInit ( AGSContext **  context,
const AGSConfiguration config,
AGSGPUInfo gpuInfo 
)

Function used to initialize the AGS library.

Must be called prior to any of the subsequent AGS API calls. Must be called prior to ID3D11Device or ID3D12Device creation.

Note
This function will fail with AGS_ERROR_LEGACY_DRIVER in Catalyst versions before 12.20.
It is good practice to check the AGS version returned from AGSGPUInfo against the version defined in the header in case a mismatch between the dll and header has occurred.
Parameters
[in,out]contextAddress of a pointer to a context. This function allocates a context on the heap which is then required for all subsequent API calls.
[in]configOptional pointer to a AGSConfiguration struct to override the default library configuration.
[out]gpuInfoOptional pointer to a AGSGPUInfo struct which will get filled in for all the GPUs in the system.

◆ agsSetDisplayMode()

AMD_AGS_API AGSReturnCode agsSetDisplayMode ( AGSContext *  context,
int  deviceIndex,
int  displayIndex,
const AGSDisplaySettings settings 
)

Function used to set a specific display into HDR mode.

Note
Setting all of the values apart from color space and transfer function to zero will cause the display to use defaults.
Call this function after each mode change (switch to fullscreen, any change in swapchain etc).
HDR10 PQ mode requires a 1010102 swapchain.
HDR10 scRGB mode requires an FP16 swapchain.
Freesync2 scRGB mode requires an FP16 swapchain.
Dolby Vision requires a 8888 UNORM swapchain.
Parameters
[in]contextPointer to a context. This is generated by agsInit
[in]deviceIndexThe index of the device listed in AGSGPUInfo::devices.
[in]displayIndexThe index of the display listed in AGSDeviceInfo::displays.
[in]settingsPointer to the display settings to use.