Skip to content

Commit 003b453

Browse files
committed
AGS 6.1
1 parent 7d2d1a2 commit 003b453

File tree

70 files changed

+3189
-324
lines changed

Some content is hidden

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

70 files changed

+3189
-324
lines changed

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2020 Advanced Micro Devices, Inc. All rights reserved.
1+
Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 7 additions & 0 deletions

ags_lib/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2020 Advanced Micro Devices, Inc. All rights reserved.
1+
Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

ags_lib/doc/amd_ags.chm

2.03 KB
Binary file not shown.

ags_lib/hlsl/ags_shader_intrinsics_dx11.hlsl

Lines changed: 1 addition & 109 deletions
Large diffs are not rendered by default.

ags_lib/hlsl/ags_shader_intrinsics_dx12.hlsl

Lines changed: 29 additions & 138 deletions
Large diffs are not rendered by default.

ags_lib/inc/amd_ags.h

Lines changed: 60 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright (c) 2020 Advanced Micro Devices, Inc. All rights reserved.
2+
// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
33
//
44
// Permission is hereby granted, free of charge, to any person obtaining a copy
55
// of this software and associated documentation files (the "Software"), to deal
@@ -34,6 +34,12 @@
3434
/// \endinternal
3535
///
3636
/// ---------------------------------------
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+
/// ---------------------------------------
3743
/// What's new in AGS 6.0 since version 5.4.2
3844
/// ---------------------------------------
3945
/// AGS 6.0 includes the following updates:
@@ -105,8 +111,8 @@
105111
#define AMD_AGS_H
106112

107113
#define AMD_AGS_VERSION_MAJOR 6 ///< AGS major version
108-
#define AMD_AGS_VERSION_MINOR 0 ///< AGS minor version
109-
#define AMD_AGS_VERSION_PATCH 1 ///< AGS patch version
114+
#define AMD_AGS_VERSION_MINOR 1 ///< AGS minor version
115+
#define AMD_AGS_VERSION_PATCH 0 ///< AGS patch version
110116

