Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jstewart-amd committed Jan 16, 2016
1 parent dbfd4da commit 7b1230e
Show file tree
Hide file tree
Showing 126 changed files with 49,307 additions and 0 deletions.
19 changes: 19 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# AMD AGS Library SDK
<img src="ags_lib/doc/amd_logo_black.png" width="512" height="123" />

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. Version 3.1 of the library includes support for querying graphics driver version info, GPU performance, Crossfire (AMD's multi-GPU rendering technology) configuration info, as well as Eyefinity (AMD's multi-display rendering technology) configuration info. AGS also exposes some additional functionality supported in the DirectX11 AMD driver.

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

### What's new in AGS3.1 since 3.0
AGS3.1 now returns a lot more information from the GPU in addition to exposing the explicit Crossfire API for DX11. The following changes are new to AGS3.1:
* The initialization function can now return information about the GPU:
* Whether the GPU is GCN or not.
* The adapter string and device id.
* The driver version is now rolled into this structure instead of a separate function call.
* Performance metrics such as the number of compute units and clock speeds.
* A new API to transfer resources between GPUs in Crossfire configuration in DirectX11.
* A method to register your app and engine with the DirectX11 driver.
* The screen rect primitive is now available in DirectX11 if supported.

### What's new in AGS3
AGS3 contains a number of architectural changes as well as including some exciting new features supported in the DirectX11 AMD driver. The following changes are new to AGS3:
* The library is now only available as a dynamic link library (DLL) for simplicity.
* The library is now thread-safe. Previously, the API would have to be called on the same thread. Now, each API call is fully re-entrant.
* ADL 1 is no longer supported. Parts of AGS3 are built on ADL 2 which was introduced in Catalyst version 12.20. If your driver is older than this, AGS3 will fail to initialize.
* There is now an API for querying the total number of GPUs, not only the ones that are in a Crossfire configuration, and an API to query the amount of memory local to each of those GPUs.
* AGS3 now provides public access to some of the extensions available in the AMD DirectX11 driver. These include the Quad List primitive type, UAV overlap, depth bounds test and multi-draw indirect.

