AMD GPU Services (AGS)
amd_ags.h
1 //
2 // Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
3 //
4 // Permission is hereby granted, free of charge, to any person obtaining a copy
5 // of this software and associated documentation files (the "Software"), to deal
6 // in the Software without restriction, including without limitation the rights
7 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 // copies of the Software, and to permit persons to whom the Software is
9 // furnished to do so, subject to the following conditions:
10 //
11 // The above copyright notice and this permission notice shall be included in
12 // all copies or substantial portions of the Software.
13 //
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 // THE SOFTWARE.
21 //
22 
23 /// \file
24 /// \mainpage
25 /// AGS Library Overview
26 /// --------------------
27 /// This document provides an overview of the AGS (AMD GPU Services) library. The AGS library provides software developers with the ability to query
28 /// AMD GPU software and hardware state information that is not normally available through standard operating systems or graphic APIs.
29 ///
30 /// The latest version of the API is publicly hosted here: https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK/.
31 /// It is also worth checking http://gpuopen.com/gaming-product/amd-gpu-services-ags-library/ for any updates and articles on AGS.
32 /// \internal
33 /// Online documentation is publicly hosted here: http://gpuopen-librariesandsdks.github.io/ags/
34 /// \endinternal
35 ///
36 /// ---------------------------------------
37 /// What's new in AGS 6.2 since version 6.1
38 /// ---------------------------------------
39 /// AGS 6.2 includes the following updates:
40 /// * Shader clock intrinsics
41 /// * Minor improvements and fixes
42 ///
43 /// ---------------------------------------
44 /// What's new in AGS 6.1 since version 6.0
45 /// ---------------------------------------
46 /// AGS 6.1 includes the following updates:
47 /// * RDNA3 detection
48 ///
49 /// ---------------------------------------
50 /// What's new in AGS 6.0 since version 5.4.2
51 /// ---------------------------------------
52 /// AGS 6.0 includes the following updates:
53 /// * DX12 ray tracing hit token for RDNA2 hardware.
54 /// * Shader intrinsic that exposes ReadLaneAt in DX12.
55 /// * Shader intrinsics that expose explicit float conversions in DX12.
56 /// * Refactored and revised API to minimize user error.
57 /// * Added agsGetVersionNumber.
58 /// * Detection for external GPUs.
59 /// * Detection of RDNA2 architecture.
60 /// * Grouped the more established intrinsics together into per year support.
61 /// * Function pointer typedefs for the API
62 ///
63 /// ---------------------------------------
64 /// What's new in AGS 5.4.2 since version 5.4.1
65 /// ---------------------------------------
66 /// AGS 5.4.2 includes the following updates:
67 /// * sharedMemoryInBytes has been reinstated.
68 /// * Clock speed returned for APUs.
69 ///
70 /// ---------------------------------------
71 /// What's new in AGS 5.4.1 since version 5.4.0
72 /// ---------------------------------------
73 /// AGS 5.4.1 includes the following updates:
74 /// * AsicFamily_Count to help with code maintenance.
75 /// * Visual Studio 2019 support.
76 /// * x86 support
77 /// * BaseInstance and BaseVertex intrinsics along with corresponding caps bits.
78 /// * GetWaveSize intrinsic along with corresponding caps bits.
79 ///
80 /// ---------------------------------------
81 /// What's new in AGS 5.4 since version 5.3
82 /// ---------------------------------------
83 /// AGS 5.4 includes the following updates:
84 /// * A more detailed description of the GPU architecture, now including RDNA GPUs.
85 /// * Radeon 7 core and memory speeds returned.
86 /// * Draw index and Atomic U64 intrinsics for both DX11 and DX12.
87 ///
88 /// ---------------------------------------
89 /// What's new in AGS 5.3 since version 5.2
90 /// ---------------------------------------
91 /// AGS 5.3 includes the following updates:
92 /// * DX11 deferred context support for Multi Draw Indirect and UAV Overlap extensions.
93 /// * A Radeon Software Version helper to determine whether the installed driver meets your game's minimum driver version requirements.
94 /// * Freesync HDR Gamma 2.2 mode which uses a 1010102 swapchain and can be considered as an alternative to using the 64 bit swapchain required for Freesync HDR scRGB.
95 ///
96 /// Using the AGS library
97 /// ---------------------
98 /// It is recommended to take a look at the source code for the samples that come with the AGS SDK:
99 /// * AGSSample
100 /// * CrossfireSample
101 /// * EyefinitySample
102 /// The AGSSample application is the simplest of the three examples and demonstrates the code required to initialize AGS and use it to query the GPU and Eyefinity state.
103 /// The CrossfireSample application demonstrates the use of the new API to transfer resources on GPUs in Crossfire mode. Lastly, the EyefinitySample application provides a more
104 /// extensive example of Eyefinity setup than the basic example provided in AGSSample.
105 /// There are other samples on Github that demonstrate the DirectX shader extensions, such as the Barycentrics11 and Barycentrics12 samples.
106 ///
107 /// To add AGS support to an existing project, follow these steps:
108 /// * Link your project against the correct import library. Choose from either the 32 bit or 64 bit version.
109 /// * Copy the AGS dll into the same directory as your game executable.
110 /// * Include the amd_ags.h header file from your source code.
111 /// * Include the AGS hlsl files if you are using the shader intrinsics.
112 /// * Declare a pointer to an AGSContext and make this available for all subsequent calls to AGS.
113 /// * On game initialization, call \ref agsInitialize passing in the address of the context. On success, this function will return a valid context pointer.
114 ///
115 /// Don't forget to cleanup AGS by calling \ref agsDeInitialize when the app exits, after the device has been destroyed.
116 
117 #ifndef AMD_AGS_H
118 #define AMD_AGS_H
119 
120 #define AMD_AGS_VERSION_MAJOR 6 ///< AGS major version
121 #define AMD_AGS_VERSION_MINOR 2 ///< AGS minor version
122 #define AMD_AGS_VERSION_PATCH 0 ///< AGS patch version
123 
124 #ifdef __cplusplus
125 extern "C" {
126 #endif
127 
128 /// \defgroup Defines AGS defines
129 /// @{
130 #if defined (AGS_GCC)
131 #define AMD_AGS_API
132 #else
133 #define AMD_AGS_API __declspec(dllexport) ///< AGS exported functions
134 #endif
135 
136 #define AGS_MAKE_VERSION( major, minor, patch ) ( ( major << 22 ) | ( minor << 12 ) | patch ) ///< Macro to create the app and engine versions for the fields in \ref AGSDX12ExtensionParams and \ref AGSDX11ExtensionParams and the Radeon Software Version
137 #define AGS_UNSPECIFIED_VERSION 0xFFFFAD00 ///< Use this to specify no version
138 #define AGS_CURRENT_VERSION AGS_MAKE_VERSION( AMD_AGS_VERSION_MAJOR, AMD_AGS_VERSION_MINOR, AMD_AGS_VERSION_PATCH ) ///< Macro to return the current AGS version as defined by the AGS header file
139 /// @}
140 
141 #if !defined (AGS_DIRECTX_TYPES_INCLUDED)
142 // Forward declaration of D3D and DXGI types
143 struct IDXGIAdapter;
144 struct IDXGISwapChain;
145 struct DXGI_SWAP_CHAIN_DESC;
146 enum D3D_DRIVER_TYPE;
147 enum D3D_FEATURE_LEVEL;
148 enum D3D_PRIMITIVE_TOPOLOGY;
149 
150 // Forward declaration of D3D11 types
151 struct ID3D11Device;
152 struct ID3D11DeviceContext;
153 struct ID3D11Resource;
154 struct ID3D11Buffer;
155 struct ID3D11Texture1D;
156 struct ID3D11Texture2D;
157 struct ID3D11Texture3D;
158 struct D3D11_BUFFER_DESC;
159 struct D3D11_TEXTURE1D_DESC;
160 struct D3D11_TEXTURE2D_DESC;
161 struct D3D11_TEXTURE3D_DESC;
162 struct D3D11_SUBRESOURCE_DATA;
163 struct tagRECT;
164 typedef tagRECT D3D11_RECT; ///< typedef this ourselves so we don't have to drag d3d11.h in
165 
166 // Forward declaration of D3D12 types
167 struct ID3D12Device;
168 struct ID3D12GraphicsCommandList;
169 #endif
170 
171 /// \defgroup enums General enumerations
172 /// @{
173 
174 /// The return codes
175 typedef enum AGSReturnCode
176 {
177  AGS_SUCCESS, ///< Successful function call
178  AGS_FAILURE, ///< Failed to complete call for some unspecified reason
179  AGS_INVALID_ARGS, ///< Invalid arguments into the function
180  AGS_OUT_OF_MEMORY, ///< Out of memory when allocating space internally
181  AGS_MISSING_D3D_DLL, ///< Returned when a D3D dll fails to load
182  AGS_LEGACY_DRIVER, ///< Returned if a feature is not present in the installed driver
183  AGS_NO_AMD_DRIVER_INSTALLED, ///< Returned if the AMD GPU driver does not appear to be installed
184  AGS_EXTENSION_NOT_SUPPORTED, ///< Returned if the driver does not support the requested driver extension
185  AGS_ADL_FAILURE, ///< Failure in ADL (the AMD Display Library)
186  AGS_DX_FAILURE, ///< Failure from DirectX runtime
187  AGS_D3DDEVICE_NOT_CREATED ///< Failure due to not creating the D3D device successfully via AGS.
188 } AGSReturnCode;
189 
190 /// @}
191 
192 struct AGSContext; ///< All function calls in AGS require a pointer to a context. This is generated via \ref agsInitialize
193 
194 /// The rectangle struct used by AGS.
195 typedef struct AGSRect
196 {
197  int offsetX; ///< Offset on X axis
198  int offsetY; ///< Offset on Y axis
199  int width; ///< Width of rectangle
200  int height; ///< Height of rectangle
201 } AGSRect;
202 
203 /// The display info struct used to describe a display enumerated by AGS
204 typedef struct AGSDisplayInfo
205 {
206  char name[ 256 ]; ///< The name of the display
207  char displayDeviceName[ 32 ]; ///< The display device name, i.e. DISPLAY_DEVICE::DeviceName
208 
209  unsigned int isPrimaryDisplay : 1; ///< Whether this display is marked as the primary display
210  unsigned int HDR10 : 1; ///< HDR10 is supported on this display
211  unsigned int dolbyVision : 1; ///< Dolby Vision is supported on this display
212  unsigned int freesync : 1; ///< Freesync is supported on this display
213  unsigned int freesyncHDR : 1; ///< Freesync HDR is supported on this display
214  unsigned int eyefinityInGroup : 1; ///< The display is part of the Eyefinity group
215  unsigned int eyefinityPreferredDisplay : 1; ///< The display is the preferred display in the Eyefinity group for displaying the UI
216  unsigned int eyefinityInPortraitMode : 1; ///< The display is in the Eyefinity group but in portrait mode
217  unsigned int reservedPadding : 24; ///< Reserved for future use
218 
219  int maxResolutionX; ///< The maximum supported resolution of the unrotated display
220  int maxResolutionY; ///< The maximum supported resolution of the unrotated display
221  float maxRefreshRate; ///< The maximum supported refresh rate of the display
222 
223  AGSRect currentResolution; ///< The current resolution and position in the desktop, ignoring Eyefinity bezel compensation
224  AGSRect visibleResolution; ///< The visible resolution and position. When Eyefinity bezel compensation is enabled this will
225  ///< be the sub region in the Eyefinity single large surface (SLS)
226  float currentRefreshRate; ///< The current refresh rate
227 
228  int eyefinityGridCoordX; ///< The X coordinate in the Eyefinity grid. -1 if not in an Eyefinity group
229  int eyefinityGridCoordY; ///< The Y coordinate in the Eyefinity grid. -1 if not in an Eyefinity group
230 
231  double chromaticityRedX; ///< Red display primary X coord
232  double chromaticityRedY; ///< Red display primary Y coord
233 
234  double chromaticityGreenX; ///< Green display primary X coord
235  double chromaticityGreenY; ///< Green display primary Y coord
236 
237  double chromaticityBlueX; ///< Blue display primary X coord
238  double chromaticityBlueY; ///< Blue display primary Y coord
239 
240  double chromaticityWhitePointX; ///< White point X coord
241  double chromaticityWhitePointY; ///< White point Y coord
242 
243  double screenDiffuseReflectance; ///< Percentage expressed between 0 - 1
244  double screenSpecularReflectance; ///< Percentage expressed between 0 - 1
245 
246  double minLuminance; ///< The minimum luminance of the display in nits
247  double maxLuminance; ///< The maximum luminance of the display in nits
248  double avgLuminance; ///< The average luminance of the display in nits
249 
250  int logicalDisplayIndex; ///< The internally used index of this display
251  int adlAdapterIndex; ///< The internally used ADL adapter index
252  int reserved; ///< reserved field
254 
255 /// The device info struct used to describe a physical GPU enumerated by AGS
256 typedef struct AGSDeviceInfo
257 {
258  /// The ASIC family
259  typedef enum AsicFamily
260  {
261  AsicFamily_Unknown, ///< Unknown architecture, potentially from another IHV. Check \ref AGSDeviceInfo::vendorId
262  AsicFamily_PreGCN, ///< Pre GCN architecture.
263  AsicFamily_GCN1, ///< AMD GCN 1 architecture: Oland, Cape Verde, Pitcairn & Tahiti.
264  AsicFamily_GCN2, ///< AMD GCN 2 architecture: Hawaii & Bonaire. This also includes APUs Kaveri and Carrizo.
265  AsicFamily_GCN3, ///< AMD GCN 3 architecture: Tonga & Fiji.
266  AsicFamily_GCN4, ///< AMD GCN 4 architecture: Polaris.
267  AsicFamily_Vega, ///< AMD Vega architecture, including Raven Ridge (ie AMD Ryzen CPU + AMD Vega GPU).
268  AsicFamily_RDNA, ///< AMD RDNA architecture
269  AsicFamily_RDNA2, ///< AMD RDNA2 architecture
270  AsicFamily_RDNA3, ///< AMD RDNA3 architecture
271 
272  AsicFamily_Count ///< Number of enumerated ASIC families
273  } AsicFamily;
274 
275  const char* adapterString; ///< The adapter name string
276  AsicFamily asicFamily; ///< Set to Unknown if not AMD hardware
277  unsigned int isAPU : 1; ///< Whether this device is an APU
278  unsigned int isPrimaryDevice : 1; ///< Whether this device is marked as the primary device
279  unsigned int isExternal :1; ///< Whether this device is a detachable, external device
280  unsigned int reservedPadding : 29; ///< Reserved for future use
281 
282  int vendorId; ///< The vendor id
283  int deviceId; ///< The device id
284  int revisionId; ///< The revision id
285 
286  int numCUs; ///< Number of compute units
287  int numWGPs; ///< Number of RDNA Work Group Processors. Only valid if ASIC is RDNA onwards.
288 
289  int numROPs; ///< Number of ROPs
290  int coreClock; ///< Core clock speed at 100% power in MHz
291  int memoryClock; ///< Memory clock speed at 100% power in MHz
292  int memoryBandwidth; ///< Memory bandwidth in MB/s
293  float teraFlops; ///< Teraflops of GPU. Zero if not GCN onwards. Calculated from iCoreClock * iNumCUs * 64 Pixels/clk * 2 instructions/MAD
294 
295  unsigned long long localMemoryInBytes; ///< The size of local memory in bytes. 0 for non AMD hardware.
296  unsigned long long sharedMemoryInBytes; ///< The size of system memory available to the GPU in bytes. It is important to factor this into your VRAM budget for APUs
297  ///< as the reported local memory will only be a small fraction of the total memory available to the GPU.
298 
299  int numDisplays; ///< The number of active displays found to be attached to this adapter.
300  AGSDisplayInfo* displays; ///< List of displays allocated by AGS to be numDisplays in length.
301 
302  int eyefinityEnabled; ///< Indicates if Eyefinity is active
303  int eyefinityGridWidth; ///< Contains width of the multi-monitor grid that makes up the Eyefinity Single Large Surface.
304  int eyefinityGridHeight; ///< Contains height of the multi-monitor grid that makes up the Eyefinity Single Large Surface.
305  int eyefinityResolutionX; ///< Contains width in pixels of the multi-monitor Single Large Surface.
306  int eyefinityResolutionY; ///< Contains height in pixels of the multi-monitor Single Large Surface.
307  int eyefinityBezelCompensated; ///< Indicates if bezel compensation is used for the current SLS display area. 1 if enabled, and 0 if disabled.
308 
309  int adlAdapterIndex; ///< Internally used index into the ADL list of adapters
310  int reserved; ///< reserved field
311 } AGSDeviceInfo;
312 
313 /// \defgroup general General API functions
314 /// API for initialization, cleanup, HDR display modes and Crossfire GPU count
315 /// @{
316 
317 typedef void* (__stdcall *AGS_ALLOC_CALLBACK)( size_t allocationSize ); ///< AGS user defined allocation prototype
318 typedef void (__stdcall *AGS_FREE_CALLBACK)( void* allocationPtr ); ///< AGS user defined free prototype
319 
320 /// The configuration options that can be passed in to \ref agsInitialize
321 typedef struct AGSConfiguration
322 {
323  AGS_ALLOC_CALLBACK allocCallback; ///< Optional memory allocation callback. If not supplied, malloc() is used
324  AGS_FREE_CALLBACK freeCallback; ///< Optional memory freeing callback. If not supplied, free() is used
326 
327 /// The top level GPU information returned from \ref agsInitialize
328 typedef struct AGSGPUInfo
329 {
330  const char* driverVersion; ///< The AMD driver package version
331  const char* radeonSoftwareVersion; ///< The Radeon Software Version
332 
333  int numDevices; ///< Number of GPUs in the system
334  AGSDeviceInfo* devices; ///< List of GPUs in the system
335 } AGSGPUInfo;
336 
337 /// The struct to specify the display settings to the driver.
338 typedef struct AGSDisplaySettings
339 {
340  /// The display mode
341  typedef enum Mode
342  {
343  Mode_SDR, ///< SDR mode
344  Mode_HDR10_PQ, ///< HDR10 PQ encoding, requiring a 1010102 UNORM swapchain and PQ encoding in the output shader.
345  Mode_HDR10_scRGB, ///< HDR10 scRGB, requiring an FP16 swapchain. Values of 1.0 == 80 nits, 125.0 == 10000 nits.
346  Mode_FreesyncHDR_scRGB, ///< Freesync HDR scRGB, requiring an FP16 swapchain. A value of 1.0 == 80 nits.
347  Mode_FreesyncHDR_Gamma22, ///< Freesync HDR Gamma 2.2, requiring a 1010102 UNORM swapchain. The output needs to be encoded to gamma 2.2.
348  Mode_DolbyVision, ///< Dolby Vision, requiring an 8888 UNORM swapchain
349 
350  Mode_Count ///< Number of enumerated display modes
351  } Mode;
352 
353  Mode mode; ///< The display mode to set the display into
354 
355  double chromaticityRedX; ///< Red display primary X coord
356  double chromaticityRedY; ///< Red display primary Y coord
357 
358  double chromaticityGreenX; ///< Green display primary X coord
359  double chromaticityGreenY; ///< Green display primary Y coord
360 
361  double chromaticityBlueX; ///< Blue display primary X coord
362  double chromaticityBlueY; ///< Blue display primary Y coord
363 
364  double chromaticityWhitePointX; ///< White point X coord
365  double chromaticityWhitePointY; ///< White point Y coord
366 
367  double minLuminance; ///< The minimum scene luminance in nits
368  double maxLuminance; ///< The maximum scene luminance in nits
369 
370  double maxContentLightLevel; ///< The maximum content light level in nits (MaxCLL)
371  double maxFrameAverageLightLevel; ///< The maximum frame average light level in nits (MaxFALL)
372 
373  unsigned int disableLocalDimming : 1; ///< Disables local dimming if possible
374  unsigned int reservedPadding : 31; ///< Reserved
376 
377 
378 /// The result returned from \ref agsCheckDriverVersion
380 {
381  AGS_SOFTWAREVERSIONCHECK_OK, ///< The reported Radeon Software Version is newer or the same as the required version
382  AGS_SOFTWAREVERSIONCHECK_OLDER, ///< The reported Radeon Software Version is older than the required version
383  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.
385 
386 ///
387 /// Helper function to check the installed software version against the required software version.
388 ///
389 /// \param [in] radeonSoftwareVersionReported The Radeon Software Version returned from \ref AGSGPUInfo::radeonSoftwareVersion.
390 /// \param [in] radeonSoftwareVersionRequired The Radeon Software Version to check against. This is specificed using \ref AGS_MAKE_VERSION.
391 /// \return The result of the check.
392 ///
393 AMD_AGS_API AGSDriverVersionResult agsCheckDriverVersion( const char* radeonSoftwareVersionReported, unsigned int radeonSoftwareVersionRequired );
394 
395 ///
396 /// Function to return the AGS version number.
397 ///
398 /// \return The version number made using AGS_MAKE_VERSION( AMD_AGS_VERSION_MAJOR, AMD_AGS_VERSION_MINOR, AMD_AGS_VERSION_PATCH ).
399 ///
401 
402 ///
403 /// Function used to initialize the AGS library.
404 /// agsVersion must be specified as AGS_CURRENT_VERSION or the call will return \ref AGS_INVALID_ARGS.
405 /// Must be called prior to any of the subsequent AGS API calls.
406 /// Must be called prior to ID3D11Device or ID3D12Device creation.
407 /// \note The caller of this function should handle the possibility of the call failing in the cases below. One option is to do a vendor id check and only call \ref agsInitialize if there is an AMD GPU present.
408 /// \note This function will fail with \ref AGS_NO_AMD_DRIVER_INSTALLED if there is no AMD driver found on the system.
409 /// \note This function will fail with \ref AGS_LEGACY_DRIVER in Catalyst versions before 12.20.
410 ///
411 /// \param [in] agsVersion The API version specified using the \ref AGS_CURRENT_VERSION macro. If this does not match the version in the binary this initialization call will fail.
412 /// \param [in] config Optional pointer to a AGSConfiguration struct to override the default library configuration.
413 /// \param [out] context Address of a pointer to a context. This function allocates a context on the heap which is then required for all subsequent API calls.
414 /// \param [out] gpuInfo Optional pointer to a AGSGPUInfo struct which will get filled in for all the GPUs in the system.
415 ///
416 AMD_AGS_API AGSReturnCode agsInitialize( int agsVersion, const AGSConfiguration* config, AGSContext** context, AGSGPUInfo* gpuInfo );
417 
418 ///
419 /// Function used to clean up the AGS library.
420 ///
421 /// \param [in] context Pointer to a context. This function will deallocate the context from the heap.
422 ///
423 AMD_AGS_API AGSReturnCode agsDeInitialize( AGSContext* context );
424 
425 ///
426 /// Function used to set a specific display into HDR mode
427 /// \note Setting all of the values apart from color space and transfer function to zero will cause the display to use defaults.
428 /// \note Call this function after each mode change (switch to fullscreen, any change in swapchain etc).
429 /// \note HDR10 PQ mode requires a 1010102 swapchain.
430 /// \note HDR10 scRGB mode requires an FP16 swapchain.
431 /// \note Freesync HDR scRGB mode requires an FP16 swapchain.
432 /// \note Freesync HDR Gamma 2.2 mode requires a 1010102 swapchain.
433 /// \note Dolby Vision requires a 8888 UNORM swapchain.
434 ///
435 /// \param [in] context Pointer to a context. This is generated by \ref agsInitialize
436 /// \param [in] deviceIndex The index of the device listed in \ref AGSGPUInfo::devices.
437 /// \param [in] displayIndex The index of the display listed in \ref AGSDeviceInfo::displays.
438 /// \param [in] settings Pointer to the display settings to use.
439 ///
440 AMD_AGS_API AGSReturnCode agsSetDisplayMode( AGSContext* context, int deviceIndex, int displayIndex, const AGSDisplaySettings* settings );
441 
442 /// @}
443 
444 /// @}
445 
446 
447 /// \defgroup dxappreg App Registration
448 /// @{
449 /// This extension allows an application to voluntarily register itself with the driver, providing a more robust app detection solution and avoid the issue of the driver relying on exe names to match the app to a driver profile.
450 /// It is available when creating the device for both DirectX11 and DirectX12 via \ref agsDriverExtensionsDX11_CreateDevice and \ref agsDriverExtensionsDX12_CreateDevice respectively.
451 /// This feature is supported in Radeon Software Version 17.9.2 onwards.
452 /// Rules:
453 /// * AppName or EngineName must be set, but both are not required. Engine profiles will be used only if app specific profiles do not exist.
454 /// * In an engine, the EngineName should be set, so a default profile can be built. If an app modifies the engine, the AppName should be set, to allow a profile for the specific app.
455 /// * Version number is not mandatory, but recommended. The use of which can prevent the use of profiles for incompatible versions (for instance engine versions that introduce or change features), and can help prevent older profiles from being used (and introducing new bugs) before the profile is tested with new app builds.
456 /// * If Version numbers are used and a new version is introduced, a new profile will not be enabled until an AMD engineer has been able to update a previous profile, or make a new one.
457 ///
458 /// The cases for profile selection are as follows:
459 ///
460 /// |Case|Profile Applied|
461 /// |----|---------------|
462 /// | App or Engine Version has profile | The profile is used. |
463 /// | App or Engine Version num < profile version num | The closest profile > the version number is used. |
464 /// | App or Engine Version num > profile version num | No profile selected/The previous method is used. |
465 /// | App and Engine Version have profile | The App's profile is used. |
466 /// | App and Engine Version num < profile version | The closest App profile > the version number is used. |
467 /// | App and Engine Version, no App profile found | The Engine profile will be used. |
468 /// | App/Engine name but no Version, has profile | The latest profile is used. |
469 /// | No name or version, or no profile | The previous app detection method is used. |
470 ///
471 /// As shown above, if an App name is given, and a profile is found for that app, that will be prioritized. The Engine name and profile will be used only if no app name is given, or no viable profile is found for the app name.
472 /// In the case that App nor Engine have a profile, the previous app detection methods will be used. If given a version number that is larger than any profile version number, no profile will be selected.
473 /// This is specifically to prevent cases where an update to an engine or app will cause catastrophic breaks in the profile, allowing an engineer to test the profile before clearing it for public use with the new engine/app update.
474 ///
475 /// @}
476 
477 /// \defgroup dx12 DirectX12 Extensions
478 /// DirectX12 driver extensions
479 /// @{
480 
481 /// \defgroup dx12init Device and device object creation and cleanup
482 /// It is now mandatory to call \ref agsDriverExtensionsDX12_CreateDevice when creating a device if the user wants to access any future DX12 AMD extensions.
483 /// The corresponding \ref agsDriverExtensionsDX12_DestroyDevice call must be called to release the device and free up the internal resources allocated by the create call.
484 /// @{
485 
486 /// The struct to specify the DX12 device creation parameters
488 {
489  IDXGIAdapter* pAdapter; ///< Pointer to the adapter to use when creating the device. This may be null.
490  IID iid; ///< The interface ID for the type of device to be created.
491  D3D_FEATURE_LEVEL FeatureLevel; ///< The minimum feature level to create the device with.
493 
494 /// The struct to specify DX12 additional device creation parameters
496 {
497  const WCHAR* pAppName; ///< Application name
498  const WCHAR* pEngineName; ///< Engine name
499  unsigned int appVersion; ///< Application version
500  unsigned int engineVersion; ///< Engine version
501  unsigned int uavSlot; ///< The UAV slot reserved for intrinsic support. Refer to the \ref agsDriverExtensionsDX12_CreateDevice documentation for more details.
503 
504 /// The struct to hold all the returned parameters from the device creation call
505 typedef struct AGSDX12ReturnedParams
506 {
507  ID3D12Device* pDevice; ///< The newly created device
508  typedef struct ExtensionsSupported /// Extensions for DX12
509  {
510  unsigned int intrinsics16 : 1; ///< Supported in Radeon Software Version 16.9.2 onwards. ReadFirstLane, ReadLane, LaneID, Swizzle, Ballot, MBCount, Med3, Barycentrics
511  unsigned int intrinsics17 : 1; ///< Supported in Radeon Software Version 17.9.1 onwards. WaveReduce, WaveScan
512  unsigned int userMarkers : 1; ///< Supported in Radeon Software Version 17.9.1 onwards.
513  unsigned int appRegistration : 1; ///< Supported in Radeon Software Version 17.9.1 onwards.
514  unsigned int UAVBindSlot : 1; ///< Supported in Radeon Software Version 19.5.1 onwards.
515  unsigned int intrinsics19 : 1; ///< Supported in Radeon Software Version 19.12.2 onwards. DrawIndex, AtomicU64
516  unsigned int baseVertex : 1; ///< Supported in Radeon Software Version 20.2.1 onwards.
517  unsigned int baseInstance : 1; ///< Supported in Radeon Software Version 20.2.1 onwards.
518  unsigned int getWaveSize : 1; ///< Supported in Radeon Software Version 20.5.1 onwards.
519  unsigned int floatConversion : 1; ///< Supported in Radeon Software Version 20.5.1 onwards.
520  unsigned int readLaneAt : 1; ///< Supported in Radeon Software Version 20.11.2 onwards.
521  unsigned int rayHitToken : 1; ///< Supported in Radeon Software Version 20.11.2 onwards.
522  unsigned int shaderClock : 1; ///< Supported in Radeon Software Version 23.1.1 onwards.
523  unsigned int padding : 19; ///< Reserved
525  ExtensionsSupported extensionsSupported; ///< List of supported extensions
527 
528 /// The space id for DirectX12 intrinsic support
529 const unsigned int AGS_DX12_SHADER_INTRINSICS_SPACE_ID = 0x7FFF0ADE; // 2147420894
530 
531 ///
532 /// Function used to create a D3D12 device with additional AMD-specific initialization parameters.
533 ///
534 /// When using the HLSL shader extensions please note:
535 /// * The shader compiler should not use the D3DCOMPILE_SKIP_OPTIMIZATION (/Od) option or /O0, otherwise it will not work.
536 /// * The shader compiler needs D3DCOMPILE_ENABLE_STRICTNESS (/Ges) enabled.
537 /// * The intrinsic instructions require a 5.1 shader model.
538 /// * The Root Signature will need to reserve an extra UAV resource slot. This is not a real resource that requires allocating, it is just used to encode the intrinsic instructions.
539 ///
540 /// The easiest way to set up the reserved UAV slot is to specify it at u0. The register space id will automatically be assumed to be \ref AGS_DX12_SHADER_INTRINSICS_SPACE_ID.
541 /// The HLSL expects this as default and the set up code would look similar to this:
542 /// \code{.cpp}
543 /// CD3DX12_DESCRIPTOR_RANGE range[];
544 /// ...
545 /// range[ 0 ].Init( D3D12_DESCRIPTOR_RANGE_TYPE_UAV, 1, 0, AGS_DX12_SHADER_INTRINSICS_SPACE_ID ); // u0 at driver-reserved space id
546 /// \endcode
547 ///
548 /// Newer drivers also support a user-specified slot in which case the register space id is assumed to be 0. It is important that the \ref AGSDX12ReturnedParams::ExtensionsSupported::UAVBindSlot bit is set.
549 /// to ensure the driver can support this. If not, then u0 and \ref AGS_DX12_SHADER_INTRINSICS_SPACE_ID must be used.
550 /// If the driver does support this feature and a non zero slot is required, then the HLSL must also define AMD_EXT_SHADER_INTRINSIC_UAV_OVERRIDE as the matching slot value.
551 ///
552 /// \param [in] context Pointer to a context. This is generated by \ref agsInitialize
553 /// \param [in] creationParams Pointer to the struct to specify the existing DX12 device creation parameters.
554 /// \param [in] extensionParams Optional pointer to the struct to specify DX12 additional device creation parameters.
555 /// \param [out] returnedParams Pointer to struct to hold all the returned parameters from the call.
556 ///
557 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_CreateDevice( AGSContext* context, const AGSDX12DeviceCreationParams* creationParams, const AGSDX12ExtensionParams* extensionParams, AGSDX12ReturnedParams* returnedParams );
558 
559 ///
560 /// Function to destroy the D3D12 device.
561 /// This call will also cleanup any AMD-specific driver extensions for D3D12.
562 ///
563 /// \param [in] context Pointer to a context.
564 /// \param [in] device Pointer to the D3D12 device.
565 /// \param [out] deviceReferences Optional pointer to an unsigned int that will be set to the value returned from device->Release().
566 ///
567 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_DestroyDevice( AGSContext* context, ID3D12Device* device, unsigned int* deviceReferences );
568 
569 /// @}
570 
571 /// \defgroup dx12usermarkers User Markers
572 /// @{
573 
574 ///
575 /// Function used to push an AMD user marker onto the command list.
576 /// This is only has an effect if \ref AGSDX12ReturnedParams::ExtensionsSupported::userMarkers is present.
577 /// Supported in Radeon Software Version 17.9.1 onwards.
578 ///
579 /// \param [in] context Pointer to a context.
580 /// \param [in] commandList Pointer to the command list.
581 /// \param [in] data The UTF-8 marker string.
582 ///
583 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_PushMarker( AGSContext* context, ID3D12GraphicsCommandList* commandList, const char* data );
584 
585 ///
586 /// Function used to pop an AMD user marker on the command list.
587 /// Supported in Radeon Software Version 17.9.1 onwards.
588 ///
589 /// \param [in] context Pointer to a context.
590 /// \param [in] commandList Pointer to the command list.
591 ///
592 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_PopMarker( AGSContext* context, ID3D12GraphicsCommandList* commandList );
593 
594 ///
595 /// Function used to insert an single event AMD user marker onto the command list.
596 /// Supported in Radeon Software Version 17.9.1 onwards.
597 ///
598 /// \param [in] context Pointer to a context.
599 /// \param [in] commandList Pointer to the command list.
600 /// \param [in] data The UTF-8 marker string.
601 ///
602 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_SetMarker( AGSContext* context, ID3D12GraphicsCommandList* commandList, const char* data );
603 
604 /// @}
605 
606 /// @}
607 
608 /// \defgroup dx11 DirectX11 Extensions
609 /// DirectX11 driver extensions
610 /// @{
611 
612 /// \defgroup dx11init Device creation and cleanup
613 /// It is now mandatory to call \ref agsDriverExtensionsDX11_CreateDevice when creating a device if the user wants to access any DX11 AMD extensions.
614 /// The corresponding \ref agsDriverExtensionsDX11_DestroyDevice call must be called to release the device and free up the internal resources allocated by the create call.
615 /// @{
616 
617 /// The different modes to control Crossfire behavior.
618 typedef enum AGSCrossfireMode
619 {
620  AGS_CROSSFIRE_MODE_DRIVER_AFR = 0, ///< Use the default driver-based AFR rendering. If this mode is specified, do NOT use the agsDriverExtensionsDX11_Create*() APIs to create resources
621  AGS_CROSSFIRE_MODE_EXPLICIT_AFR, ///< Use the AGS Crossfire API functions to perform explicit AFR rendering without requiring a CF driver profile
622  AGS_CROSSFIRE_MODE_DISABLE ///< Completely disable AFR rendering
624 
625 /// The struct to specify the existing DX11 device creation parameters
627 {
628  IDXGIAdapter* pAdapter; ///< Consult the DX documentation on D3D11CreateDevice for this parameter
629  D3D_DRIVER_TYPE DriverType; ///< Consult the DX documentation on D3D11CreateDevice for this parameter
630  HMODULE Software; ///< Consult the DX documentation on D3D11CreateDevice for this parameter
631  UINT Flags; ///< Consult the DX documentation on D3D11CreateDevice for this parameter
632  const D3D_FEATURE_LEVEL* pFeatureLevels; ///< Consult the DX documentation on D3D11CreateDevice for this parameter
633  UINT FeatureLevels; ///< Consult the DX documentation on D3D11CreateDevice for this parameter
634  UINT SDKVersion; ///< Consult the DX documentation on D3D11CreateDevice for this parameter
635  const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc; ///< Optional swapchain description. Specify this to invoke D3D11CreateDeviceAndSwapChain instead of D3D11CreateDevice.
637 
638 /// The struct to specify DX11 additional device creation parameters
640 {
641  const WCHAR* pAppName; ///< Application name
642  const WCHAR* pEngineName; ///< Engine name
643  unsigned int appVersion; ///< Application version
644  unsigned int engineVersion; ///< Engine version
645  unsigned int numBreadcrumbMarkers; ///< The number of breadcrumb markers to allocate. Each marker is a uint64 (ie 8 bytes). If 0, the system is disabled.
646  unsigned int uavSlot; ///< The UAV slot reserved for intrinsic support. This must match the slot defined in the HLSL, i.e. "#define AmdDxExtShaderIntrinsicsUAVSlot".
647  /// The default slot is 7, but the caller is free to use an alternative slot.
648  /// If 0 is specified, then the default of 7 will be used.
649  AGSCrossfireMode crossfireMode; ///< Desired Crossfire mode
651 
652 /// The struct to hold all the returned parameters from the device creation call
653 typedef struct AGSDX11ReturnedParams
654 {
655  ID3D11Device* pDevice; ///< The newly created device
656  ID3D11DeviceContext* pImmediateContext; ///< The newly created immediate device context
657  IDXGISwapChain* pSwapChain; ///< The newly created swap chain. This is only created if a valid pSwapChainDesc is supplied in AGSDX11DeviceCreationParams.
658  D3D_FEATURE_LEVEL featureLevel; ///< The feature level supported by the newly created device
659  typedef struct ExtensionsSupported /// Extensions for DX11
660  {
661  unsigned int quadList : 1; ///< Supported in Radeon Software Version 16.9.2 onwards.
662  unsigned int screenRectList : 1; ///< Supported in Radeon Software Version 16.9.2 onwards.
663  unsigned int uavOverlap : 1; ///< Supported in Radeon Software Version 16.9.2 onwards.
664  unsigned int depthBoundsTest : 1; ///< Supported in Radeon Software Version 16.9.2 onwards.
665  unsigned int multiDrawIndirect : 1; ///< Supported in Radeon Software Version 16.9.2 onwards.
666  unsigned int multiDrawIndirectCountIndirect : 1; ///< Supported in Radeon Software Version 16.9.2 onwards.
667  unsigned int crossfireAPI : 1; ///< Supported in Radeon Software Version 16.9.2 onwards.
668  unsigned int createShaderControls : 1; ///< Supported in Radeon Software Version 16.9.2 onwards.
669  unsigned int intrinsics16 : 1; ///< Supported in Radeon Software Version 16.9.2 onwards. ReadFirstLane, ReadLane, LaneID, Swizzle, Ballot, MBCount, Med3, Barycentrics
670  unsigned int multiView : 1; ///< Supported in Radeon Software Version 16.12.1 onwards.
671  unsigned int intrinsics17 : 1; ///< Supported in Radeon Software Version 17.9.1 onwards. WaveReduce, WaveScan
672  unsigned int appRegistration : 1; ///< Supported in Radeon Software Version 17.9.1 onwards.
673  unsigned int breadcrumbMarkers : 1; ///< Supported in Radeon Software Version 17.11.1 onwards.
674  unsigned int MDIDeferredContexts : 1; ///< Supported in Radeon Software Version 18.8.1 onwards.
675  unsigned int UAVOverlapDeferredContexts : 1; ///< Supported in Radeon Software Version 18.8.1 onwards.
676  unsigned int depthBoundsDeferredContexts : 1; ///< Supported in Radeon Software Version 18.8.1 onwards.
677  unsigned int intrinsics19 : 1; ///< Supported in Radeon Software Version 19.12.2 onwards. DrawIndex, AtomicU64
678  unsigned int getWaveSize : 1; ///< Supported in Radeon Software Version 20.2.1 onwards.
679  unsigned int baseVertex : 1; ///< Supported in Radeon Software Version 20.2.1 onwards.
680  unsigned int baseInstance : 1; ///< Supported in Radeon Software Version 20.2.1 onwards.
681  unsigned int padding : 12; ///< Reserved
683  ExtensionsSupported extensionsSupported; ///< List of supported extensions
684  unsigned int crossfireGPUCount; ///< The number of GPUs that are active for this app
685  void* breadcrumbBuffer; ///< The CPU buffer returned if the initialization of the breadcrumb was successful
687 
688 ///
689 /// Function used to create a D3D11 device with additional AMD-specific initialization parameters.
690 ///
691 /// When using the HLSL shader extensions please note:
692 /// * The shader compiler should not use the D3DCOMPILE_SKIP_OPTIMIZATION (/Od) option, otherwise it will not work.
693 /// * The shader compiler needs D3DCOMPILE_ENABLE_STRICTNESS (/Ges) enabled.
694 ///
695 /// \param [in] context Pointer to a context. This is generated by \ref agsInitialize
696 /// \param [in] creationParams Pointer to the struct to specify the existing DX11 device creation parameters.
697 /// \param [in] extensionParams Optional pointer to the struct to specify DX11 additional device creation parameters.
698 /// \param [out] returnedParams Pointer to struct to hold all the returned parameters from the call.
699 ///
700 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateDevice( AGSContext* context, const AGSDX11DeviceCreationParams* creationParams, const AGSDX11ExtensionParams* extensionParams, AGSDX11ReturnedParams* returnedParams );
701 
702 ///
703 /// Function to destroy the D3D11 device and its immediate context.
704 /// This call will also cleanup any AMD-specific driver extensions for D3D11.
705 ///
706 /// \param [in] context Pointer to a context.
707 /// \param [in] device Pointer to the D3D11 device.
708 /// \param [out] deviceReferences Optional pointer to an unsigned int that will be set to the value returned from device->Release().
709 /// \param [in] immediateContext Pointer to the D3D11 immediate device context.
710 /// \param [out] immediateContextReferences Optional pointer to an unsigned int that will be set to the value returned from immediateContext->Release().
711 ///
712 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_DestroyDevice( AGSContext* context, ID3D11Device* device, unsigned int* deviceReferences, ID3D11DeviceContext* immediateContext, unsigned int* immediateContextReferences );
713 
714 /// @}
715 
716 /// \defgroup breadcrumbs Breadcrumb API
717 /// API for writing top-of-pipe and bottom-of-pipe markers to help track down GPU hangs.
718 ///
719 /// The API is available if the \ref AGSDX11ReturnedParams::ExtensionsSupported::breadcrumbMarkers is present.
720 ///
721 /// To use the API, a non zero value needs to be specificed in \ref AGSDX11ExtensionParams::numBreadcrumbMarkers. This enables the API (if available) and allocates a system memory buffer
722 /// which is returned to the user in \ref AGSDX11ReturnedParams::breadcrumbBuffer.
723 ///
724 /// The user can now write markers before and after draw calls using \ref agsDriverExtensionsDX11_WriteBreadcrumb.
725 ///
726 /// \section background Background
727 ///
728 /// A top-of-pipe (TOP) command is scheduled for execution as soon as the command processor (CP) reaches the command.
729 /// A bottom-of-pipe (BOP) command is scheduled for execution once the previous rendering commands (draw and dispatch) finish execution.
730 /// TOP and BOP commands do not block CP. i.e. the CP schedules the command for execution then proceeds to the next command without waiting.
731 /// To effectively use TOP and BOP commands, it is important to understand how they interact with rendering commands:
732 ///
733 /// When the CP encounters a rendering command it queues it for execution and moves to the next command. The queued rendering commands are issued in order.
734 /// There can be multiple rendering commands running in parallel. When a rendering command is issued we say it is at the top of the pipe. When a rendering command
735 /// finishes execution we say it has reached the bottom of the pipe.
736 ///
737 /// A BOP command remains in a waiting queue and is executed once prior rendering commands finish. The queue of BOP commands is limited to 64 entries in GCN generation 1, 2, 3, 4 and 5.
738 /// If the 64 limit is reached the CP will stop queueing BOP commands and also rendering commands. Developers should limit the number of BOP commands that write markers to avoid contention.
739 /// In general, developers should limit both TOP and BOP commands to avoid stalling the CP.
740 ///
741 /// \subsection eg1 Example 1:
742 ///
743 /// \code{.cpp}
744 /// // Start of a command buffer
745 /// WriteMarker(TopOfPipe, 1)
746 /// WriteMarker(BottomOfPipe, 2)
747 /// WriteMarker(BottomOfPipe, 3)
748 /// DrawX
749 /// WriteMarker(BottomOfPipe, 4)
750 /// WriteMarker(BottomOfPipe, 5)
751 /// WriteMarker(TopOfPipe, 6)
752 /// // End of command buffer
753 /// \endcode
754 ///
755 /// In the above example, the CP writes markers 1, 2 and 3 without waiting:
756 /// Marker 1 is TOP so it's independent from other commands
757 /// There's no wait for marker 2 and 3 because there are no draws preceding the BOP commands
758 /// Marker 4 is only written once DrawX finishes execution
759 /// Marker 5 doesn't wait for additional draws so it is written right after marker 4
760 /// Marker 6 can be written as soon as the CP reaches the command. For instance, it is very possible that CP writes marker 6 while DrawX
761 /// is running and therefore marker 6 gets written before markers 4 and 5
762 ///
763 /// \subsection eg2 Example 2:
764 ///
765 /// \code{.cpp}
766 /// WriteMarker(TopOfPipe, 1)
767 /// DrawX
768 /// WriteMarker(BottomOfPipe, 2)
769 /// WriteMarker(TopOfPipe, 3)
770 /// DrawY
771 /// WriteMarker(BottomOfPipe, 4)
772 /// \endcode
773 ///
774 /// In this example marker 1 is written before the start of DrawX
775 /// Marker 2 is written once DrawX finishes execution
776 /// Similarly marker 3 is written before the start of DrawY
777 /// Marker 4 is written once DrawY finishes execution
778 /// In case of a GPU hang, if markers 1 and 3 are written but markers 2 and 4 are missing we can conclude that:
779 /// The CP has reached both DrawX and DrawY commands since marker 1 and 3 are present
780 /// The fact that marker 2 and 4 are missing means that either DrawX is hanging while DrawY is at the top of the pipe or both DrawX and DrawY
781 /// started and both are simultaneously hanging
782 ///
783 /// \subsection eg3 Example 3:
784 ///
785 /// \code{.cpp}
786 /// // Start of a command buffer
787 /// WriteMarker(BottomOfPipe, 1)
788 /// DrawX
789 /// WriteMarker(BottomOfPipe, 2)
790 /// DrawY
791 /// WriteMarker(BottomOfPipe, 3)
792 /// DrawZ
793 /// WriteMarker(BottomOfPipe, 4)
794 /// // End of command buffer
795 /// \endcode
796 ///
797 /// In this example marker 1 is written before the start of DrawX
798 /// Marker 2 is written once DrawX finishes
799 /// Marker 3 is written once DrawY finishes
800 /// Marker 4 is written once DrawZ finishes
801 /// If the GPU hangs and only marker 1 is written we can conclude that the hang is happening in either DrawX, DrawY or DrawZ
802 /// If the GPU hangs and only marker 1 and 2 are written we can conclude that the hang is happening in DrawY or DrawZ
803 /// If the GPU hangs and only marker 4 is missing we can conclude that the hang is happening in DrawZ
804 ///
805 /// \subsection eg4 Example 4:
806 ///
807 /// \code{.cpp}
808 /// Start of a command buffer
809 /// WriteMarker(TopOfPipe, 1)
810 /// DrawX
811 /// WriteMarker(TopOfPipe, 2)
812 /// DrawY
813 /// WriteMarker(TopOfPipe, 3)
814 /// DrawZ
815 /// // End of command buffer
816 /// \endcode
817 ///
818 /// In this example, in case the GPU hangs and only marker 1 is written we can conclude that the hang is happening in DrawX
819 /// In case the GPU hangs and only marker 1 and 2 are written we can conclude that the hang is happening in DrawX or DrawY
820 /// In case the GPU hangs and all 3 markers are written we can conclude that the hang is happening in any of DrawX, DrawY or DrawZ
821 ///
822 /// \subsection eg5 Example 5:
823 ///
824 /// \code{.cpp}
825 /// DrawX
826 /// WriteMarker(TopOfPipe, 1)
827 /// WriteMarker(BottomOfPipe, 2)
828 /// DrawY
829 /// WriteMarker(TopOfPipe, 3)
830 /// WriteMarker(BottomOfPipe, 4)
831 /// \endcode
832 ///
833 /// Marker 1 is written right after DrawX is queued for execution.
834 /// Marker 2 is only written once DrawX finishes execution.
835 /// Marker 3 is written right after DrawY is queued for execution.
836 /// Marker 4 is only written once DrawY finishes execution
837 /// If marker 1 is written we would know that the CP has reached the command DrawX (DrawX at the top of the pipe).
838 /// If marker 2 is written we can say that DrawX has finished execution (DrawX at the bottom of the pipe).
839 /// In case the GPU hangs and only marker 1 and 3 are written we can conclude that the hang is happening in DrawX or DrawY
840 /// In case the GPU hangs and only marker 1 is written we can conclude that the hang is happening in DrawX
841 /// In case the GPU hangs and only marker 4 is missing we can conclude that the hang is happening in DrawY
842 ///
843 /// \section data Retrieving GPU Data
844 ///
845 /// In the event of a GPU hang, the user can inspect the system memory buffer to determine which draw has caused the hang.
846 /// For example:
847 /// \code{.cpp}
848 /// // Force the work to be flushed to prevent CPU ahead of GPU
849 /// g_pImmediateContext->Flush();
850 ///
851 /// // Present the information rendered to the back buffer to the front buffer (the screen)
852 /// HRESULT hr = g_pSwapChain->Present( 0, 0 );
853 ///
854 /// // Read the marker data buffer once detect device lost
855 /// if ( hr != S_OK )
856 /// {
857 /// for (UINT i = 0; i < g_NumMarkerWritten; i++)
858 /// {
859 /// UINT64* pTempData;
860 /// pTempData = static_cast<UINT64*>(pMarkerBuffer);
861 ///
862 /// // Write the marker data to file
863 /// ofs << i << "\r\n";
864 /// ofs << std::hex << *(pTempData + i * 2) << "\r\n";
865 /// ofs << std::hex << *(pTempData + (i * 2 + 1)) << "\r\n";
866 ///
867 /// WCHAR s1[256];
868 /// setlocale(LC_NUMERIC, "en_US.iso88591");
869 ///
870 /// // Output the marker data to console
871 /// swprintf(s1, 256, L" The Draw count is %d; The Top maker is % 016llX and the Bottom marker is % 016llX \r\n", i, *(pTempData + i * 2), *(pTempData + (i * 2 + 1)));
872 ///
873 /// OutputDebugStringW(s1);
874 /// }
875 /// }
876 /// \endcode
877 ///
878 /// The console output would resemble something like:
879 /// \code{.cpp}
880 /// D3D11: Removing Device.
881 /// D3D11 ERROR: ID3D11Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DEVICE_HUNG: The Device took an unreasonable amount of time to execute its commands, or the hardware crashed/hung. As a result, the TDR (Timeout Detection and Recovery) mechanism has been triggered. The current Device Context was executing commands when the hang occurred. The application may want to respawn and fallback to less aggressive use of the display hardware). [ EXECUTION ERROR #378: DEVICE_REMOVAL_PROCESS_AT_FAULT]
882 /// The Draw count is 0; The Top maker is 00000000DEADCAFE and the Bottom marker is 00000000DEADBEEF
883 /// The Draw count is 1; The Top maker is 00000000DEADCAFE and the Bottom marker is 00000000DEADBEEF
884 /// The Draw count is 2; The Top maker is 00000000DEADCAFE and the Bottom marker is 00000000DEADBEEF
885 /// The Draw count is 3; The Top maker is 00000000DEADCAFE and the Bottom marker is 00000000DEADBEEF
886 /// The Draw count is 4; The Top maker is 00000000DEADCAFE and the Bottom marker is 00000000DEADBEEF
887 /// The Draw count is 5; The Top maker is CDCDCDCDCDCDCDCD and the Bottom marker is CDCDCDCDCDCDCDCD
888 /// The Draw count is 6; The Top maker is CDCDCDCDCDCDCDCD and the Bottom marker is CDCDCDCDCDCDCDCD
889 /// The Draw count is 7; The Top maker is CDCDCDCDCDCDCDCD and the Bottom marker is CDCDCDCDCDCDCDCD
890 /// \endcode
891 ///
892 /// @{
893 
894 /// The breadcrumb marker struct used by \ref agsDriverExtensionsDX11_WriteBreadcrumb
895 typedef struct AGSBreadcrumbMarker
896 {
897  /// The marker type
898  typedef enum Type
899  {
900  TopOfPipe = 0, ///< Top-of-pipe marker
901  BottomOfPipe = 1 ///< Bottom-of-pipe marker
902  } Type;
903 
904  unsigned long long markerData; ///< The user data to write.
905  Type type; ///< Whether this marker is top or bottom of pipe.
906  unsigned int index; ///< The index of the marker. This should be less than the value specified in \ref AGSDX11ExtensionParams::numBreadcrumbMarkers
908 
909 ///
910 /// Function to write a breadcrumb marker.
911 ///
912 /// This method inserts a write marker operation in the GPU command stream. In the case where the GPU is hanging the write
913 /// command will never be reached and the marker will never get written to memory.
914 ///
915 /// In order to use this function, \ref AGSDX11ExtensionParams::numBreadcrumbMarkers must be set to a non zero value.
916 ///
917 /// \param [in] context Pointer to a context.
918 /// \param [in] marker Pointer to a marker.
919 ///
921 
922 /// @}
923 
924 /// \defgroup dx11Topology Extended Topology
925 /// API for primitive topologies
926 /// @{
927 
928 /// Additional topologies supported via extensions
930 {
932  AGS_PRIMITIVE_TOPOLOGY_SCREENRECTLIST = 9 ///< Screen rect list
934 
935 ///
936 /// Function used to set the primitive topology. If you are using any of the extended topology types, then this function should
937 /// be called to set ALL topology types.
938 ///
939 /// The Quad List extension is a convenient way to submit quads without using an index buffer. Note that this still submits two triangles at the driver level.
940 /// In order to use this function, AGS must already be initialized and agsDriverExtensionsDX11_Init must have been called successfully.
941 ///
942 /// The Screen Rect extension, which is only available on GCN hardware, allows the user to pass in three of the four corners of a rectangle.
943 /// The hardware then uses the bounding box of the vertices to rasterize the rectangle primitive (i.e. as a rectangle rather than two triangles).
944 /// \note Note that this will not return valid interpolated values, only valid SV_Position values.
945 /// \note If either the Quad List or Screen Rect extension are used, then agsDriverExtensionsDX11_IASetPrimitiveTopology should be called in place of the native DirectX11 equivalent all the time.
946 ///
947 /// \param [in] context Pointer to a context.
948 /// \param [in] topology The topology to set on the D3D11 device. This can be either an AGS-defined topology such as AGS_PRIMITIVE_TOPOLOGY_QUADLIST
949 /// or a standard D3D-defined topology such as D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP.
950 /// NB. the AGS-defined types will require casting to a D3D_PRIMITIVE_TOPOLOGY type.
951 ///
952 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_IASetPrimitiveTopology( AGSContext* context, D3D_PRIMITIVE_TOPOLOGY topology );
953 
954 /// @}
955 
956 /// \defgroup dx11UAVOverlap UAV Overlap
957 /// API for enabling overlapping UAV writes
958 ///
959 /// The AMD DX11 driver will automatically track resource usage and insert barriers as necessary to clear read-after-write (RAW) and write-after-write (WAW)
960 /// hazards. The UAV overlap extension allows applications to indicate to the driver it can skip inserting barriers for UAV resources used in
961 /// dispatches and draws within the \ref agsDriverExtensionsDX11_BeginUAVOverlap/ \ref agsDriverExtensionsDX11_EndUAVOverlap calls. This can be useful for applications to allow
962 /// multiple back-to-back dispatches or draws in flight even if they are accessing the same UAV resource but the data written or read does not overlap within the resource.
963 ///
964 /// Usage would be as follows:
965 /// \code{.cpp}
966 /// m_device->Dispatch( ... ); // First call that writes to the UAV
967 ///
968 /// // Disable automatic WAW syncs
969 /// agsDriverExtensionsDX11_BeginUAVOverlap( m_agsContext );
970 ///
971 /// // Submit other dispatches that write to the same UAV concurrently
972 /// m_device->Dispatch( ... );
973 /// m_device->Dispatch( ... );
974 /// m_device->Dispatch( ... );
975 ///
976 /// // Reenable automatic WAW syncs
977 /// agsDriverExtensionsDX11_EndUAVOverlap( m_agsContext );
978 /// \endcode
979 /// @{
980 
981 ///
982 /// Function used indicate to the driver the start of the overlap scope.
983 ///
984 /// \param [in] context Pointer to a context.
985 /// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed.
986 /// with the AGS_DX11_EXTENSION_DEFERRED_CONTEXTS bit.
987 ///
988 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_BeginUAVOverlap( AGSContext* context, ID3D11DeviceContext* dxContext );
989 
990 ///
991 /// Function used indicate to the driver the end of the overlap scope.
992 ///
993 /// \param [in] context Pointer to a context.
994 /// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed.
995 /// with the AGS_DX11_EXTENSION_DEFERRED_CONTEXTS bit.
996 ///
997 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_EndUAVOverlap( AGSContext* context, ID3D11DeviceContext* dxContext );
998 
999 /// @}
1000 
1001 /// \defgroup dx11DepthBoundsTest Depth Bounds Test
1002 /// API for enabling depth bounds testing
1003 /// @{
1004 
1005 ///
1006 /// Function used to set the depth bounds test extension
1007 ///
1008 /// \param [in] context Pointer to a context
1009 /// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed.
1010 /// \param [in] enabled Whether to enable or disable the depth bounds testing. If disabled, the next two args are ignored.
1011 /// \param [in] minDepth The near depth range to clip against.
1012 /// \param [in] maxDepth The far depth range to clip against.
1013 ///
1014 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetDepthBounds( AGSContext* context, ID3D11DeviceContext* dxContext, bool enabled, float minDepth, float maxDepth );
1015 
1016 /// @}
1017 
1018 /// \defgroup mdi Multi Draw Indirect (MDI)
1019 /// API for dispatching multiple instanced draw commands.
1020 /// The multi draw indirect extensions allow multiple sets of DrawInstancedIndirect to be submitted in one API call.
1021 /// The draw calls are issued on the GPU's command processor (CP), potentially saving the significant CPU overheads incurred by submitting the equivalent draw calls on the CPU.
1022 ///
1023 /// The extension allows the following code:
1024 /// \code{.cpp}
1025 /// // Submit n batches of DrawIndirect calls
1026 /// for ( int i = 0; i < n; i++ )
1027 /// deviceContext->DrawIndexedInstancedIndirect( buffer, i * sizeof( cmd ) );
1028 /// \endcode
1029 /// To be replaced by the following call:
1030 /// \code{.cpp}
1031 /// // Submit all n batches in one call
1032 /// agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirect( m_agsContext, deviceContext, n, buffer, 0, sizeof( cmd ) );
1033 /// \endcode
1034 ///
1035 /// The buffer used for the indirect args must be of the following formats:
1036 /// \code{.cpp}
1037 /// // Buffer layout for agsDriverExtensions_MultiDrawInstancedIndirect
1038 /// struct DrawInstancedIndirectArgs
1039 /// {
1040 /// UINT VertexCountPerInstance;
1041 /// UINT InstanceCount;
1042 /// UINT StartVertexLocation;
1043 /// UINT StartInstanceLocation;
1044 /// };
1045 ///
1046 /// // Buffer layout for agsDriverExtensions_MultiDrawIndexedInstancedIndirect
1047 /// struct DrawIndexedInstancedIndirectArgs
1048 /// {
1049 /// UINT IndexCountPerInstance;
1050 /// UINT InstanceCount;
1051 /// UINT StartIndexLocation;
1052 /// UINT BaseVertexLocation;
1053 /// UINT StartInstanceLocation;
1054 /// };
1055 /// \endcode
1056 ///
1057 /// Example usage can be seen in AMD's GeometryFX (https://github.com/GPUOpen-Effects/GeometryFX). In particular, in this file: https://github.com/GPUOpen-Effects/GeometryFX/blob/master/amd_geometryfx/src/AMD_GeometryFX_Filtering.cpp
1058 ///
1059 /// @{
1060 
1061 ///
1062 /// Function used to submit a batch of draws via MultiDrawIndirect
1063 ///
1064 /// \param [in] context Pointer to a context.
1065 /// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed.
1066 /// \param [in] drawCount The number of draws.
1067 /// \param [in] pBufferForArgs The args buffer.
1068 /// \param [in] alignedByteOffsetForArgs The offset into the args buffer.
1069 /// \param [in] byteStrideForArgs The per element stride of the args buffer.
1070 ///
1071 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawInstancedIndirect( AGSContext* context, ID3D11DeviceContext* dxContext, unsigned int drawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs );
1072 
1073 ///
1074 /// Function used to submit a batch of draws via MultiDrawIndirect
1075 ///
1076 /// \param [in] context Pointer to a context.
1077 /// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed.
1078 /// \param [in] drawCount The number of draws.
1079 /// \param [in] pBufferForArgs The args buffer.
1080 /// \param [in] alignedByteOffsetForArgs The offset into the args buffer.
1081 /// \param [in] byteStrideForArgs The per element stride of the args buffer.
1082 ///
1083 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirect( AGSContext* context, ID3D11DeviceContext* dxContext, unsigned int drawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs );
1084 
1085 ///
1086 /// Function used to submit a batch of draws via MultiDrawIndirect
1087 ///
1088 /// \param [in] context Pointer to a context.
1089 /// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed.
1090 /// \param [in] pBufferForDrawCount The draw count buffer.
1091 /// \param [in] alignedByteOffsetForDrawCount The offset into the draw count buffer.
1092 /// \param [in] pBufferForArgs The args buffer.
1093 /// \param [in] alignedByteOffsetForArgs The offset into the args buffer.
1094 /// \param [in] byteStrideForArgs The per element stride of the args buffer.
1095 ///
1096 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawInstancedIndirectCountIndirect( AGSContext* context, ID3D11DeviceContext* dxContext, ID3D11Buffer* pBufferForDrawCount, unsigned int alignedByteOffsetForDrawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs );
1097 
1098 ///
1099 /// Function used to submit a batch of draws via MultiDrawIndirect
1100 ///
1101 /// \param [in] context Pointer to a context.
1102 /// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed.
1103 /// \param [in] pBufferForDrawCount The draw count buffer.
1104 /// \param [in] alignedByteOffsetForDrawCount The offset into the draw count buffer.
1105 /// \param [in] pBufferForArgs The args buffer.
1106 /// \param [in] alignedByteOffsetForArgs The offset into the args buffer.
1107 /// \param [in] byteStrideForArgs The per element stride of the args buffer.
1108 ///
1109 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirectCountIndirect( AGSContext* context, ID3D11DeviceContext* dxContext, ID3D11Buffer* pBufferForDrawCount, unsigned int alignedByteOffsetForDrawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs );
1110 
1111 /// @}
1112 
1113 /// \defgroup shadercompiler Shader Compiler Controls
1114 /// API for controlling DirectX11 shader compilation.
1115 /// Check support for this feature using the AGS_DX11_EXTENSION_CREATE_SHADER_CONTROLS bit.
1116 /// Supported in Radeon Software Version 16.9.2 (driver version 16.40.2311) onwards.
1117 /// @{
1118 
1119 ///
1120 /// This method can be used to limit the maximum number of threads the driver uses for asynchronous shader compilation.
1121 /// Setting it to 0 will disable asynchronous compilation completely and force the shaders to be compiled "inline" on the threads that call Create*Shader.
1122 ///
1123 /// This method can only be called before any shaders are created and being compiled by the driver.
1124 /// If this method is called after shaders have been created the function will return AGS_FAILURE.
1125 /// This function only sets an upper limit.The driver may create fewer threads than allowed by this function.
1126 ///
1127 /// \param [in] context Pointer to a context.
1128 /// \param [in] numberOfThreads The maximum number of threads to use.
1129 ///
1130 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetMaxAsyncCompileThreadCount( AGSContext* context, unsigned int numberOfThreads );
1131 
1132 ///
1133 /// This method can be used to determine the total number of asynchronous shader compile jobs that are either
1134 /// queued for waiting for compilation or being compiled by the driver's asynchronous compilation threads.
1135 /// This method can be called at any during the lifetime of the driver.
1136 ///
1137 /// \param [in] context Pointer to a context.
1138 /// \param [out] numberOfJobs Pointer to the number of jobs in flight currently.
1139 ///
1140 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NumPendingAsyncCompileJobs( AGSContext* context, unsigned int* numberOfJobs );
1141 
1142 ///
1143 /// This method can be used to enable or disable the disk based shader cache.
1144 /// Enabling/disabling the disk cache is not supported if is it disabled explicitly via Radeon Settings or by an app profile.
1145 /// Calling this method under these conditions will result in AGS_FAILURE being returned.
1146 /// It is recommended that this method be called before any shaders are created by the application and being compiled by the driver.
1147 /// Doing so at any other time may result in the cache being left in an inconsistent state.
1148 ///
1149 /// \param [in] context Pointer to a context.
1150 /// \param [in] enable Whether to enable the disk cache. 0 to disable, 1 to enable.
1151 ///
1153 
1154 /// @}
1155 
1156 /// \defgroup multiview Multiview
1157 /// API for multiview broadcasting.
1158 /// Check support for this feature using the AGS_DX11_EXTENSION_MULTIVIEW bit.
1159 /// Supported in Radeon Software Version 16.12.1 (driver version 16.50.2001) onwards.
1160 /// @{
1161 
1162 ///
1163 /// Function to control draw calls replication to multiple viewports and RT slices.
1164 /// Setting any mask to 0 disables draw replication.
1165 ///
1166 /// \param [in] context Pointer to a context.
1167 /// \param [in] vpMask Viewport control bit mask.
1168 /// \param [in] rtSliceMask RT slice control bit mask.
1169 /// \param [in] vpMaskPerRtSliceEnabled If 0, 16 lower bits of vpMask apply to all RT slices; if 1 each 16 bits of 64-bit mask apply to corresponding 4 RT slices.
1170 ///
1171 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetViewBroadcastMasks( AGSContext* context, unsigned long long vpMask, unsigned long long rtSliceMask, int vpMaskPerRtSliceEnabled );
1172 
1173 ///
1174 /// Function returns max number of supported clip rectangles.
1175 ///
1176 /// \param [in] context Pointer to a context.
1177 /// \param [out] maxRectCount Returned max number of clip rectangles.
1178 ///
1179 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_GetMaxClipRects( AGSContext* context, unsigned int* maxRectCount );
1180 
1181 /// The clip rectangle struct used by \ref agsDriverExtensionsDX11_SetClipRects
1182 typedef struct AGSClipRect
1183 {
1184  /// The inclusion mode for the rect
1185  typedef enum Mode
1186  {
1187  ClipRectIncluded = 0, ///< Include the rect
1188  ClipRectExcluded = 1 ///< Exclude the rect
1189  } Mode;
1190 
1191  Mode mode; ///< Include/exclude rect region
1192  AGSRect rect; ///< The rect to include/exclude
1193 } AGSClipRect;
1194 
1195 ///
1196 /// Function sets clip rectangles.
1197 ///
1198 /// \param [in] context Pointer to a context.
1199 /// \param [in] clipRectCount Number of specified clip rectangles. Use 0 to disable clip rectangles.
1200 /// \param [in] clipRects Array of clip rectangles.
1201 ///
1202 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetClipRects( AGSContext* context, unsigned int clipRectCount, const AGSClipRect* clipRects );
1203 
1204 /// @}
1205 
1206 /// \defgroup cfxapi Explicit Crossfire API
1207 /// API for explicit control over Crossfire
1208 /// @{
1209 
1210 /// The Crossfire API transfer types
1212 {
1213  AGS_AFR_TRANSFER_DEFAULT = 0, ///< Default Crossfire driver resource tracking
1214  AGS_AFR_TRANSFER_DISABLE = 1, ///< Turn off driver resource tracking
1215  AGS_AFR_TRANSFER_1STEP_P2P = 2, ///< App controlled GPU to next GPU transfer
1216  AGS_AFR_TRANSFER_2STEP_NO_BROADCAST = 3, ///< App controlled GPU to next GPU transfer using intermediate system memory
1217  AGS_AFR_TRANSFER_2STEP_WITH_BROADCAST = 4, ///< App controlled GPU to all render GPUs transfer using intermediate system memory
1219 
1220 /// The Crossfire API transfer engines
1222 {
1223  AGS_AFR_TRANSFERENGINE_DEFAULT = 0, ///< Use default engine for Crossfire API transfers
1224  AGS_AFR_TRANSFERENGINE_3D_ENGINE = 1, ///< Use 3D engine for Crossfire API transfers
1225  AGS_AFR_TRANSFERENGINE_COPY_ENGINE = 2, ///< Use Copy engine for Crossfire API transfers
1227 
1228 ///
1229 /// Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine.
1230 ///
1231 /// \param [in] context Pointer to a context.
1232 /// \param [in] desc Pointer to the D3D11 resource description.
1233 /// \param [in] initialData Optional pointer to the initializing data for the resource.
1234 /// \param [out] buffer Returned pointer to the resource.
1235 /// \param [in] transferType The transfer behavior.
1236 /// \param [in] transferEngine The transfer engine to use.
1237 ///
1238 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateBuffer( AGSContext* context, const D3D11_BUFFER_DESC* desc, const D3D11_SUBRESOURCE_DATA* initialData, ID3D11Buffer** buffer, AGSAfrTransferType transferType, AGSAfrTransferEngine transferEngine );
1239 
1240 ///
1241 /// Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine.
1242 ///
1243 /// \param [in] context Pointer to a context.
1244 /// \param [in] desc Pointer to the D3D11 resource description.
1245 /// \param [in] initialData Optional pointer to the initializing data for the resource.
1246 /// \param [out] texture1D Returned pointer to the resource.
1247 /// \param [in] transferType The transfer behavior.
1248 /// \param [in] transferEngine The transfer engine to use.
1249 ///
1250 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateTexture1D( AGSContext* context, const D3D11_TEXTURE1D_DESC* desc, const D3D11_SUBRESOURCE_DATA* initialData, ID3D11Texture1D** texture1D, AGSAfrTransferType transferType, AGSAfrTransferEngine transferEngine );
1251 
1252 ///
1253 /// Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine.
1254 ///
1255 /// \param [in] context Pointer to a context.
1256 /// \param [in] desc Pointer to the D3D11 resource description.
1257 /// \param [in] initialData Optional pointer to the initializing data for the resource.
1258 /// \param [out] texture2D Returned pointer to the resource.
1259 /// \param [in] transferType The transfer behavior.
1260 /// \param [in] transferEngine The transfer engine to use.
1261 ///
1262 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateTexture2D( AGSContext* context, const D3D11_TEXTURE2D_DESC* desc, const D3D11_SUBRESOURCE_DATA* initialData, ID3D11Texture2D** texture2D, AGSAfrTransferType transferType, AGSAfrTransferEngine transferEngine );
1263 
1264 ///
1265 /// Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine.
1266 ///
1267 /// \param [in] context Pointer to a context.
1268 /// \param [in] desc Pointer to the D3D11 resource description.
1269 /// \param [in] initialData Optional pointer to the initializing data for the resource.
1270 /// \param [out] texture3D Returned pointer to the resource.
1271 /// \param [in] transferType The transfer behavior.
1272 /// \param [in] transferEngine The transfer engine to use.
1273 ///
1274 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateTexture3D( AGSContext* context, const D3D11_TEXTURE3D_DESC* desc, const D3D11_SUBRESOURCE_DATA* initialData, ID3D11Texture3D** texture3D, AGSAfrTransferType transferType, AGSAfrTransferEngine transferEngine );
1275 
1276 ///
1277 /// Function to notify the driver that we have finished writing to the resource this frame.
1278 /// This will initiate a transfer for AGS_AFR_TRANSFER_1STEP_P2P,
1279 /// AGS_AFR_TRANSFER_2STEP_NO_BROADCAST, and AGS_AFR_TRANSFER_2STEP_WITH_BROADCAST.
1280 ///
1281 /// \param [in] context Pointer to a context.
1282 /// \param [in] resource Pointer to the resource.
1283 /// \param [in] transferRegions An array of transfer regions (can be null to specify the whole area).
1284 /// \param [in] subresourceArray An array of subresource indices (can be null to specify all subresources).
1285 /// \param [in] numSubresources The 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).
1286 ///
1287 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NotifyResourceEndWrites( AGSContext* context, ID3D11Resource* resource, const D3D11_RECT* transferRegions, const unsigned int* subresourceArray, unsigned int numSubresources );
1288 
1289 ///
1290 /// This will notify the driver that the app will begin read/write access to the resource.
1291 ///
1292 /// \param [in] context Pointer to a context.
1293 /// \param [in] resource Pointer to the resource.
1294 ///
1295 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NotifyResourceBeginAllAccess( AGSContext* context, ID3D11Resource* resource );
1296 
1297 ///
1298 /// This is used for AGS_AFR_TRANSFER_1STEP_P2P to notify when it is safe to initiate a transfer.
1299 /// This call in frame N-(NumGpus-1) allows a 1 step P2P in frame N to start.
1300 /// This should be called after agsDriverExtensionsDX11_NotifyResourceEndWrites.
1301 ///
1302 /// \param [in] context Pointer to a context.
1303 /// \param [in] resource Pointer to the resource.
1304 ///
1305 AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NotifyResourceEndAllAccess( AGSContext* context, ID3D11Resource* resource );
1306 
1307 /// @}
1308 
1309 /// @}
1310 
1311 /// \defgroup typedefs Function pointer typedefs
1312 /// List of function pointer typedefs for the API
1313 /// @{
1314 
1315 typedef AMD_AGS_API AGSDriverVersionResult (*AGS_CHECKDRIVERVERSION)( const char*, unsigned int ); ///< \ref agsCheckDriverVersion
1316 typedef AMD_AGS_API int (*AGS_GETVERSIONNUMBER)(); ///< \ref agsGetVersionNumber
1317 typedef AMD_AGS_API AGSReturnCode (*AGS_INITIALIZE)( int, const AGSConfiguration*, AGSContext**, AGSGPUInfo* ); ///< \ref agsInitialize
1318 typedef AMD_AGS_API AGSReturnCode (*AGS_DEINITIALIZE)( AGSContext* ); ///< \ref agsDeInitialize
1319 typedef AMD_AGS_API AGSReturnCode (*AGS_SETDISPLAYMODE)( AGSContext*, int, int, const AGSDisplaySettings* ); ///< \ref agsSetDisplayMode
1320 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX12_CREATEDEVICE)( AGSContext*, const AGSDX12DeviceCreationParams*, const AGSDX12ExtensionParams*, AGSDX12ReturnedParams* ); ///< \ref agsDriverExtensionsDX12_CreateDevice
1321 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX12_DESTROYDEVICE)( AGSContext*, ID3D12Device*, unsigned int* ); ///< \ref agsDriverExtensionsDX12_DestroyDevice
1322 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX12_PUSHMARKER)( AGSContext*, ID3D12GraphicsCommandList*, const char* ); ///< \ref agsDriverExtensionsDX12_PushMarker
1323 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX12_POPMARKER)( AGSContext*, ID3D12GraphicsCommandList* ); ///< \ref agsDriverExtensionsDX12_PopMarker
1324 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX12_SETMARKER)( AGSContext*, ID3D12GraphicsCommandList*, const char* ); ///< \ref agsDriverExtensionsDX12_SetMarker
1325 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_CREATEDEVICE)( AGSContext*, const AGSDX11DeviceCreationParams*, const AGSDX11ExtensionParams*, AGSDX11ReturnedParams* ); ///< \ref agsDriverExtensionsDX11_CreateDevice
1326 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_DESTROYDEVICE)( AGSContext*, ID3D11Device*, unsigned int*, ID3D11DeviceContext*, unsigned int* ); ///< \ref agsDriverExtensionsDX11_DestroyDevice
1327 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_WRITEBREADCRUMB)( AGSContext*, const AGSBreadcrumbMarker* ); ///< \ref agsDriverExtensionsDX11_WriteBreadcrumb
1328 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_IASETPRIMITIVETOPOLOGY)( AGSContext*, enum D3D_PRIMITIVE_TOPOLOGY ); ///< \ref agsDriverExtensionsDX11_IASetPrimitiveTopology
1329 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_BEGINUAVOVERLAP)( AGSContext*, ID3D11DeviceContext* ); ///< \ref agsDriverExtensionsDX11_BeginUAVOverlap
1330 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_ENDUAVOVERLAP)( AGSContext*, ID3D11DeviceContext* ); ///< \ref agsDriverExtensionsDX11_EndUAVOverlap
1331 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_SETDEPTHBOUNDS)( AGSContext*, ID3D11DeviceContext*, bool, float, float ); ///< \ref agsDriverExtensionsDX11_SetDepthBounds
1332 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_MULTIDRAWINSTANCEDINDIRECT)( AGSContext*, ID3D11DeviceContext*, unsigned int, ID3D11Buffer*, unsigned int, unsigned int ); ///< \ref agsDriverExtensionsDX11_MultiDrawInstancedIndirect
1333 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_MULTIDRAWINDEXEDINSTANCEDINDIRECT)( AGSContext*, ID3D11DeviceContext*, unsigned int, ID3D11Buffer*, unsigned int, unsigned int ); ///< \ref agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirect
1334 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_MULTIDRAWINSTANCEDINDIRECTCOUNTINDIRECT)( AGSContext*, ID3D11DeviceContext*, ID3D11Buffer*, unsigned int, ID3D11Buffer*, unsigned int, unsigned int ); ///< \ref agsDriverExtensionsDX11_MultiDrawInstancedIndirectCountIndirect
1335 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_MULTIDRAWINDEXEDINSTANCEDINDIRECTCOUNTINDIRECT)( AGSContext*, ID3D11DeviceContext*, ID3D11Buffer*, unsigned int, ID3D11Buffer*, unsigned int, unsigned int ); ///< \ref agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirectCountIndirect
1336 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_SETMAXASYNCCOMPILETHREADCOUNT)( AGSContext*, unsigned int ); ///< \ref agsDriverExtensionsDX11_SetMaxAsyncCompileThreadCount
1337 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_NUMPENDINGASYNCOMPILEJOBS)( AGSContext*, unsigned int* ); ///< \ref agsDriverExtensionsDX11_NumPendingAsyncCompileJobs
1338 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_SETDISKSHADERCACHEENABLED)( AGSContext*, int ); ///< \ref agsDriverExtensionsDX11_SetDiskShaderCacheEnabled
1339 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_SETVIEWBROADCASTMASKS)( AGSContext*, unsigned long long, unsigned long long, int ); ///< \ref agsDriverExtensionsDX11_SetViewBroadcastMasks
1340 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_GETMAXCLIPRECTS)( AGSContext*, unsigned int* ); ///< \ref agsDriverExtensionsDX11_GetMaxClipRects
1341 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_SETCLIPRECTS)( AGSContext*, unsigned int, const AGSClipRect* ); ///< \ref agsDriverExtensionsDX11_SetClipRects
1342 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_CREATEBUFFER)( AGSContext*, const D3D11_BUFFER_DESC*, const D3D11_SUBRESOURCE_DATA*, ID3D11Buffer**, AGSAfrTransferType, AGSAfrTransferEngine ); ///< \ref agsDriverExtensionsDX11_CreateBuffer
1343 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_CREATETEXTURE1D)( AGSContext*, const D3D11_TEXTURE1D_DESC*, const D3D11_SUBRESOURCE_DATA*, ID3D11Texture1D**, AGSAfrTransferType, AGSAfrTransferEngine ); ///< \ref agsDriverExtensionsDX11_CreateTexture1D
1344 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_CREATETEXTURE2D)( AGSContext*, const D3D11_TEXTURE2D_DESC*, const D3D11_SUBRESOURCE_DATA*, ID3D11Texture2D**, AGSAfrTransferType, AGSAfrTransferEngine ); ///< \ref agsDriverExtensionsDX11_CreateTexture2D
1345 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_CREATETEXTURE3D)( AGSContext*, const D3D11_TEXTURE3D_DESC*, const D3D11_SUBRESOURCE_DATA*, ID3D11Texture3D**, AGSAfrTransferType, AGSAfrTransferEngine ); ///< \ref agsDriverExtensionsDX11_CreateTexture3D
1346 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_NOTIFYRESOURCEENDWRITES)( AGSContext*, ID3D11Resource*, const D3D11_RECT*, const unsigned int*, unsigned int ); ///< \ref agsDriverExtensionsDX11_NotifyResourceEndWrites
1347 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_NOTIFYRESOURCEBEGINALLACCESS)( AGSContext*, ID3D11Resource* ); ///< \ref agsDriverExtensionsDX11_NotifyResourceBeginAllAccess
1348 typedef AMD_AGS_API AGSReturnCode (*AGS_DRIVEREXTENSIONSDX11_NOTIFYRESOURCEENDALLACCESS)( AGSContext*, ID3D11Resource* ); ///< \ref agsDriverExtensionsDX11_NotifyResourceEndAllAccess
1349 /// @}
1350 
1351 #ifdef __cplusplus
1352 } // extern "C"
1353 #endif
1354 
1355 #endif // AMD_AGS_H
AGS_EXTENSION_NOT_SUPPORTED
Returned if the driver does not support the requested driver extension.
Definition: amd_ags.h:184
AGSDX12ExtensionParams::uavSlot
unsigned int uavSlot
The UAV slot reserved for intrinsic support. Refer to the agsDriverExtensionsDX12_CreateDevice docume...
Definition: amd_ags.h:501
AGSDX11ReturnedParams::ExtensionsSupported::depthBoundsTest
unsigned int depthBoundsTest
Supported in Radeon Software Version 16.9.2 onwards.
Definition: amd_ags.h:664
AGSBreadcrumbMarker::TopOfPipe
Top-of-pipe marker.
Definition: amd_ags.h:900
agsDriverExtensionsDX11_BeginUAVOverlap
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_BeginUAVOverlap(AGSContext *context, ID3D11DeviceContext *dxContext)
Function used indicate to the driver the start of the overlap scope.
AGSDisplayInfo::eyefinityPreferredDisplay
unsigned int eyefinityPreferredDisplay
The display is the preferred display in the Eyefinity group for displaying the UI.
Definition: amd_ags.h:215
AGSClipRect::mode
Mode mode
Include/exclude rect region.
Definition: amd_ags.h:1191
AGSDisplaySettings::maxFrameAverageLightLevel
double maxFrameAverageLightLevel
The maximum frame average light level in nits (MaxFALL)
Definition: amd_ags.h:371
AGSDX11ReturnedParams::pDevice
ID3D11Device * pDevice
The newly created device.
Definition: amd_ags.h:655
agsDriverExtensionsDX11_SetDepthBounds
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetDepthBounds(AGSContext *context, ID3D11DeviceContext *dxContext, bool enabled, float minDepth, float maxDepth)
Function used to set the depth bounds test extension.
AGSDeviceInfo::reservedPadding
unsigned int reservedPadding
Reserved for future use.
Definition: amd_ags.h:280
AGSDX12ReturnedParams::ExtensionsSupported
struct AGSDX12ReturnedParams::ExtensionsSupported ExtensionsSupported
Extensions for DX12.
AGSDX11ExtensionParams::appVersion
unsigned int appVersion
Application version.
Definition: amd_ags.h:643
AGSDisplaySettings::maxLuminance
double maxLuminance
The maximum scene luminance in nits.
Definition: amd_ags.h:368
AGSDeviceInfo::deviceId
int deviceId
The device id.
Definition: amd_ags.h:283
AGSDeviceInfo::AsicFamily_Count
Number of enumerated ASIC families.
Definition: amd_ags.h:272
agsDriverExtensionsDX11_WriteBreadcrumb
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_WriteBreadcrumb(AGSContext *context, const AGSBreadcrumbMarker *marker)
Function to write a breadcrumb marker.
AGSDX11ReturnedParams::extensionsSupported
ExtensionsSupported extensionsSupported
List of supported extensions.
Definition: amd_ags.h:683
AGSDisplayInfo::adlAdapterIndex
int adlAdapterIndex
The internally used ADL adapter index.
Definition: amd_ags.h:251
AGSConfiguration::allocCallback
AGS_ALLOC_CALLBACK allocCallback
Optional memory allocation callback. If not supplied, malloc() is used.
Definition: amd_ags.h:323
AGSDeviceInfo::memoryBandwidth
int memoryBandwidth
Memory bandwidth in MB/s.
Definition: amd_ags.h:292
AGSDisplaySettings::maxContentLightLevel
double maxContentLightLevel
The maximum content light level in nits (MaxCLL)
Definition: amd_ags.h:370
AGSDX11ReturnedParams::ExtensionsSupported::getWaveSize
unsigned int getWaveSize
Supported in Radeon Software Version 20.2.1 onwards.
Definition: amd_ags.h:678
AGS_DRIVEREXTENSIONSDX11_CREATEBUFFER
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_CREATEBUFFER)(AGSContext *, const D3D11_BUFFER_DESC *, const D3D11_SUBRESOURCE_DATA *, ID3D11Buffer **, AGSAfrTransferType, AGSAfrTransferEngine)
agsDriverExtensionsDX11_CreateBuffer
Definition: amd_ags.h:1342
AGSDisplayInfo::freesync
unsigned int freesync
Freesync is supported on this display.
Definition: amd_ags.h:212
agsDriverExtensionsDX11_IASetPrimitiveTopology
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_IASetPrimitiveTopology(AGSContext *context, D3D_PRIMITIVE_TOPOLOGY topology)
Function used to set the primitive topology.
AGSDX11ReturnedParams::ExtensionsSupported::appRegistration
unsigned int appRegistration
Supported in Radeon Software Version 17.9.1 onwards.
Definition: amd_ags.h:672
AGSDeviceInfo::adlAdapterIndex
int adlAdapterIndex
Internally used index into the ADL list of adapters.
Definition: amd_ags.h:309
AGSDeviceInfo::AsicFamily_Unknown
Unknown architecture, potentially from another IHV. Check AGSDeviceInfo::vendorId.
Definition: amd_ags.h:261
AGSDX11ReturnedParams::featureLevel
D3D_FEATURE_LEVEL featureLevel
The feature level supported by the newly created device.
Definition: amd_ags.h:658
agsDriverExtensionsDX11_SetMaxAsyncCompileThreadCount
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetMaxAsyncCompileThreadCount(AGSContext *context, unsigned int numberOfThreads)
This method can be used to limit the maximum number of threads the driver uses for asynchronous shade...
AGSDX12ExtensionParams
The struct to specify DX12 additional device creation parameters.
Definition: amd_ags.h:495
AGS_AFR_TRANSFER_1STEP_P2P
App controlled GPU to next GPU transfer.
Definition: amd_ags.h:1215
AGSDeviceInfo::sharedMemoryInBytes
unsigned long long sharedMemoryInBytes
The size of system memory available to the GPU in bytes.
Definition: amd_ags.h:296
AGS_PRIMITIVE_TOPOLOGY_QUADLIST
Quad list.
Definition: amd_ags.h:931
AGSBreadcrumbMarker::index
unsigned int index
The index of the marker. This should be less than the value specified in AGSDX11ExtensionParams::numB...
Definition: amd_ags.h:906
AGS_DRIVEREXTENSIONSDX11_IASETPRIMITIVETOPOLOGY
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_IASETPRIMITIVETOPOLOGY)(AGSContext *, enum D3D_PRIMITIVE_TOPOLOGY)
agsDriverExtensionsDX11_IASetPrimitiveTopology
Definition: amd_ags.h:1328
AGSDisplaySettings
struct AGSDisplaySettings AGSDisplaySettings
The struct to specify the display settings to the driver.
AGSDeviceInfo::eyefinityEnabled
int eyefinityEnabled
Indicates if Eyefinity is active.
Definition: amd_ags.h:302
AGSDX12ReturnedParams::ExtensionsSupported::baseInstance
unsigned int baseInstance
Supported in Radeon Software Version 20.2.1 onwards.
Definition: amd_ags.h:517
AGS_DRIVEREXTENSIONSDX11_NUMPENDINGASYNCOMPILEJOBS
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_NUMPENDINGASYNCOMPILEJOBS)(AGSContext *, unsigned int *)
agsDriverExtensionsDX11_NumPendingAsyncCompileJobs
Definition: amd_ags.h:1337
AGSDX11ReturnedParams
struct AGSDX11ReturnedParams AGSDX11ReturnedParams
The struct to hold all the returned parameters from the device creation call.
AGS_OUT_OF_MEMORY
Out of memory when allocating space internally.
Definition: amd_ags.h:180
AGS_CHECKDRIVERVERSION
AMD_AGS_API AGSDriverVersionResult(* AGS_CHECKDRIVERVERSION)(const char *, unsigned int)
agsCheckDriverVersion
Definition: amd_ags.h:1315
agsDriverExtensionsDX12_PopMarker
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_PopMarker(AGSContext *context, ID3D12GraphicsCommandList *commandList)
Function used to pop an AMD user marker on the command list.
AGSDeviceInfo::eyefinityBezelCompensated
int eyefinityBezelCompensated
Indicates if bezel compensation is used for the current SLS display area. 1 if enabled,...
Definition: amd_ags.h:307
AGSDX11DeviceCreationParams::SDKVersion
UINT SDKVersion
Consult the DX documentation on D3D11CreateDevice for this parameter.
Definition: amd_ags.h:634
AGSDeviceInfo::eyefinityResolutionX
int eyefinityResolutionX
Contains width in pixels of the multi-monitor Single Large Surface.
Definition: amd_ags.h:305
AGS_DRIVEREXTENSIONSDX12_DESTROYDEVICE
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX12_DESTROYDEVICE)(AGSContext *, ID3D12Device *, unsigned int *)
agsDriverExtensionsDX12_DestroyDevice
Definition: amd_ags.h:1321
AGS_DRIVEREXTENSIONSDX12_POPMARKER
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX12_POPMARKER)(AGSContext *, ID3D12GraphicsCommandList *)
agsDriverExtensionsDX12_PopMarker
Definition: amd_ags.h:1323
AGSDeviceInfo::AsicFamily
AsicFamily
The ASIC family.
Definition: amd_ags.h:259
AGSDX12ReturnedParams::extensionsSupported
ExtensionsSupported extensionsSupported
List of supported extensions.
Definition: amd_ags.h:525
AGS_D3DDEVICE_NOT_CREATED
Failure due to not creating the D3D device successfully via AGS.
Definition: amd_ags.h:187
AGSDisplayInfo::name
char name[256]
The name of the display.
Definition: amd_ags.h:206
AGSDX12DeviceCreationParams::iid
IID iid
The interface ID for the type of device to be created.
Definition: amd_ags.h:490
AGSDisplayInfo::chromaticityWhitePointY
double chromaticityWhitePointY
White point Y coord.
Definition: amd_ags.h:241
AGSDX11ReturnedParams::ExtensionsSupported
Extensions for DX11.
Definition: amd_ags.h:659
AGSDisplayInfo::logicalDisplayIndex
int logicalDisplayIndex
The internally used index of this display.
Definition: amd_ags.h:250
AGSDX11ReturnedParams::ExtensionsSupported::intrinsics17
unsigned int intrinsics17
Supported in Radeon Software Version 17.9.1 onwards. WaveReduce, WaveScan.
Definition: amd_ags.h:671
AGSDX12ReturnedParams::pDevice
ID3D12Device * pDevice
The newly created device.
Definition: amd_ags.h:507
AGSDX11ReturnedParams::ExtensionsSupported::screenRectList
unsigned int screenRectList
Supported in Radeon Software Version 16.9.2 onwards.
Definition: amd_ags.h:662
AGSDX11ReturnedParams::ExtensionsSupported::multiDrawIndirectCountIndirect
unsigned int multiDrawIndirectCountIndirect
Supported in Radeon Software Version 16.9.2 onwards.
Definition: amd_ags.h:666
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 ...
AGS_DRIVEREXTENSIONSDX11_MULTIDRAWINDEXEDINSTANCEDINDIRECTCOUNTINDIRECT
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_MULTIDRAWINDEXEDINSTANCEDINDIRECTCOUNTINDIRECT)(AGSContext *, ID3D11DeviceContext *, ID3D11Buffer *, unsigned int, ID3D11Buffer *, unsigned int, unsigned int)
agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirectCountIndirect
Definition: amd_ags.h:1335
AGSDisplaySettings::chromaticityBlueX
double chromaticityBlueX
Blue display primary X coord.
Definition: amd_ags.h:361
AGSDX11ReturnedParams::ExtensionsSupported::createShaderControls
unsigned int createShaderControls
Supported in Radeon Software Version 16.9.2 onwards.
Definition: amd_ags.h:668
AGS_DX_FAILURE
Failure from DirectX runtime.
Definition: amd_ags.h:186
AGSDeviceInfo::numWGPs
int numWGPs
Number of RDNA Work Group Processors. Only valid if ASIC is RDNA onwards.
Definition: amd_ags.h:287
AGSDisplayInfo::chromaticityWhitePointX
double chromaticityWhitePointX
White point X coord.
Definition: amd_ags.h:240
agsDriverExtensionsDX11_SetDiskShaderCacheEnabled
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetDiskShaderCacheEnabled(AGSContext *context, int enable)
This method can be used to enable or disable the disk based shader cache.
AGSBreadcrumbMarker::markerData
unsigned long long markerData
The user data to write.
Definition: amd_ags.h:904
AGSDriverVersionResult
AGSDriverVersionResult
The result returned from agsCheckDriverVersion.
Definition: amd_ags.h:379
AGSDX11DeviceCreationParams::DriverType
D3D_DRIVER_TYPE DriverType
Consult the DX documentation on D3D11CreateDevice for this parameter.
Definition: amd_ags.h:629
AGSDisplayInfo::HDR10
unsigned int HDR10
HDR10 is supported on this display.
Definition: amd_ags.h:210
AGSDX11DeviceCreationParams::pAdapter
IDXGIAdapter * pAdapter
Consult the DX documentation on D3D11CreateDevice for this parameter.
Definition: amd_ags.h:628
AGSBreadcrumbMarker::type
Type type
Whether this marker is top or bottom of pipe.
Definition: amd_ags.h:905
AGSDisplayInfo::screenSpecularReflectance
double screenSpecularReflectance
Percentage expressed between 0 - 1.
Definition: amd_ags.h:244
AGSDeviceInfo::AsicFamily_Vega
AMD Vega architecture, including Raven Ridge (ie AMD Ryzen CPU + AMD Vega GPU).
Definition: amd_ags.h:267
AGSDeviceInfo::coreClock
int coreClock
Core clock speed at 100% power in MHz.
Definition: amd_ags.h:290
AGSDeviceInfo::AsicFamily_GCN1
AMD GCN 1 architecture: Oland, Cape Verde, Pitcairn & Tahiti.
Definition: amd_ags.h:263
AGSDisplaySettings::Mode_FreesyncHDR_Gamma22
Freesync HDR Gamma 2.2, requiring a 1010102 UNORM swapchain. The output needs to be encoded to gamma ...
Definition: amd_ags.h:347
AGSDisplayInfo::avgLuminance
double avgLuminance
The average luminance of the display in nits.
Definition: amd_ags.h:248
AGSDisplaySettings::chromaticityWhitePointY
double chromaticityWhitePointY
White point Y coord.
Definition: amd_ags.h:365
AGSDisplaySettings::Mode_HDR10_PQ
HDR10 PQ encoding, requiring a 1010102 UNORM swapchain and PQ encoding in the output shader.
Definition: amd_ags.h:344
AGSDisplaySettings::Mode_DolbyVision
Dolby Vision, requiring an 8888 UNORM swapchain.
Definition: amd_ags.h:348
AGSAfrTransferType
AGSAfrTransferType
The Crossfire API transfer types.
Definition: amd_ags.h:1211
AGS_DRIVEREXTENSIONSDX11_SETVIEWBROADCASTMASKS
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_SETVIEWBROADCASTMASKS)(AGSContext *, unsigned long long, unsigned long long, int)
agsDriverExtensionsDX11_SetViewBroadcastMasks
Definition: amd_ags.h:1339
AGS_DRIVEREXTENSIONSDX12_CREATEDEVICE
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX12_CREATEDEVICE)(AGSContext *, const AGSDX12DeviceCreationParams *, const AGSDX12ExtensionParams *, AGSDX12ReturnedParams *)
agsDriverExtensionsDX12_CreateDevice
Definition: amd_ags.h:1320
agsDriverExtensionsDX11_SetViewBroadcastMasks
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetViewBroadcastMasks(AGSContext *context, unsigned long long vpMask, unsigned long long rtSliceMask, int vpMaskPerRtSliceEnabled)
Function to control draw calls replication to multiple viewports and RT slices.
AGSClipRect::rect
AGSRect rect
The rect to include/exclude.
Definition: amd_ags.h:1192
AGSDisplayInfo::eyefinityGridCoordY
int eyefinityGridCoordY
The Y coordinate in the Eyefinity grid. -1 if not in an Eyefinity group.
Definition: amd_ags.h:229
agsDriverExtensionsDX12_PushMarker
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_PushMarker(AGSContext *context, ID3D12GraphicsCommandList *commandList, const char *data)
Function used to push an AMD user marker onto the command list.
agsDeInitialize
AMD_AGS_API AGSReturnCode agsDeInitialize(AGSContext *context)
Function used to clean up the AGS library.
AGS_AFR_TRANSFER_DISABLE
Turn off driver resource tracking.
Definition: amd_ags.h:1214
AGSDeviceInfo::AsicFamily_GCN3
AMD GCN 3 architecture: Tonga & Fiji.
Definition: amd_ags.h:265
AGSDeviceInfo::eyefinityGridHeight
int eyefinityGridHeight
Contains height of the multi-monitor grid that makes up the Eyefinity Single Large Surface.
Definition: amd_ags.h:304
AGSDeviceInfo::AsicFamily_PreGCN
Pre GCN architecture.
Definition: amd_ags.h:262
AGSDX12ReturnedParams::ExtensionsSupported::appRegistration
unsigned int appRegistration
Supported in Radeon Software Version 17.9.1 onwards.
Definition: amd_ags.h:513
AGS_ADL_FAILURE
Failure in ADL (the AMD Display Library)
Definition: amd_ags.h:185
AGSDX12ExtensionParams::pEngineName
const WCHAR * pEngineName
Engine name.
Definition: amd_ags.h:498
AGSClipRect
The clip rectangle struct used by agsDriverExtensionsDX11_SetClipRects.
Definition: amd_ags.h:1182
AGSDisplayInfo
The display info struct used to describe a display enumerated by AGS.
Definition: amd_ags.h:204
AGS_PRIMITIVE_TOPOLOGY_SCREENRECTLIST
Screen rect list.
Definition: amd_ags.h:932
AGSDisplayInfo::chromaticityBlueY
double chromaticityBlueY
Blue display primary Y coord.
Definition: amd_ags.h:238
AGSDisplaySettings::Mode_SDR
SDR mode.
Definition: amd_ags.h:343
AGSDeviceInfo::teraFlops
float teraFlops
Teraflops of GPU. Zero if not GCN onwards. Calculated from iCoreClock * iNumCUs * 64 Pixels/clk * 2 i...
Definition: amd_ags.h:293
AGS_DRIVEREXTENSIONSDX11_NOTIFYRESOURCEBEGINALLACCESS
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_NOTIFYRESOURCEBEGINALLACCESS)(AGSContext *, ID3D11Resource *)
agsDriverExtensionsDX11_NotifyResourceBeginAllAccess
Definition: amd_ags.h:1347
AGS_CROSSFIRE_MODE_EXPLICIT_AFR
Use the AGS Crossfire API functions to perform explicit AFR rendering without requiring a CF driver p...
Definition: amd_ags.h:621
AGSDisplayInfo::eyefinityInPortraitMode
unsigned int eyefinityInPortraitMode
The display is in the Eyefinity group but in portrait mode.
Definition: amd_ags.h:216
AGSDeviceInfo::numDisplays
int numDisplays
The number of active displays found to be attached to this adapter.
Definition: amd_ags.h:299
AGSDeviceInfo::isExternal
unsigned int isExternal
Whether this device is a detachable, external device.
Definition: amd_ags.h:279
AGSDisplaySettings::chromaticityGreenX
double chromaticityGreenX
Green display primary X coord.
Definition: amd_ags.h:358
AGSDX12ExtensionParams::appVersion
unsigned int appVersion
Application version.
Definition: amd_ags.h:499
AGSRect::offsetX
int offsetX
Offset on X axis.
Definition: amd_ags.h:197
AGSBreadcrumbMarker::Type
Type
The marker type.
Definition: amd_ags.h:898
AGSDisplaySettings::mode
Mode mode
The display mode to set the display into.
Definition: amd_ags.h:353
AGSGPUInfo::driverVersion
const char * driverVersion
The AMD driver package version.
Definition: amd_ags.h:330
AGS_CROSSFIRE_MODE_DISABLE
Completely disable AFR rendering.
Definition: amd_ags.h:622
AGS_DRIVEREXTENSIONSDX11_MULTIDRAWINDEXEDINSTANCEDINDIRECT
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_MULTIDRAWINDEXEDINSTANCEDINDIRECT)(AGSContext *, ID3D11DeviceContext *, unsigned int, ID3D11Buffer *, unsigned int, unsigned int)
agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirect
Definition: amd_ags.h:1333
AGSDisplaySettings::reservedPadding
unsigned int reservedPadding
Reserved.
Definition: amd_ags.h:374
AGS_AFR_TRANSFERENGINE_DEFAULT
Use default engine for Crossfire API transfers.
Definition: amd_ags.h:1223
agsDriverExtensionsDX11_CreateDevice
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateDevice(AGSContext *context, const AGSDX11DeviceCreationParams *creationParams, const AGSDX11ExtensionParams *extensionParams, AGSDX11ReturnedParams *returnedParams)
Function used to create a D3D11 device with additional AMD-specific initialization parameters.
AGS_DRIVEREXTENSIONSDX11_SETMAXASYNCCOMPILETHREADCOUNT
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_SETMAXASYNCCOMPILETHREADCOUNT)(AGSContext *, unsigned int)
agsDriverExtensionsDX11_SetMaxAsyncCompileThreadCount
Definition: amd_ags.h:1336
AGSClipRect::ClipRectIncluded
Include the rect.
Definition: amd_ags.h:1187
AGS_AFR_TRANSFER_2STEP_WITH_BROADCAST
App controlled GPU to all render GPUs transfer using intermediate system memory.
Definition: amd_ags.h:1217
AGSClipRect::Mode
Mode
The inclusion mode for the rect.
Definition: amd_ags.h:1185
AGSDeviceInfo::AsicFamily_GCN4
AMD GCN 4 architecture: Polaris.
Definition: amd_ags.h:266
AGSDisplayInfo::maxLuminance
double maxLuminance
The maximum luminance of the display in nits.
Definition: amd_ags.h:247
AGSDX12ExtensionParams::pAppName
const WCHAR * pAppName
Application name.
Definition: amd_ags.h:497
AGS_DRIVEREXTENSIONSDX11_BEGINUAVOVERLAP
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_BEGINUAVOVERLAP)(AGSContext *, ID3D11DeviceContext *)
agsDriverExtensionsDX11_BeginUAVOverlap
Definition: amd_ags.h:1329
AGSDX12ReturnedParams::ExtensionsSupported::readLaneAt
unsigned int readLaneAt
Supported in Radeon Software Version 20.11.2 onwards.
Definition: amd_ags.h:520
AGSDeviceInfo::AsicFamily_RDNA
AMD RDNA architecture.
Definition: amd_ags.h:268
AGSDisplayInfo::visibleResolution
AGSRect visibleResolution
The visible resolution and position.
Definition: amd_ags.h:224
AGSDX11DeviceCreationParams::FeatureLevels
UINT FeatureLevels
Consult the DX documentation on D3D11CreateDevice for this parameter.
Definition: amd_ags.h:633
AGS_DRIVEREXTENSIONSDX11_CREATEDEVICE
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_CREATEDEVICE)(AGSContext *, const AGSDX11DeviceCreationParams *, const AGSDX11ExtensionParams *, AGSDX11ReturnedParams *)
agsDriverExtensionsDX11_CreateDevice
Definition: amd_ags.h:1325
AGSDisplayInfo::minLuminance
double minLuminance
The minimum luminance of the display in nits.
Definition: amd_ags.h:246
agsDriverExtensionsDX12_DestroyDevice
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_DestroyDevice(AGSContext *context, ID3D12Device *device, unsigned int *deviceReferences)
Function to destroy the D3D12 device.
AGSDeviceInfo::AsicFamily_GCN2
AMD GCN 2 architecture: Hawaii & Bonaire. This also includes APUs Kaveri and Carrizo.
Definition: amd_ags.h:264
AGS_DX12_SHADER_INTRINSICS_SPACE_ID
const unsigned int AGS_DX12_SHADER_INTRINSICS_SPACE_ID
The space id for DirectX12 intrinsic support.
Definition: amd_ags.h:529
AGSDX11ExtensionParams::crossfireMode
AGSCrossfireMode crossfireMode
Desired Crossfire mode.
Definition: amd_ags.h:649
AGSDeviceInfo::reserved
int reserved
reserved field
Definition: amd_ags.h:310
AGSDX11ExtensionParams
struct AGSDX11ExtensionParams AGSDX11ExtensionParams
The struct to specify DX11 additional device creation parameters.
AGSDisplayInfo::maxResolutionY
int maxResolutionY
The maximum supported resolution of the unrotated display.
Definition: amd_ags.h:220
AGS_DEINITIALIZE
AMD_AGS_API AGSReturnCode(* AGS_DEINITIALIZE)(AGSContext *)
agsDeInitialize
Definition: amd_ags.h:1318
AGS_SOFTWAREVERSIONCHECK_OLDER
The reported Radeon Software Version is older than the required version.
Definition: amd_ags.h:382
AGSClipRect
struct AGSClipRect AGSClipRect
The clip rectangle struct used by agsDriverExtensionsDX11_SetClipRects.
AGSDX12ReturnedParams::ExtensionsSupported::intrinsics16
unsigned int intrinsics16
Supported in Radeon Software Version 16.9.2 onwards. ReadFirstLane, ReadLane, LaneID,...
Definition: amd_ags.h:510
AGSDX12DeviceCreationParams
struct AGSDX12DeviceCreationParams AGSDX12DeviceCreationParams
The struct to specify the DX12 device creation parameters.
AGSDX11ReturnedParams::ExtensionsSupported::UAVOverlapDeferredContexts
unsigned int UAVOverlapDeferredContexts
Supported in Radeon Software Version 18.8.1 onwards.
Definition: amd_ags.h:675
AGS_ALLOC_CALLBACK
void *(__stdcall * AGS_ALLOC_CALLBACK)(size_t allocationSize)
AGS user defined allocation prototype.
Definition: amd_ags.h:317
AGSDX11ExtensionParams
The struct to specify DX11 additional device creation parameters.
Definition: amd_ags.h:639
AGS_AFR_TRANSFERENGINE_3D_ENGINE
Use 3D engine for Crossfire API transfers.
Definition: amd_ags.h:1224
AGS_DRIVEREXTENSIONSDX11_SETCLIPRECTS
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_SETCLIPRECTS)(AGSContext *, unsigned int, const AGSClipRect *)
agsDriverExtensionsDX11_SetClipRects
Definition: amd_ags.h:1341
AGSRect::width
int width
Width of rectangle.
Definition: amd_ags.h:199
AGSDisplayInfo::reserved
int reserved
reserved field
Definition: amd_ags.h:252
AGS_DRIVEREXTENSIONSDX11_DESTROYDEVICE
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_DESTROYDEVICE)(AGSContext *, ID3D11Device *, unsigned int *, ID3D11DeviceContext *, unsigned int *)
agsDriverExtensionsDX11_DestroyDevice
Definition: amd_ags.h:1326
AGSDeviceInfo::localMemoryInBytes
unsigned long long localMemoryInBytes
The size of local memory in bytes. 0 for non AMD hardware.
Definition: amd_ags.h:295
AGSDX12DeviceCreationParams::FeatureLevel
D3D_FEATURE_LEVEL FeatureLevel
The minimum feature level to create the device with.
Definition: amd_ags.h:491
AGSDisplaySettings::Mode_FreesyncHDR_scRGB
Freesync HDR scRGB, requiring an FP16 swapchain. A value of 1.0 == 80 nits.
Definition: amd_ags.h:346
AGSDX11ExtensionParams::uavSlot
unsigned int uavSlot
The UAV slot reserved for intrinsic support.
Definition: amd_ags.h:646
AGSDeviceInfo::adapterString
const char * adapterString
The adapter name string.
Definition: amd_ags.h:275
AGSDeviceInfo::numCUs
int numCUs
Number of compute units.
Definition: amd_ags.h:286
agsGetVersionNumber
AMD_AGS_API int agsGetVersionNumber()
Function to return the AGS version number.
agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirectCountIndirect
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirectCountIndirect(AGSContext *context, ID3D11DeviceContext *dxContext, ID3D11Buffer *pBufferForDrawCount, unsigned int alignedByteOffsetForDrawCount, ID3D11Buffer *pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs)
Function used to submit a batch of draws via MultiDrawIndirect.
agsInitialize
AMD_AGS_API AGSReturnCode agsInitialize(int agsVersion, const AGSConfiguration *config, AGSContext **context, AGSGPUInfo *gpuInfo)
Function used to initialize the AGS library.
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.
AGSDX11ReturnedParams::ExtensionsSupported::padding
unsigned int padding
Reserved.
Definition: amd_ags.h:681
AGS_DRIVEREXTENSIONSDX11_WRITEBREADCRUMB
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_WRITEBREADCRUMB)(AGSContext *, const AGSBreadcrumbMarker *)
agsDriverExtensionsDX11_WriteBreadcrumb
Definition: amd_ags.h:1327
AGSDX12DeviceCreationParams
The struct to specify the DX12 device creation parameters.
Definition: amd_ags.h:487
AGSDX11ReturnedParams
The struct to hold all the returned parameters from the device creation call.
Definition: amd_ags.h:653
AGSDeviceInfo::vendorId
int vendorId
The vendor id.
Definition: amd_ags.h:282
AGSDisplayInfo::screenDiffuseReflectance
double screenDiffuseReflectance
Percentage expressed between 0 - 1.
Definition: amd_ags.h:243
agsDriverExtensionsDX11_EndUAVOverlap
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_EndUAVOverlap(AGSContext *context, ID3D11DeviceContext *dxContext)
Function used indicate to the driver the end of the overlap scope.
AGSDX12DeviceCreationParams::pAdapter
IDXGIAdapter * pAdapter
Pointer to the adapter to use when creating the device. This may be null.
Definition: amd_ags.h:489
AGS_CROSSFIRE_MODE_DRIVER_AFR
Use the default driver-based AFR rendering. If this mode is specified, do NOT use the agsDriverExtens...
Definition: amd_ags.h:620
AGS_DRIVEREXTENSIONSDX11_MULTIDRAWINSTANCEDINDIRECT
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_MULTIDRAWINSTANCEDINDIRECT)(AGSContext *, ID3D11DeviceContext *, unsigned int, ID3D11Buffer *, unsigned int, unsigned int)
agsDriverExtensionsDX11_MultiDrawInstancedIndirect
Definition: amd_ags.h:1332
AGSDX12ReturnedParams::ExtensionsSupported::padding
unsigned int padding
Reserved.
Definition: amd_ags.h:523
AGSDeviceInfo::isPrimaryDevice
unsigned int isPrimaryDevice
Whether this device is marked as the primary device.
Definition: amd_ags.h:278
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 ...
AGS_AFR_TRANSFER_DEFAULT
Default Crossfire driver resource tracking.
Definition: amd_ags.h:1213
AGSDX11DeviceCreationParams::Flags
UINT Flags
Consult the DX documentation on D3D11CreateDevice for this parameter.
Definition: amd_ags.h:631
AGSDeviceInfo::eyefinityGridWidth
int eyefinityGridWidth
Contains width of the multi-monitor grid that makes up the Eyefinity Single Large Surface.
Definition: amd_ags.h:303
AGSDisplaySettings::disableLocalDimming
unsigned int disableLocalDimming
Disables local dimming if possible.
Definition: amd_ags.h:373
agsDriverExtensionsDX12_CreateDevice
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_CreateDevice(AGSContext *context, const AGSDX12DeviceCreationParams *creationParams, const AGSDX12ExtensionParams *extensionParams, AGSDX12ReturnedParams *returnedParams)
Function used to create a D3D12 device with additional AMD-specific initialization parameters.
AGSDisplayInfo::chromaticityGreenY
double chromaticityGreenY
Green display primary Y coord.
Definition: amd_ags.h:235
AGS_SOFTWAREVERSIONCHECK_UNDEFINED
The check could not determine as result. This could be because it is a private or custom driver or ju...
Definition: amd_ags.h:383
AGSDisplaySettings::chromaticityBlueY
double chromaticityBlueY
Blue display primary Y coord.
Definition: amd_ags.h:362
AGS_GETVERSIONNUMBER
AMD_AGS_API int(* AGS_GETVERSIONNUMBER)()
agsGetVersionNumber
Definition: amd_ags.h:1316
AGS_DRIVEREXTENSIONSDX11_MULTIDRAWINSTANCEDINDIRECTCOUNTINDIRECT
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_MULTIDRAWINSTANCEDINDIRECTCOUNTINDIRECT)(AGSContext *, ID3D11DeviceContext *, ID3D11Buffer *, unsigned int, ID3D11Buffer *, unsigned int, unsigned int)
agsDriverExtensionsDX11_MultiDrawInstancedIndirectCountIndirect
Definition: amd_ags.h:1334
AGSDisplaySettings::Mode_HDR10_scRGB
HDR10 scRGB, requiring an FP16 swapchain. Values of 1.0 == 80 nits, 125.0 == 10000 nits.
Definition: amd_ags.h:345
AGSDX11ExtensionParams::engineVersion
unsigned int engineVersion
Engine version.
Definition: amd_ags.h:644
AGSDX11ExtensionParams::pEngineName
const WCHAR * pEngineName
Engine name.
Definition: amd_ags.h:642
AGSDisplayInfo::maxRefreshRate
float maxRefreshRate
The maximum supported refresh rate of the display.
Definition: amd_ags.h:221
AGSDX12ReturnedParams::ExtensionsSupported::baseVertex
unsigned int baseVertex
Supported in Radeon Software Version 20.2.1 onwards.
Definition: amd_ags.h:516
AGSDX11ReturnedParams::breadcrumbBuffer
void * breadcrumbBuffer
The CPU buffer returned if the initialization of the breadcrumb was successful.
Definition: amd_ags.h:685
AGS_SETDISPLAYMODE
AMD_AGS_API AGSReturnCode(* AGS_SETDISPLAYMODE)(AGSContext *, int, int, const AGSDisplaySettings *)
agsSetDisplayMode
Definition: amd_ags.h:1319
AGSDisplayInfo::currentResolution
AGSRect currentResolution
The current resolution and position in the desktop, ignoring Eyefinity bezel compensation.
Definition: amd_ags.h:223
AGS_DRIVEREXTENSIONSDX11_GETMAXCLIPRECTS
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_GETMAXCLIPRECTS)(AGSContext *, unsigned int *)
agsDriverExtensionsDX11_GetMaxClipRects
Definition: amd_ags.h:1340
AGSDX12ReturnedParams::ExtensionsSupported::shaderClock
unsigned int shaderClock
Supported in Radeon Software Version 23.1.1 onwards.
Definition: amd_ags.h:522
AGS_DRIVEREXTENSIONSDX11_SETDEPTHBOUNDS
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_SETDEPTHBOUNDS)(AGSContext *, ID3D11DeviceContext *, bool, float, float)
agsDriverExtensionsDX11_SetDepthBounds
Definition: amd_ags.h:1331
agsDriverExtensionsDX11_GetMaxClipRects
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_GetMaxClipRects(AGSContext *context, unsigned int *maxRectCount)
Function returns max number of supported clip rectangles.
AGSDX11ExtensionParams::numBreadcrumbMarkers
unsigned int numBreadcrumbMarkers
The number of breadcrumb markers to allocate. Each marker is a uint64 (ie 8 bytes)....
Definition: amd_ags.h:645
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.
AGS_FAILURE
Failed to complete call for some unspecified reason.
Definition: amd_ags.h:178
AGSDX12ExtensionParams::engineVersion
unsigned int engineVersion
Engine version.
Definition: amd_ags.h:500
AGSDisplayInfo::reservedPadding
unsigned int reservedPadding
Reserved for future use.
Definition: amd_ags.h:217
AGSDisplaySettings::Mode_Count
Number of enumerated display modes.
Definition: amd_ags.h:350
AGSDX12ReturnedParams::ExtensionsSupported::UAVBindSlot
unsigned int UAVBindSlot
Supported in Radeon Software Version 19.5.1 onwards.
Definition: amd_ags.h:514
AGSDisplaySettings::chromaticityGreenY
double chromaticityGreenY
Green display primary Y coord.
Definition: amd_ags.h:359
AGS_SOFTWAREVERSIONCHECK_OK
The reported Radeon Software Version is newer or the same as the required version.
Definition: amd_ags.h:381
AGSGPUInfo
struct AGSGPUInfo AGSGPUInfo
The top level GPU information returned from agsInitialize.
AGSDeviceInfo::AsicFamily_RDNA2
AMD RDNA2 architecture.
Definition: amd_ags.h:269
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 ...
AGS_INVALID_ARGS
Invalid arguments into the function.
Definition: amd_ags.h:179
AGSDX12ReturnedParams::ExtensionsSupported::floatConversion
unsigned int floatConversion
Supported in Radeon Software Version 20.5.1 onwards.
Definition: amd_ags.h:519
AGSDX12ReturnedParams::ExtensionsSupported::intrinsics19
unsigned int intrinsics19
Supported in Radeon Software Version 19.12.2 onwards. DrawIndex, AtomicU64.
Definition: amd_ags.h:515
AGSDisplaySettings::minLuminance
double minLuminance
The minimum scene luminance in nits.
Definition: amd_ags.h:367
AGSDX11ReturnedParams::ExtensionsSupported::depthBoundsDeferredContexts
unsigned int depthBoundsDeferredContexts
Supported in Radeon Software Version 18.8.1 onwards.
Definition: amd_ags.h:676
AGSDisplaySettings
The struct to specify the display settings to the driver.
Definition: amd_ags.h:338
AGSDX11ReturnedParams::ExtensionsSupported::crossfireAPI
unsigned int crossfireAPI
Supported in Radeon Software Version 16.9.2 onwards.
Definition: amd_ags.h:667
AGSDisplayInfo::freesyncHDR
unsigned int freesyncHDR
Freesync HDR is supported on this display.
Definition: amd_ags.h:213
AGSDisplayInfo::eyefinityGridCoordX
int eyefinityGridCoordX
The X coordinate in the Eyefinity grid. -1 if not in an Eyefinity group.
Definition: amd_ags.h:228
AGS_AFR_TRANSFERENGINE_COPY_ENGINE
Use Copy engine for Crossfire API transfers.
Definition: amd_ags.h:1225
AGSDeviceInfo::numROPs
int numROPs
Number of ROPs.
Definition: amd_ags.h:289
AGSRect
All function calls in AGS require a pointer to a context. This is generated via agsInitialize.
Definition: amd_ags.h:195
AGSBreadcrumbMarker::BottomOfPipe
Bottom-of-pipe marker.
Definition: amd_ags.h:901
AGSAfrTransferEngine
AGSAfrTransferEngine
The Crossfire API transfer engines.
Definition: amd_ags.h:1221
agsDriverExtensionsDX11_MultiDrawInstancedIndirectCountIndirect
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawInstancedIndirectCountIndirect(AGSContext *context, ID3D11DeviceContext *dxContext, ID3D11Buffer *pBufferForDrawCount, unsigned int alignedByteOffsetForDrawCount, ID3D11Buffer *pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs)
Function used to submit a batch of draws via MultiDrawIndirect.
AGSDeviceInfo::AsicFamily_RDNA3
AMD RDNA3 architecture.
Definition: amd_ags.h:270
AGS_DRIVEREXTENSIONSDX11_SETDISKSHADERCACHEENABLED
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_SETDISKSHADERCACHEENABLED)(AGSContext *, int)
agsDriverExtensionsDX11_SetDiskShaderCacheEnabled
Definition: amd_ags.h:1338
agsDriverExtensionsDX12_SetMarker
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_SetMarker(AGSContext *context, ID3D12GraphicsCommandList *commandList, const char *data)
Function used to insert an single event AMD user marker onto the command list.
AGSDisplaySettings::chromaticityRedY
double chromaticityRedY
Red display primary Y coord.
Definition: amd_ags.h:356
AGSReturnCode
AGSReturnCode
The return codes.
Definition: amd_ags.h:175
AGSDX12ExtensionParams
struct AGSDX12ExtensionParams AGSDX12ExtensionParams
The struct to specify DX12 additional device creation parameters.
AGSGPUInfo::numDevices
int numDevices
Number of GPUs in the system.
Definition: amd_ags.h:333
AGS_DRIVEREXTENSIONSDX11_NOTIFYRESOURCEENDALLACCESS
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_NOTIFYRESOURCEENDALLACCESS)(AGSContext *, ID3D11Resource *)
agsDriverExtensionsDX11_NotifyResourceEndAllAccess
Definition: amd_ags.h:1348
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 ...
AGS_DRIVEREXTENSIONSDX11_CREATETEXTURE2D
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_CREATETEXTURE2D)(AGSContext *, const D3D11_TEXTURE2D_DESC *, const D3D11_SUBRESOURCE_DATA *, ID3D11Texture2D **, AGSAfrTransferType, AGSAfrTransferEngine)
agsDriverExtensionsDX11_CreateTexture2D
Definition: amd_ags.h:1344
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.
agsDriverExtensionsDX11_MultiDrawInstancedIndirect
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawInstancedIndirect(AGSContext *context, ID3D11DeviceContext *dxContext, unsigned int drawCount, ID3D11Buffer *pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs)
Function used to submit a batch of draws via MultiDrawIndirect.
AGSDisplayInfo::eyefinityInGroup
unsigned int eyefinityInGroup
The display is part of the Eyefinity group.
Definition: amd_ags.h:214
AGSDeviceInfo::memoryClock
int memoryClock
Memory clock speed at 100% power in MHz.
Definition: amd_ags.h:291
AGS_DRIVEREXTENSIONSDX12_PUSHMARKER
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX12_PUSHMARKER)(AGSContext *, ID3D12GraphicsCommandList *, const char *)
agsDriverExtensionsDX12_PushMarker
Definition: amd_ags.h:1322
AGSGPUInfo
The top level GPU information returned from agsInitialize.
Definition: amd_ags.h:328
AGSDeviceInfo
The device info struct used to describe a physical GPU enumerated by AGS.
Definition: amd_ags.h:256
AGSDX11ExtensionParams::pAppName
const WCHAR * pAppName
Application name.
Definition: amd_ags.h:641
AGSRect::height
int height
Height of rectangle.
Definition: amd_ags.h:200
AGS_AFR_TRANSFER_2STEP_NO_BROADCAST
App controlled GPU to next GPU transfer using intermediate system memory.
Definition: amd_ags.h:1216
AGSDisplayInfo::chromaticityRedY
double chromaticityRedY
Red display primary Y coord.
Definition: amd_ags.h:232
AGSDX12ReturnedParams::ExtensionsSupported::rayHitToken
unsigned int rayHitToken
Supported in Radeon Software Version 20.11.2 onwards.
Definition: amd_ags.h:521
AGSPrimitiveTopologyDX11
AGSPrimitiveTopologyDX11
Additional topologies supported via extensions.
Definition: amd_ags.h:929
AGSDisplayInfo::chromaticityRedX
double chromaticityRedX
Red display primary X coord.
Definition: amd_ags.h:231
AGSDX11ReturnedParams::crossfireGPUCount
unsigned int crossfireGPUCount
The number of GPUs that are active for this app.
Definition: amd_ags.h:684
AGSDisplayInfo::displayDeviceName
char displayDeviceName[32]
The display device name, i.e. DISPLAY_DEVICE::DeviceName.
Definition: amd_ags.h:207
AGSDX11ReturnedParams::pSwapChain
IDXGISwapChain * pSwapChain
The newly created swap chain. This is only created if a valid pSwapChainDesc is supplied in AGSDX11De...
Definition: amd_ags.h:657
AGSDeviceInfo::eyefinityResolutionY
int eyefinityResolutionY
Contains height in pixels of the multi-monitor Single Large Surface.
Definition: amd_ags.h:306
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.
AGS_DRIVEREXTENSIONSDX11_ENDUAVOVERLAP
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_ENDUAVOVERLAP)(AGSContext *, ID3D11DeviceContext *)
agsDriverExtensionsDX11_EndUAVOverlap
Definition: amd_ags.h:1330
AGS_LEGACY_DRIVER
Returned if a feature is not present in the installed driver.
Definition: amd_ags.h:182
AGSGPUInfo::radeonSoftwareVersion
const char * radeonSoftwareVersion
The Radeon Software Version.
Definition: amd_ags.h:331
AGSDX11ReturnedParams::ExtensionsSupported::baseVertex
unsigned int baseVertex
Supported in Radeon Software Version 20.2.1 onwards.
Definition: amd_ags.h:679
AGSDX11ReturnedParams::ExtensionsSupported::uavOverlap
unsigned int uavOverlap
Supported in Radeon Software Version 16.9.2 onwards.
Definition: amd_ags.h:663
AGSDX12ReturnedParams::ExtensionsSupported::getWaveSize
unsigned int getWaveSize
Supported in Radeon Software Version 20.5.1 onwards.
Definition: amd_ags.h:518
AGS_INITIALIZE
AMD_AGS_API AGSReturnCode(* AGS_INITIALIZE)(int, const AGSConfiguration *, AGSContext **, AGSGPUInfo *)
agsInitialize
Definition: amd_ags.h:1317
AGSGPUInfo::devices
AGSDeviceInfo * devices
List of GPUs in the system.
Definition: amd_ags.h:334
AGSDeviceInfo::displays
AGSDisplayInfo * displays
List of displays allocated by AGS to be numDisplays in length.
Definition: amd_ags.h:300
AGSDisplayInfo::chromaticityGreenX
double chromaticityGreenX
Green display primary X coord.
Definition: amd_ags.h:234
AGS_DRIVEREXTENSIONSDX11_CREATETEXTURE1D
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_CREATETEXTURE1D)(AGSContext *, const D3D11_TEXTURE1D_DESC *, const D3D11_SUBRESOURCE_DATA *, ID3D11Texture1D **, AGSAfrTransferType, AGSAfrTransferEngine)
agsDriverExtensionsDX11_CreateTexture1D
Definition: amd_ags.h:1343
AGSDX11ReturnedParams::ExtensionsSupported::intrinsics16
unsigned int intrinsics16
Supported in Radeon Software Version 16.9.2 onwards. ReadFirstLane, ReadLane, LaneID,...
Definition: amd_ags.h:669
AGSDX12ReturnedParams::ExtensionsSupported
Extensions for DX12.
Definition: amd_ags.h:508
AGSDX11ReturnedParams::ExtensionsSupported::intrinsics19
unsigned int intrinsics19
Supported in Radeon Software Version 19.12.2 onwards. DrawIndex, AtomicU64.
Definition: amd_ags.h:677
AGS_SUCCESS
Successful function call.
Definition: amd_ags.h:177
AGSDX11DeviceCreationParams::pSwapChainDesc
const DXGI_SWAP_CHAIN_DESC * pSwapChainDesc
Optional swapchain description. Specify this to invoke D3D11CreateDeviceAndSwapChain instead of D3D11...
Definition: amd_ags.h:635
AGSDeviceInfo::revisionId
int revisionId
The revision id.
Definition: amd_ags.h:284
AGSDisplaySettings::chromaticityWhitePointX
double chromaticityWhitePointX
White point X coord.
Definition: amd_ags.h:364
AGSDeviceInfo::isAPU
unsigned int isAPU
Whether this device is an APU.
Definition: amd_ags.h:277
AGS_DRIVEREXTENSIONSDX12_SETMARKER
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX12_SETMARKER)(AGSContext *, ID3D12GraphicsCommandList *, const char *)
agsDriverExtensionsDX12_SetMarker
Definition: amd_ags.h:1324
AGSBreadcrumbMarker
The breadcrumb marker struct used by agsDriverExtensionsDX11_WriteBreadcrumb.
Definition: amd_ags.h:895
AGSDeviceInfo::asicFamily
AsicFamily asicFamily
Set to Unknown if not AMD hardware.
Definition: amd_ags.h:276
agsDriverExtensionsDX11_NumPendingAsyncCompileJobs
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NumPendingAsyncCompileJobs(AGSContext *context, unsigned int *numberOfJobs)
This method can be used to determine the total number of asynchronous shader compile jobs that are ei...
AGSDX11ReturnedParams::ExtensionsSupported::baseInstance
unsigned int baseInstance
Supported in Radeon Software Version 20.2.1 onwards.
Definition: amd_ags.h:680
AGSDisplayInfo::dolbyVision
unsigned int dolbyVision
Dolby Vision is supported on this display.
Definition: amd_ags.h:211
AGSDX11ReturnedParams::ExtensionsSupported::quadList
unsigned int quadList
Supported in Radeon Software Version 16.9.2 onwards.
Definition: amd_ags.h:661
AGSDisplayInfo::isPrimaryDisplay
unsigned int isPrimaryDisplay
Whether this display is marked as the primary display.
Definition: amd_ags.h:209
agsDriverExtensionsDX11_SetClipRects
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetClipRects(AGSContext *context, unsigned int clipRectCount, const AGSClipRect *clipRects)
Function sets clip rectangles.
AGSDX11DeviceCreationParams
The struct to specify the existing DX11 device creation parameters.
Definition: amd_ags.h:626
AGS_MISSING_D3D_DLL
Returned when a D3D dll fails to load.
Definition: amd_ags.h:181
AGSDX11ReturnedParams::ExtensionsSupported::multiView
unsigned int multiView
Supported in Radeon Software Version 16.12.1 onwards.
Definition: amd_ags.h:670
AGSDX12ReturnedParams::ExtensionsSupported::intrinsics17
unsigned int intrinsics17
Supported in Radeon Software Version 17.9.1 onwards. WaveReduce, WaveScan.
Definition: amd_ags.h:511
AGSDX11ReturnedParams::ExtensionsSupported::MDIDeferredContexts
unsigned int MDIDeferredContexts
Supported in Radeon Software Version 18.8.1 onwards.
Definition: amd_ags.h:674
AGSDisplayInfo::maxResolutionX
int maxResolutionX
The maximum supported resolution of the unrotated display.
Definition: amd_ags.h:219
AGSDX11ReturnedParams::ExtensionsSupported::multiDrawIndirect
unsigned int multiDrawIndirect
Supported in Radeon Software Version 16.9.2 onwards.
Definition: amd_ags.h:665
AGSDisplayInfo::chromaticityBlueX
double chromaticityBlueX
Blue display primary X coord.
Definition: amd_ags.h:237
AGSConfiguration
The configuration options that can be passed in to agsInitialize.
Definition: amd_ags.h:321
AGSBreadcrumbMarker
struct AGSBreadcrumbMarker AGSBreadcrumbMarker
The breadcrumb marker struct used by agsDriverExtensionsDX11_WriteBreadcrumb.
AGSDX12ReturnedParams
struct AGSDX12ReturnedParams AGSDX12ReturnedParams
The struct to hold all the returned parameters from the device creation call.
AGSDX12ReturnedParams::ExtensionsSupported::userMarkers
unsigned int userMarkers
Supported in Radeon Software Version 17.9.1 onwards.
Definition: amd_ags.h:512
AGSDX11ReturnedParams::ExtensionsSupported
struct AGSDX11ReturnedParams::ExtensionsSupported ExtensionsSupported
Extensions for DX11.
AGSDX12ReturnedParams
The struct to hold all the returned parameters from the device creation call.
Definition: amd_ags.h:505
AGSDX11DeviceCreationParams
struct AGSDX11DeviceCreationParams AGSDX11DeviceCreationParams
The struct to specify the existing DX11 device creation parameters.
AGSClipRect::ClipRectExcluded
Exclude the rect.
Definition: amd_ags.h:1188
AGS_DRIVEREXTENSIONSDX11_CREATETEXTURE3D
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_CREATETEXTURE3D)(AGSContext *, const D3D11_TEXTURE3D_DESC *, const D3D11_SUBRESOURCE_DATA *, ID3D11Texture3D **, AGSAfrTransferType, AGSAfrTransferEngine)
agsDriverExtensionsDX11_CreateTexture3D
Definition: amd_ags.h:1345
AGSConfiguration
struct AGSConfiguration AGSConfiguration
The configuration options that can be passed in to agsInitialize.
AGSDisplaySettings::chromaticityRedX
double chromaticityRedX
Red display primary X coord.
Definition: amd_ags.h:355
AGSDX11ReturnedParams::pImmediateContext
ID3D11DeviceContext * pImmediateContext
The newly created immediate device context.
Definition: amd_ags.h:656
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.
AGS_DRIVEREXTENSIONSDX11_NOTIFYRESOURCEENDWRITES
AMD_AGS_API AGSReturnCode(* AGS_DRIVEREXTENSIONSDX11_NOTIFYRESOURCEENDWRITES)(AGSContext *, ID3D11Resource *, const D3D11_RECT *, const unsigned int *, unsigned int)
agsDriverExtensionsDX11_NotifyResourceEndWrites
Definition: amd_ags.h:1346
agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirect
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirect(AGSContext *context, ID3D11DeviceContext *dxContext, unsigned int drawCount, ID3D11Buffer *pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs)
Function used to submit a batch of draws via MultiDrawIndirect.
AGSConfiguration::freeCallback
AGS_FREE_CALLBACK freeCallback
Optional memory freeing callback. If not supplied, free() is used.
Definition: amd_ags.h:324
AMD_AGS_API
#define AMD_AGS_API
AGS exported functions.
Definition: amd_ags.h:133
AGSDisplayInfo::currentRefreshRate
float currentRefreshRate
The current refresh rate.
Definition: amd_ags.h:226
AGS_FREE_CALLBACK
void(__stdcall * AGS_FREE_CALLBACK)(void *allocationPtr)
AGS user defined free prototype.
Definition: amd_ags.h:318
AGSDX11ReturnedParams::ExtensionsSupported::breadcrumbMarkers
unsigned int breadcrumbMarkers
Supported in Radeon Software Version 17.11.1 onwards.
Definition: amd_ags.h:673
agsDriverExtensionsDX11_DestroyDevice
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_DestroyDevice(AGSContext *context, ID3D11Device *device, unsigned int *deviceReferences, ID3D11DeviceContext *immediateContext, unsigned int *immediateContextReferences)
Function to destroy the D3D11 device and its immediate context.
AGSCrossfireMode
AGSCrossfireMode
The different modes to control Crossfire behavior.
Definition: amd_ags.h:618
AGSDisplaySettings::Mode
Mode
The display mode.
Definition: amd_ags.h:341
AGSRect::offsetY
int offsetY
Offset on Y axis.
Definition: amd_ags.h:198
AGS_NO_AMD_DRIVER_INSTALLED
Returned if the AMD GPU driver does not appear to be installed.
Definition: amd_ags.h:183
AGSDX11DeviceCreationParams::Software
HMODULE Software
Consult the DX documentation on D3D11CreateDevice for this parameter.
Definition: amd_ags.h:630
AGSDX11DeviceCreationParams::pFeatureLevels
const D3D_FEATURE_LEVEL * pFeatureLevels
Consult the DX documentation on D3D11CreateDevice for this parameter.
Definition: amd_ags.h:632