111117
#ifdef __cplusplus
112118
extern "C" {
@@ -122,6 +128,7 @@ extern "C" {
122128

123129
#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
124130
#define AGS_UNSPECIFIED_VERSION 0xFFFFAD00 ///< Use this to specify no version
131+
#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
125132
/// @}
126133

127134
#if !defined (AGS_DIRECTX_TYPES_INCLUDED)
@@ -252,6 +259,7 @@ typedef struct AGSDeviceInfo
252259
AsicFamily_Vega, ///< AMD Vega architecture, including Raven Ridge (ie AMD Ryzen CPU + AMD Vega GPU).
253260
AsicFamily_RDNA, ///< AMD RDNA architecture
254261
AsicFamily_RDNA2, ///< AMD RDNA2 architecture
262+
AsicFamily_RDNA3, ///< AMD RDNA3 architecture
255263

256264
AsicFamily_Count ///< Number of enumerated ASIC families
257265
} AsicFamily;
@@ -385,14 +393,14 @@ AMD_AGS_API int agsGetVersionNumber();
385393

386394
///
387395
/// 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.
389397
/// Must be called prior to any of the subsequent AGS API calls.
390398
/// Must be called prior to ID3D11Device or ID3D12Device creation.
391399
/// \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.
392400
/// \note This function will fail with \ref AGS_NO_AMD_DRIVER_INSTALLED if there is no AMD driver found on the system.
393401
/// \note This function will fail with \ref AGS_LEGACY_DRIVER in Catalyst versions before 12.20.
394402
///
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.
396404
/// \param [in] config Optional pointer to a AGSConfiguration struct to override the default library configuration.
397405
/// \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.
398406
/// \param [out] gpuInfo Optional pointer to a AGSGPUInfo struct which will get filled in for all the GPUs in the system.
@@ -425,6 +433,39 @@ AMD_AGS_API AGSReturnCode agsSetDisplayMode( AGSContext* context, int deviceInde
425433

426434
/// @}
427435

436+
/// @}
437+
438+
439+
/// \defgroup dxappreg App Registration
440+
/// @{
441+
/// 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.
466+
///
467+
/// @}
468+
428469
/// \defgroup dx12 DirectX12 Extensions
429470
/// DirectX12 driver extensions
430471
/// @{
@@ -482,7 +523,7 @@ const unsigned int AGS_DX12_SHADER_INSTRINSICS_SPACE_ID = 0x7FFF0ADE; // 2147420
482523
/// Function used to create a D3D12 device with additional AMD-specific initialization parameters.
483524
///
484525
/// 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.
486527
/// * The shader compiler needs D3DCOMPILE_ENABLE_STRICTNESS (/Ges) enabled.
487528
/// * The intrinsic instructions require a 5.1 shader model.
488529
/// * 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
528569
///
529570
/// \param [in] context Pointer to a context.
530571
/// \param [in] commandList Pointer to the command list.
531-
/// \param [in] data The marker string.
572+
/// \param [in] data The UTF-8 marker string.
532573
///
533574
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_PushMarker( AGSContext* context, ID3D12GraphicsCommandList* commandList, const char* data );
534575

@@ -547,7 +588,7 @@ AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_PopMarker( AGSContext* context
547588
///
548589
/// \param [in] context Pointer to a context.
549590
/// \param [in] commandList Pointer to the command list.
550-
/// \param [in] data The marker string.
591+
/// \param [in] data The UTF-8 marker string.
551592
///
552593
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_SetMarker( AGSContext* context, ID3D12GraphicsCommandList* commandList, const char* data );
553594

@@ -663,37 +704,6 @@ AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_DestroyDevice( AGSContext* con
663704

664705
/// @}
665706

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-
697707
/// \defgroup breadcrumbs Breadcrumb API
698708
/// API for writing top-of-pipe and bottom-of-pipe markers to help track down GPU hangs.
699709
///
@@ -907,11 +917,11 @@ AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_WriteBreadcrumb( AGSContext* c
907917
/// @{
908918

909919
/// Additional topologies supported via extensions
910-
typedef enum AGSPrimitiveTopology
920+
typedef enum AGSPrimitiveTopologyDX11
911921
{
912922
AGS_PRIMITIVE_TOPOLOGY_QUADLIST = 7, ///< Quad list
913923
AGS_PRIMITIVE_TOPOLOGY_SCREENRECTLIST = 9 ///< Screen rect list
914-
} AGSPrimitiveTopology;
924+
} AGSPrimitiveTopologyDX11;
915925

916926
///
917927
/// Function used to set the primitive topology. If you are using any of the extended topology types, then this function should
@@ -936,12 +946,11 @@ AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_IASetPrimitiveTopology( AGSCon
936946

937947
/// \defgroup dx11UAVOverlap UAV Overlap
938948
/// API for enabling overlapping UAV writes
939-
/// @{
940-
941949
///
942-
/// 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.
945954
///
946955
/// Usage would be as follows:
947956
/// \code{.cpp}
@@ -958,6 +967,10 @@ AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_IASetPrimitiveTopology( AGSCon
958967
/// // Reenable automatic WAW syncs
959968
/// agsDriverExtensionsDX11_EndUAVOverlap( m_agsContext );
960969
/// \endcode
970+
/// @{
971+
972+
///
973+
/// Function used indicate to the driver the start of the overlap scope.
961974
///
962975
/// \param [in] context Pointer to a context.
963976
/// \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.
@@ -966,7 +979,7 @@ AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_IASetPrimitiveTopology( AGSCon
966979
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_BeginUAVOverlap( AGSContext* context, ID3D11DeviceContext* dxContext );
967980

968981
///
969-
/// 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.
970983
///
971984
/// \param [in] context Pointer to a context.
972985
/// \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.

ags_lib/lib/amd_ags_x64.dll

122 KB
Binary file not shown.

ags_lib/lib/amd_ags_x64.lib

-614 Bytes
Binary file not shown.

ags_lib/lib/amd_ags_x64_2015_MD.lib

-56.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)