Skip to content

Commit 7b1230e

Browse files
committed
Initial commit
1 parent dbfd4da commit 7b1230e

File tree

126 files changed

+49307
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+49307
-0
lines changed

LICENSE.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# AMD AGS Library SDK
2+
<img src="ags_lib/doc/amd_logo_black.png" width="512" height="123" />
3+
4+
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.
5+
6+
In addition to the library itself, the AGS SDK includes several samples to demonstrate use of the library.
7+
8+
### What's new in AGS3.1 since 3.0
9+
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:
10+
* The initialization function can now return information about the GPU:
11+
* Whether the GPU is GCN or not.
12+
* The adapter string and device id.
13+
* The driver version is now rolled into this structure instead of a separate function call.
14+
* Performance metrics such as the number of compute units and clock speeds.
15+
* A new API to transfer resources between GPUs in Crossfire configuration in DirectX11.
16+
* A method to register your app and engine with the DirectX11 driver.
17+
* The screen rect primitive is now available in DirectX11 if supported.
18+
19+
### What's new in AGS3
20+
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:
21+
* The library is now only available as a dynamic link library (DLL) for simplicity.
22+
* 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.
23+
* 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.
24+
* 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.
25+
* 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.
26+
27+
### Prerequisites
28+
* AMD Radeon&trade; GCN-based GPU (HD 7000 series or newer)
29+
* 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
30+
* Visual Studio 2012, Visual Studio 2013, or Visual Studio 2015
31+
32+
### Getting Started
33+
* It is recommended to take a look at the sample source code.
34+
* There are three samples: ags_sample, crossfire_sample, and eyefinity_sample.
35+
* Visual Studio projects for VS2012, VS2013, and VS2015 can be found in each sample's `build` directory.
36+
* 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.
37+
38+
### Premake
39+
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:
40+
41+
* `..\..\premake\premake5.exe [action]`
42+
* For example: `..\..\premake\premake5.exe vs2010`
43+
44+
Alternatively, to regenerate all Visual Studio files for the SDK, execute `ags_update_vs_files.bat` in the top-level `premake` directory.
45+
46+
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.
47+
48+
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.
49+
50+
### Third-Party Software
51+
* DXUT is distributed under the terms of the MIT License. See `eyefinity_sample\dxut\MIT.txt`.
52+
* Premake is distributed under the terms of the BSD License. See `premake\LICENSE.txt`.

