You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ags_lib/inc/amd_ags.h
+60-47Lines changed: 60 additions & 47 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
//
2
-
// Copyright (c) 2020 Advanced Micro Devices, Inc. All rights reserved.
2
+
// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
3
3
//
4
4
// Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
// of this software and associated documentation files (the "Software"), to deal
@@ -34,6 +34,12 @@
34
34
/// \endinternal
35
35
///
36
36
/// ---------------------------------------
37
+
/// What's new in AGS 6.1 since version 6.0
38
+
/// ---------------------------------------
39
+
/// AGS 6.1 includes the following updates:
40
+
/// * RDNA3 detection
41
+
///
42
+
/// ---------------------------------------
37
43
/// What's new in AGS 6.0 since version 5.4.2
38
44
/// ---------------------------------------
39
45
/// AGS 6.0 includes the following updates:
@@ -105,8 +111,8 @@
105
111
#defineAMD_AGS_H
106
112
107
113
#defineAMD_AGS_VERSION_MAJOR 6 ///< AGS major version
108
-
#defineAMD_AGS_VERSION_MINOR0 ///< AGS minor version
109
-
#defineAMD_AGS_VERSION_PATCH1 ///< AGS patch version
114
+
#defineAMD_AGS_VERSION_MINOR1 ///< AGS minor version
115
+
#defineAMD_AGS_VERSION_PATCH0 ///< AGS patch version
110
116
111
117
#ifdef__cplusplus
112
118
extern"C" {
@@ -122,6 +128,7 @@ extern "C" {
122
128
123
129
#defineAGS_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
124
130
#defineAGS_UNSPECIFIED_VERSION 0xFFFFAD00 ///< Use this to specify no version
131
+
#defineAGS_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
125
132
/// @}
126
133
127
134
#if !defined (AGS_DIRECTX_TYPES_INCLUDED)
@@ -252,6 +259,7 @@ typedef struct AGSDeviceInfo
252
259
AsicFamily_Vega, ///< AMD Vega architecture, including Raven Ridge (ie AMD Ryzen CPU + AMD Vega GPU).
253
260
AsicFamily_RDNA, ///< AMD RDNA architecture
254
261
AsicFamily_RDNA2, ///< AMD RDNA2 architecture
262
+
AsicFamily_RDNA3, ///< AMD RDNA3 architecture
255
263
256
264
AsicFamily_Count///< Number of enumerated ASIC families
257
265
} AsicFamily;
@@ -385,14 +393,14 @@ AMD_AGS_API int agsGetVersionNumber();
385
393
386
394
///
387
395
/// Function used to initialize the AGS library.
388
-
/// agsVersion must be specified as AGS_MAKE_VERSION( AMD_AGS_VERSION_MAJOR, AMD_AGS_VERSION_MINOR, AMD_AGS_VERSION_PATCH ) or the call will return \ref AGS_INVALID_ARGS.
396
+
/// agsVersion must be specified as AGS_CURRENT_VERSION or the call will return \ref AGS_INVALID_ARGS.
389
397
/// Must be called prior to any of the subsequent AGS API calls.
390
398
/// Must be called prior to ID3D11Device or ID3D12Device creation.
391
399
/// \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.
392
400
/// \note This function will fail with \ref AGS_NO_AMD_DRIVER_INSTALLED if there is no AMD driver found on the system.
393
401
/// \note This function will fail with \ref AGS_LEGACY_DRIVER in Catalyst versions before 12.20.
394
402
///
395
-
/// \param [in] agsVersion The API version specified using the \ref AGS_MAKE_VERSION macro. If this does not match the version in the binary this initialization call will fail.
403
+
/// \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.
396
404
/// \param [in] config Optional pointer to a AGSConfiguration struct to override the default library configuration.
397
405
/// \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.
398
406
/// \param [out] gpuInfo Optional pointer to a AGSGPUInfo struct which will get filled in for all the GPUs in the system.
/// 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.
442
+
/// It is available when creating the device for both DirectX11 and DirectX12 via \ref agsDriverExtensionsDX11_CreateDevice and \ref agsDriverExtensionsDX12_CreateDevice respectively.
443
+
/// This feature is supported in Radeon Software Version 17.9.2 onwards.
444
+
/// Rules:
445
+
/// * AppName or EngineName must be set, but both are not required. Engine profiles will be used only if app specific profiles do not exist.
446
+
/// * 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.
447
+
/// * 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.
448
+
/// * 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.
449
+
///
450
+
/// The cases for profile selection are as follows:
451
+
///
452
+
/// |Case|Profile Applied|
453
+
/// |----|---------------|
454
+
/// | App or Engine Version has profile | The profile is used. |
455
+
/// | App or Engine Version num < profile version num | The closest profile > the version number is used. |
456
+
/// | App or Engine Version num > profile version num | No profile selected/The previous method is used. |
457
+
/// | App and Engine Version have profile | The App's profile is used. |
458
+
/// | App and Engine Version num < profile version | The closest App profile > the version number is used. |
459
+
/// | App and Engine Version, no App profile found | The Engine profile will be used. |
460
+
/// | App/Engine name but no Version, has profile | The latest profile is used. |
461
+
/// | No name or version, or no profile | The previous app detection method is used. |
462
+
///
463
+
/// 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.
464
+
/// 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.
465
+
/// 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.
/// Function used to create a D3D12 device with additional AMD-specific initialization parameters.
483
524
///
484
525
/// When using the HLSL shader extensions please note:
485
-
/// * The shader compiler should not use the D3DCOMPILE_SKIP_OPTIMIZATION (/Od) option, otherwise it will not work.
526
+
/// * The shader compiler should not use the D3DCOMPILE_SKIP_OPTIMIZATION (/Od) option or /O0, otherwise it will not work.
486
527
/// * The shader compiler needs D3DCOMPILE_ENABLE_STRICTNESS (/Ges) enabled.
487
528
/// * The intrinsic instructions require a 5.1 shader model.
488
529
/// * 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.
@@ -528,7 +569,7 @@ AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_DestroyDevice( AGSContext* con
528
569
///
529
570
/// \param [in] context Pointer to a context.
530
571
/// \param [in] commandList Pointer to the command list.
@@ -663,37 +704,6 @@ AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_DestroyDevice( AGSContext* con
663
704
664
705
/// @}
665
706
666
-
667
-
/// \defgroup dx11appreg App Registration
668
-
/// @{
669
-
/// This extension allows an apllication to voluntarily register itself with the driver, providing a more robust app detection solution and avoid the issue of the driver
670
-
/// relying on exe names to match the app to a driver profile.
671
-
/// This feature is supported in Radeon Software Version 17.9.2 onwards.
672
-
/// Rules:
673
-
/// * AppName or EngineName must be set, but both are not required. Engine profiles will be used only if app specific profiles do not exist.
674
-
/// * 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.
675
-
/// * Version number is not mandatory, but heavily suggested. 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.
676
-
/// * 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.
677
-
///
678
-
/// The cases for profile selection are as follows:
679
-
///
680
-
/// |Case|Profile Applied|
681
-
/// |----|---------------|
682
-
/// | App or Engine Version has profile | The profile is used. |
683
-
/// | App or Engine Version num < profile version num | The closest profile > the version number is used. |
684
-
/// | App or Engine Version num > profile version num | No profile selected/The previous method is used. |
685
-
/// | App and Engine Version have profile | The App's profile is used. |
686
-
/// | App and Engine Version num < profile version | The closest App profile > the version number is used. |
687
-
/// | App and Engine Version, no App profile found | The Engine profile will be used. |
688
-
/// | App/Engine name but no Version, has profile | The latest profile is used. |
689
-
/// | No name or version, or no profile | The previous app detection method is used. |
690
-
///
691
-
/// 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.
692
-
/// 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.
693
-
/// 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.
694
-
///
695
-
/// @}
696
-
697
707
/// \defgroup breadcrumbs Breadcrumb API
698
708
/// API for writing top-of-pipe and bottom-of-pipe markers to help track down GPU hangs.
699
709
///
@@ -907,11 +917,11 @@ AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_WriteBreadcrumb( AGSContext* c
907
917
/// @{
908
918
909
919
/// Additional topologies supported via extensions
910
-
typedefenumAGSPrimitiveTopology
920
+
typedefenumAGSPrimitiveTopologyDX11
911
921
{
912
922
AGS_PRIMITIVE_TOPOLOGY_QUADLIST=7, ///< Quad list
913
923
AGS_PRIMITIVE_TOPOLOGY_SCREENRECTLIST=9///< Screen rect list
914
-
} AGSPrimitiveTopology;
924
+
} AGSPrimitiveTopologyDX11;
915
925
916
926
///
917
927
/// Function used to set the primitive topology. If you are using any of the extended topology types, then this function should
/// Function used indicate to the driver that it doesn't need to sync the UAVs bound for the subsequent set of back-to-back dispatches.
943
-
/// When calling back-to-back draw calls or dispatch calls that write to the same UAV, the AMD DX11 driver will automatically insert a barrier to ensure there are no write after write (WAW) hazards.
944
-
/// If the app can guarantee there is no overlap between the writes between these calls, then this extension will remove those barriers allowing the work to run in parallel on the GPU.
950
+
/// 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)
951
+
/// hazards. The UAV overlap extension allows applications to indicate to the driver it can skip inserting barriers for UAV resources used in
952
+
/// dispatches and draws within the \ref agsDriverExtensionsDX11_BeginUAVOverlap/ \ref agsDriverExtensionsDX11_EndUAVOverlap calls. This can be useful for applications to allow
953
+
/// 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.
/// Function used indicate to the driver the start of the overlap scope.
961
974
///
962
975
/// \param [in] context Pointer to a context.
963
976
/// \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.
/// Function used indicate to the driver it can no longer overlap the batch of back-to-back dispatches that has been submitted.
982
+
/// Function used indicate to the driver the end of the overlap scope.
970
983
///
971
984
/// \param [in] context Pointer to a context.
972
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.
0 commit comments