AMD GPU Services (AGS) library and samples
Clone or download

README.md

AMD AGS SDK

AMD AGS SDK

The AMD GPU Services (AGS) library provides software developers with the ability to query AMD GPU software and hardware state information that is not normally available through standard operating systems or graphic APIs. AGS includes support for querying graphics driver version info, GPU performance, Crossfire™ (AMD's multi-GPU rendering technology) configuration info, and Eyefinity (AMD's multi-display rendering technology) configuration info. AGS also exposes the explicit Crossfire API extension, GCN shader extensions, and additional extensions supported in the AMD drivers for DirectX 11 and DirectX 12.

In addition to the library itself, the AGS SDK includes several samples to demonstrate use of the library.

Latest release

What's new in AGS 5.2

Version 5.2 adds support for app registration in DirectX 12. App registration lets you give more information about your game or application to our driver, which can then use that (ideally unique) information to better support the game or app if we need to make driver-side changes to help things run as efficiently and correctly as possible.

We also changed how you get access to extensions under DX12, requiring you to create your GPU device using agsDriverExtensionsDX12_CreateDevice() , instead of the normal D3D12CreateDevice() call you’d make to D3D.

Lastly, we’ve also added support for breadcrumb markers in D3D11. Using the agsDriverExtensionsDX11_WriteBreadcrumb() API, you can put in place a strategy for debugging driver issues more easily. Sometimes your game or app can interact with the driver in a way that causes it to crash or TDR. The new API gives you the ability to leave markers around your D3D11 API calls, helping you narrow down exactly what interaction with the driver caused the problem.

What's new in AGS 5.1

Version 5.1 is a partly developer-focused update to AGS 5. We've listened to feedback about how difficult it can be to integrate the binary AGS libs into your games, and while we can't open the source code to AGS to allow you to integrate it from source, we canvassed developers to figure out what pre-built binaries would be most useful to provide. So we've now added builds of the AGS binary library that are linkable with Visual Studio projects built with /MT and /MD, used to select a particular CRT.

There's also a breaking change in how you get access to DX11 AMD extensions. Look at the Changelog for details on that. We've also added an application registration extension for DX11 apps. That lets you tell the driver that your game can be considered in a uniquely indentifiable way, which is particularly helpful if you build on top of popular middleware like Unity or UE4 and make rendering changes.

There's also support for FreeSync 2 HDR, DX12 application user markers for Radeon GPU Profiler, VS2017 versions of the shipping samples, and new wave-level shader intrinsics for both DX11 and DX12.

See the full Changelog for more details.

What's new in AGS 5.0

Version 5.0 is a major overhaul of the library designed to provide a much clearer view of the GPUs in the system and the displays attached to them. It also exposes the ability to query each display for HDR capabilities and put those HDR-capable displays into various HDR modes.

Highlights include the following:

  • Full GPU enumeration with adapter string, device id, revision id and vendor id.
  • Per-GPU display enumeration including information on display name, resolution, and HDR capabilities.
  • Optional user-supplied memory allocator.
  • Function to set displays into HDR mode.1
  • A Microsoft WACK compliant version of the library.
  • DirectX 11 shader compiler controls.1
  • DirectX 11 multiview extension.2
  • DirectX 11 Crossfire API updates.
    • Now supports using the API without needing a driver profile.
    • You can also now specify the transfer engine.

Driver extensions

AGS exposes GCN shader extensions for both DirectX 11 and DirectX 12. It also provides access to additional extensions available in the AMD driver for DirectX 11:

  • Quad List primitive type
  • UAV overlap
  • Depth bounds test
  • Multi-draw indirect
  • Multiview

Prerequisites

  • AMD Radeon™ GCN-based GPU (HD 7000 series or newer)
    • Or other DirectX® 11 compatible GPU with Shader Model 5 support3
  • 64-bit Windows® 7 (SP1 with the Platform Update), Windows® 8.1, or Windows® 10
  • Visual Studio® 2013 or Visual Studio® 2015
  • Recommended driver: Radeon Software Crimson ReLive Edition 16.12.1 (driver version 16.50.2001) or later

Getting Started

  • It is recommended to take a look at the sample source code.
    • There are three samples: ags_sample, crossfire_sample, and eyefinity_sample.
  • Visual Studio projects for VS2013 and VS2015 can be found in each sample's build directory.
  • Additional documentation, including API documentation and instructions on how to add AGS support to an existing project, can be found in the ags_lib\doc directory.

Additional Samples

In addition to the three samples included in this repo, there are other samples available on GitHub that use AGS:

  • CrossfireAPI11 - a larger example of using the explicit Crossfire API
    • The CrossfireAPI11 sample also comes with an extensive guide for multi-GPU: the AMD Crossfire guide for Direct3D® 11 applications
  • DepthBoundsTest11 - a sample showing how to use the depth bounds test extension
  • Barycentrics11 - a sample showing how to use the GCN shader extensions for DirectX 11
  • Barycentrics12 - a sample showing how to use the GCN shader extensions for DirectX 12

Premake

The Visual Studio projects in each sample's build directory were generated with Premake. To generate the project files yourself, open a command prompt in the sample's premake directory (where the premake5.lua script for that sample is located, not the top-level directory where the premake5 executable is located) and execute the following command:

  • ..\..\premake\premake5.exe [action]
  • For example: ..\..\premake\premake5.exe vs2015

Alternatively, to regenerate all Visual Studio files for the SDK, execute ags_update_vs_files.bat in the top-level premake directory.

This version of Premake has been modified from the stock version to use the property sheet technique for the Windows SDK from this Visual C++ Team blog post. The technique was originally described for using the Windows 8.0 SDK with Visual Studio 2010, but it applies more generally to using newer versions of the Windows SDK with older versions of Visual Studio.

By default, Visual Studio 2013 projects will compile against the Windows 8.1 SDK. However, the VS2013 projects generated with this version of Premake will use the next higher SDK (i.e. the Windows 10 SDK), if the newer SDK exists on the user's machine.

For Visual Studio 2015, the systemversion Premake function is used to add the WindowsTargetPlatformVersion element to the project file, to specify which version of the Windows SDK will be used. To change WindowsTargetPlatformVersion for Visual Studio 2015, change the value for _AMD_WIN_SDK_VERSION in premake\amd_premake_util.lua and regenerate the Visual Studio files.

Third-Party Software

  • DXUT is distributed under the terms of the MIT License. See eyefinity_sample\dxut\MIT.txt.
  • Premake is distributed under the terms of the BSD License. See premake\LICENSE.txt.

Attribution

  • AMD, the AMD Arrow logo, Radeon, Crossfire, and combinations thereof are either registered trademarks or trademarks of Advanced Micro Devices, Inc. in the United States and/or other countries.
  • Microsoft, DirectX, Visual Studio, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

Notes

1: Requires Radeon Software Crimson Edition 16.9.2 (driver version 16.40.2311) or later.

2: Requires Radeon Software Crimson ReLive Edition 16.12.1 (driver version 16.50.2001) or later.

3: While the AGS SDK samples will run on non-AMD hardware, they will be of limited usefulness, since the purpose of AGS is to provide convenient access to AMD-specific information and extensions.