ags_sample/build/AGSSample_2012.sln

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
4+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AGSSample", "AGSSample_2012.vcxproj", "{021ECEC9-6E88-8240-B7C6-33E623706095}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|x64 = Debug|x64
9+
Release|x64 = Release|x64
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{021ECEC9-6E88-8240-B7C6-33E623706095}.Debug|x64.ActiveCfg = Debug|x64
13+
{021ECEC9-6E88-8240-B7C6-33E623706095}.Debug|x64.Build.0 = Debug|x64
14+
{021ECEC9-6E88-8240-B7C6-33E623706095}.Release|x64.ActiveCfg = Release|x64
15+
{021ECEC9-6E88-8240-B7C6-33E623706095}.Release|x64.Build.0 = Release|x64
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
EndGlobal
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|x64">
5+
<Configuration>Debug</Configuration>
6+
<Platform>x64</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|x64">
9+
<Configuration>Release</Configuration>
10+
<Platform>x64</Platform>
11+
</ProjectConfiguration>
12+
</ItemGroup>
13+
<PropertyGroup Label="Globals">
14+
<ProjectGuid>{021ECEC9-6E88-8240-B7C6-33E623706095}</ProjectGuid>
15+
<Keyword>Win32Proj</Keyword>
16+
<RootNamespace>AGSSample</RootNamespace>
17+
<ProjectName>AGSSample</ProjectName>
18+
</PropertyGroup>
19+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
20+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
21+
<ConfigurationType>Application</ConfigurationType>
22+
<UseDebugLibraries>true</UseDebugLibraries>
23+
<CharacterSet>Unicode</CharacterSet>
24+
<PlatformToolset>v110</PlatformToolset>
25+
</PropertyGroup>
26+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
27+
<ConfigurationType>Application</ConfigurationType>
28+
<UseDebugLibraries>false</UseDebugLibraries>
29+
<CharacterSet>Unicode</CharacterSet>
30+
<PlatformToolset>v110</PlatformToolset>
31+
<WholeProgramOptimization>true</WholeProgramOptimization>
32+
</PropertyGroup>
33+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
34+
<ImportGroup Label="ExtensionSettings">
35+
</ImportGroup>
36+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
37+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
38+
<Import Project="Windows81SDKVS12_x64.props" Condition="exists('$(ProgramFiles)\Windows Kits\8.1\Include\um\Windows.h')" />
39+
</ImportGroup>
40+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
41+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
42+
<Import Project="Windows81SDKVS12_x64.props" Condition="exists('$(ProgramFiles)\Windows Kits\8.1\Include\um\Windows.h')" />
43+
</ImportGroup>
44+
<PropertyGroup Label="UserMacros" />
45+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
46+
<LinkIncremental>true</LinkIncremental>
47+
<OutDir>..\bin\</OutDir>
48+
<IntDir>Desktop_2012\x64\Debug\</IntDir>
49+
<TargetName>AGSSample_Debug_2012</TargetName>
50+
<TargetExt>.exe</TargetExt>
51+
</PropertyGroup>
52+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
53+
<LinkIncremental>false</LinkIncremental>
54+
<OutDir>..\bin\</OutDir>
55+
<IntDir>Desktop_2012\x64\Release\</IntDir>
56+
<TargetName>AGSSample_Release_2012</TargetName>
57+
<TargetExt>.exe</TargetExt>
58+
</PropertyGroup>
59+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
60+
<ClCompile>
61+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
62+
<WarningLevel>Level4</WarningLevel>
63+
<TreatWarningAsError>true</TreatWarningAsError>
64+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)</PreprocessorDefinitions>
65+
<AdditionalIncludeDirectories>..\..\ags_lib\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
66+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
67+
<Optimization>Disabled</Optimization>
68+
<FloatingPointModel>Fast</FloatingPointModel>
69+
</ClCompile>
70+
<Link>
71+
<SubSystem>Console</SubSystem>
72+
<GenerateDebugInformation>true</GenerateDebugInformation>
73+
<AdditionalDependencies>amd_ags_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
74+
<AdditionalLibraryDirectories>..\..\ags_lib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
75+
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
76+
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
77+
</Link>
78+
<PostBuildEvent>
79+
<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
80+
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
81+
xcopy "..\..\ags_lib\lib\amd_ags_x64.dll" "..\bin" /H /R /Y &gt; nul</Command>
82+
<Message>Copying dependencies...</Message>
83+
</PostBuildEvent>
84+
</ItemDefinitionGroup>
85+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
86+
<ClCompile>
87+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
88+
<WarningLevel>Level4</WarningLevel>
89+
<TreatWarningAsError>true</TreatWarningAsError>
90+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)</PreprocessorDefinitions>
91+
<AdditionalIncludeDirectories>..\..\ags_lib\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
92+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
93+
<Optimization>Full</Optimization>
94+
<FunctionLevelLinking>true</FunctionLevelLinking>
95+
<IntrinsicFunctions>true</IntrinsicFunctions>
96+
<MinimalRebuild>false</MinimalRebuild>
97+
<StringPooling>true</StringPooling>
98+
<FloatingPointModel>Fast</FloatingPointModel>
99+
</ClCompile>
100+
<Link>
101+
<SubSystem>Console</SubSystem>
102+
<GenerateDebugInformation>true</GenerateDebugInformation>
103+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
104+
<OptimizeReferences>true</OptimizeReferences>
105+
<AdditionalDependencies>amd_ags_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
106+
<AdditionalLibraryDirectories>..\..\ags_lib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
107+
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
108+
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
109+
</Link>
110+
<PostBuildEvent>
111+
<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
112+
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
113+
xcopy "..\..\ags_lib\lib\amd_ags_x64.dll" "..\bin" /H /R /Y &gt; nul</Command>
114+
<Message>Copying dependencies...</Message>
115+
</PostBuildEvent>
116+
</ItemDefinitionGroup>
117+
<ItemGroup>
118+
<ClInclude Include="..\..\ags_lib\inc\amd_ags.h" />
119+
</ItemGroup>
120+
<ItemGroup>
121+
<ClCompile Include="..\src\AGSSample.cpp" />
122+
</ItemGroup>
123+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
124+
<ImportGroup Label="ExtensionTargets">
125+
</ImportGroup>
126+
</Project>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="ags_lib">
5+
<UniqueIdentifier>{96EE2A27-02CE-A9C2-0BE6-349977441024}</UniqueIdentifier>
6+
</Filter>
7+
<Filter Include="ags_lib\inc">
8+
<UniqueIdentifier>{9FDCA789-0B92-207F-9486-1A56003B1783}</UniqueIdentifier>
9+
</Filter>
10+
<Filter Include="src">
11+
<UniqueIdentifier>{2DAB880B-99B4-887C-2230-9F7C8E38947C}</UniqueIdentifier>
12+
</Filter>
13+
</ItemGroup>
14+
<ItemGroup>
15+
<ClInclude Include="..\..\ags_lib\inc\amd_ags.h">
16+
<Filter>ags_lib\inc</Filter>
17+
</ClInclude>
18+
</ItemGroup>
19+
<ItemGroup>
20+
<ClCompile Include="..\src\AGSSample.cpp">
21+
<Filter>src</Filter>
22+
</ClCompile>
23+
</ItemGroup>
24+
</Project>

ags_sample/build/AGSSample_2013.sln

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AGSSample", "AGSSample_2013.vcxproj", "{021ECEC9-6E88-8240-B7C6-33E623706095}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|x64 = Debug|x64
9+
Release|x64 = Release|x64
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{021ECEC9-6E88-8240-B7C6-33E623706095}.Debug|x64.ActiveCfg = Debug|x64
13+
{021ECEC9-6E88-8240-B7C6-33E623706095}.Debug|x64.Build.0 = Debug|x64
14+
{021ECEC9-6E88-8240-B7C6-33E623706095}.Release|x64.ActiveCfg = Release|x64
15+
{021ECEC9-6E88-8240-B7C6-33E623706095}.Release|x64.Build.0 = Release|x64
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
EndGlobal

0 commit comments

Comments
 (0)