### Prerequisites
* AMD Radeon&trade; GCN-based GPU (HD 7000 series or newer)
* 64-bit Windows 7 (SP1 with the [Platform Update](https://msdn.microsoft.com/en-us/library/windows/desktop/jj863687.aspx)), Windows 8.1, or Windows 10
* Visual Studio 2012, Visual Studio 2013, or Visual Studio 2015

### 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 VS2012, 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.

### Premake
The Visual Studio projects in each sample's `build` directory were generated with Premake. To generate the project files yourself (for another version of Visual Studio, for example), 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 vs2010`

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](http://blogs.msdn.com/b/vcblog/archive/2012/11/23/using-the-windows-8-sdk-with-visual-studio-2010-configuring-multiple-projects.aspx). 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.

The default SDK for a particular version of Visual Studio (for 2012 or higher) is installed as part of Visual Studio installation. This default (Windows 8.0 SDK for Visual Studio 2012 and Windows 8.1 SDK for Visual Studio 2013) will be used if newer SDKs do not exist on the user's machine. However, the projects generated with this version of Premake will use the next higher SDK (Windows 8.1 SDK for Visual Studio 2012 and Windows 10 SDK with Visual Studio 2013), if the newer SDKs exist on the user's machine. For Visual Studio 2015, this version of Premake adds the WindowsTargetPlatformVersion element to the project file so that the Windows 10 SDK will be used.

### 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`.
20 changes: 20 additions & 0 deletions ags_sample/build/AGSSample_2012.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AGSSample", "AGSSample_2012.vcxproj", "{021ECEC9-6E88-8240-B7C6-33E623706095}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{021ECEC9-6E88-8240-B7C6-33E623706095}.Debug|x64.ActiveCfg = Debug|x64
{021ECEC9-6E88-8240-B7C6-33E623706095}.Debug|x64.Build.0 = Debug|x64
{021ECEC9-6E88-8240-B7C6-33E623706095}.Release|x64.ActiveCfg = Release|x64
{021ECEC9-6E88-8240-B7C6-33E623706095}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
126 changes: 126 additions & 0 deletions ags_sample/build/AGSSample_2012.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{021ECEC9-6E88-8240-B7C6-33E623706095}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>AGSSample</RootNamespace>
<ProjectName>AGSSample</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="Windows81SDKVS12_x64.props" Condition="exists('$(ProgramFiles)\Windows Kits\8.1\Include\um\Windows.h')" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="Windows81SDKVS12_x64.props" Condition="exists('$(ProgramFiles)\Windows Kits\8.1\Include\um\Windows.h')" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>..\bin\</OutDir>
<IntDir>Desktop_2012\x64\Debug\</IntDir>
<TargetName>AGSSample_Debug_2012</TargetName>
<TargetExt>.exe</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\bin\</OutDir>
<IntDir>Desktop_2012\x64\Release\</IntDir>
<TargetName>AGSSample_Release_2012</TargetName>
<TargetExt>.exe</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\ags_lib\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<FloatingPointModel>Fast</FloatingPointModel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>amd_ags_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\ags_lib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>if not exist "..\bin\d3dcompiler_46.dll" if exist "$(ProgramFiles)\Windows Kits\8.0\Redist\D3D\x64\d3dcompiler_46.dll" xcopy "$(ProgramFiles)\Windows Kits\8.0\Redist\D3D\x64\d3dcompiler_46.dll" "..\bin" /H /R /Y &gt; nul
if not exist "..\bin\d3dcompiler_47.dll" if exist "$(ProgramFiles)\Windows Kits\8.1\Redist\D3D\x64\d3dcompiler_47.dll" xcopy "$(ProgramFiles)\Windows Kits\8.1\Redist\D3D\x64\d3dcompiler_47.dll" "..\bin" /H /R /Y &gt; nul
xcopy "..\..\ags_lib\lib\amd_ags_x64.dll" "..\bin" /H /R /Y &gt; nul</Command>
<Message>Copying dependencies...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\ags_lib\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling>
<FloatingPointModel>Fast</FloatingPointModel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>amd_ags_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\ags_lib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>if not exist "..\bin\d3dcompiler_46.dll" if exist "$(ProgramFiles)\Windows Kits\8.0\Redist\D3D\x64\d3dcompiler_46.dll" xcopy "$(ProgramFiles)\Windows Kits\8.0\Redist\D3D\x64\d3dcompiler_46.dll" "..\bin" /H /R /Y &gt; nul
if not exist "..\bin\d3dcompiler_47.dll" if exist "$(ProgramFiles)\Windows Kits\8.1\Redist\D3D\x64\d3dcompiler_47.dll" xcopy "$(ProgramFiles)\Windows Kits\8.1\Redist\D3D\x64\d3dcompiler_47.dll" "..\bin" /H /R /Y &gt; nul
xcopy "..\..\ags_lib\lib\amd_ags_x64.dll" "..\bin" /H /R /Y &gt; nul</Command>
<Message>Copying dependencies...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\ags_lib\inc\amd_ags.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\AGSSample.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
24 changes: 24 additions & 0 deletions ags_sample/build/AGSSample_2012.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="ags_lib">
<UniqueIdentifier>{96EE2A27-02CE-A9C2-0BE6-349977441024}</UniqueIdentifier>
</Filter>
<Filter Include="ags_lib\inc">
<UniqueIdentifier>{9FDCA789-0B92-207F-9486-1A56003B1783}</UniqueIdentifier>
</Filter>
<Filter Include="src">
<UniqueIdentifier>{2DAB880B-99B4-887C-2230-9F7C8E38947C}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\ags_lib\inc\amd_ags.h">
<Filter>ags_lib\inc</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\AGSSample.cpp">
<Filter>src</Filter>
</ClCompile>
</ItemGroup>
</Project>
20 changes: 20 additions & 0 deletions ags_sample/build/AGSSample_2013.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AGSSample", "AGSSample_2013.vcxproj", "{021ECEC9-6E88-8240-B7C6-33E623706095}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{021ECEC9-6E88-8240-B7C6-33E623706095}.Debug|x64.ActiveCfg = Debug|x64
{021ECEC9-6E88-8240-B7C6-33E623706095}.Debug|x64.Build.0 = Debug|x64
{021ECEC9-6E88-8240-B7C6-33E623706095}.Release|x64.ActiveCfg = Release|x64
{021ECEC9-6E88-8240-B7C6-33E623706095}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Loading

0 comments on commit 7b1230e

Please sign in to comment.