Skip to content

Commit 81cb5dd

Browse files
committed
Pull latest ags_lib to re-enable GCN shader extension support
This also adds support for Multidraw Indirect Count Indirect for DirectX 11 and fixes clock speed information for Polaris GPUs. * Requires Radeon Software Crimson Edition 16.9.1 (driver version 16.40) or later
2 parents 332daee + 0c3357e commit 81cb5dd

File tree

10 files changed

+1579
-11
lines changed

10 files changed

+1579
-11
lines changed

ags_lib/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# AMD AGS Library Changelog
22

3+
### v4.0.3 - 2016-08-18
4+
* Improve support for DirectX 11 and DirectX 12 GCN shader extensions
5+
* Add support for Multidraw Indirect Count Indirect for DirectX 11
6+
* Fix clock speed information for Polaris GPUs
7+
* Requires Radeon Software Crimson Edition 16.9.1 (driver version 16.40) or later
8+
39
### v4.0.0 - 2016-05-24
410
* Add support for GCN shader extensions
511
* Shader extensions are exposed for both DirectX 11 and DirectX 12

ags_lib/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# AMD AGS Library
22
![AMD AGS Library](http://gpuopen-librariesandsdks.github.io/media/amd_logo_black.png)
33

4-
The AMD GPU Services (AGS) library provides software developers with the ability to query AMD GPU software and hardware state information that is not normally available through standard operating systems or graphic APIs. Version 4.0 of the library includes support for querying graphics driver version info, GPU performance, Crossfire™ (AMD's multi-GPU rendering technology) configuration info, and Eyefinity (AMD's multi-display rendering technology) configuration info. AGS also exposes the explicit Crossfire API extension and additional extensions supported in the AMD drivers for DirectX 11.
4+
The AMD GPU Services (AGS) library provides software developers with the ability to query AMD GPU software and hardware state information that is not normally available through standard operating systems or graphic APIs. Version 4.0 of the library includes support for querying graphics driver version info, GPU performance, Crossfire™ (AMD's multi-GPU rendering technology) configuration info, and Eyefinity (AMD's multi-display rendering technology) configuration info. AGS also exposes the explicit Crossfire API extension, GCN shader extensions, and additional extensions supported in the AMD drivers for DirectX 11 and DirectX 12.
55

66
This version of the AGS library is just the documentation, header file, import libraries, and DLLs. For the full AGS SDK, which includes samples, visit the AGS SDK repository:
77
https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK

ags_lib/doc/AGS Documentation.pdf

8.95 KB
Binary file not shown.

ags_lib/hlsl/ags_shader_intrinsics_dx11.hlsl

Lines changed: 746 additions & 0 deletions
Large diffs are not rendered by default.

ags_lib/hlsl/ags_shader_intrinsics_dx12.hlsl

Lines changed: 738 additions & 0 deletions
Large diffs are not rendered by default.

ags_lib/inc/amd_ags.h

Lines changed: 88 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#define AMD_AGS_VERSION_MAJOR 4
2626
#define AMD_AGS_VERSION_MINOR 0
27-
#define AMD_AGS_VERSION_PATCH 2
27+
#define AMD_AGS_VERSION_PATCH 3
2828

2929
#ifdef __cplusplus
3030
extern "C" {
@@ -65,14 +65,37 @@ enum AGSReturnCode
6565

6666
enum AGSDriverExtensionDX11
6767
{
68-
AGS_DX11_EXTENSION_QUADLIST = 1 << 0,
69-
AGS_DX11_EXTENSION_SCREENRECTLIST = 1 << 1,
70-
AGS_DX11_EXTENSION_UAV_OVERLAP = 1 << 2,
71-
AGS_DX11_EXTENSION_DEPTH_BOUNDS_TEST = 1 << 3,
72-
AGS_DX11_EXTENSION_MULTIDRAWINDIRECT = 1 << 4,
73-
AGS_DX11_EXTENSION_CROSSFIRE_API = 1 << 5,
68+
AGS_DX11_EXTENSION_QUADLIST = 1 << 0,
69+
AGS_DX11_EXTENSION_SCREENRECTLIST = 1 << 1,
70+
AGS_DX11_EXTENSION_UAV_OVERLAP = 1 << 2,
71+
AGS_DX11_EXTENSION_DEPTH_BOUNDS_TEST = 1 << 3,
72+
AGS_DX11_EXTENSION_MULTIDRAWINDIRECT = 1 << 4,
73+
AGS_DX11_EXTENSION_MULTIDRAWINDIRECT_COUNTINDIRECT = 1 << 5,
74+
AGS_DX11_EXTENSION_CROSSFIRE_API = 1 << 6,
75+
AGS_DX11_EXTENSION_INTRINSIC_READFIRSTLANE = 1 << 7,
76+
AGS_DX11_EXTENSION_INTRINSIC_READLANE = 1 << 8,
77+
AGS_DX11_EXTENSION_INTRINSIC_LANEID = 1 << 9,
78+
AGS_DX11_EXTENSION_INTRINSIC_SWIZZLE = 1 << 10,
79+
AGS_DX11_EXTENSION_INTRINSIC_BALLOT = 1 << 11,
80+
AGS_DX11_EXTENSION_INTRINSIC_MBCOUNT = 1 << 12,
81+
AGS_DX11_EXTENSION_INTRINSIC_COMPARE3 = 1 << 13,
82+
AGS_DX11_EXTENSION_INTRINSIC_BARYCENTRICS = 1 << 14
7483
};
7584

85+
enum AGSDriverExtensionDX12
86+
{
87+
AGS_DX12_EXTENSION_INTRINSIC_READFIRSTLANE = 1 << 0,
88+
AGS_DX12_EXTENSION_INTRINSIC_READLANE = 1 << 1,
89+
AGS_DX12_EXTENSION_INTRINSIC_LANEID = 1 << 2,
90+
AGS_DX12_EXTENSION_INTRINSIC_SWIZZLE = 1 << 3,
91+
AGS_DX12_EXTENSION_INTRINSIC_BALLOT = 1 << 4,
92+
AGS_DX12_EXTENSION_INTRINSIC_MBCOUNT = 1 << 5,
93+
AGS_DX12_EXTENSION_INTRINSIC_COMPARE3 = 1 << 6,
94+
AGS_DX12_EXTENSION_INTRINSIC_BARYCENTRICS = 1 << 7
95+
};
96+
97+
const unsigned int AGS_DX12_SHADER_INSTRINSICS_SPACE_ID = 0x7FFF0ADE; // 2147420894
98+
7699
enum AGSPrimitiveTopology
77100
{
78101
AGS_PRIMITIVE_TOPOLOGY_QUADLIST = 7,
@@ -284,15 +307,36 @@ AMD_AGS_API AGSReturnCode agsGetGPUMemorySize( AGSContext* context, int gpuIndex
284307
AMD_AGS_API AGSReturnCode agsGetEyefinityConfigInfo( AGSContext* context, int displayIndex, AGSEyefinityInfo* eyefinityInfo, int* numDisplaysInfo, AGSDisplayInfo* displaysInfo );
285308

286309

310+
// Description
311+
// Function used to initialize the AMD-specific driver extensions for D3D12
312+
//
313+
// Input params
314+
// context - Pointer to a context. This is generated by agsInit()
315+
// device - The D3D12 device.
316+
// extensionsSupported - Pointer to a bit mask that this function will fill in to indicate which extensions are supported.
317+
//
318+
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_Init( AGSContext* context, ID3D12Device* device, unsigned int* extensionsSupported );
319+
320+
// Description
321+
// Function used to cleanup any AMD-specific driver extensions for D3D12
322+
//
323+
// Input params
324+
// context - Pointer to a context.
325+
//
326+
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_DeInit( AGSContext* context );
327+
328+
287329
// Description
288330
// Function used to initialize the AMD-specific driver extensions for D3D11
289331
//
290332
// Input params
291333
// context - Pointer to a context. This is generated by agsInit()
292334
// device - The D3D11 device.
335+
// uavSlot - The UAV slot reserved for intrinsic support. This must match the slot defined in the HLSL, ie #define AmdDxExtShaderIntrinsicsUAVSlot.
336+
// The default slot is 7, but the caller is free to use an alternative slot.
293337
// extensionsSupported - Pointer to a bit mask that this function will fill in to indicate which extensions are supported.
294338
//
295-
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_Init( AGSContext* context, ID3D11Device* device, unsigned int* extensionsSupported );
339+
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_Init( AGSContext* context, ID3D11Device* device, unsigned int uavSlot, unsigned int* extensionsSupported );
296340

297341
// Description
298342
// Function used to cleanup any AMD-specific driver extensions for D3D11
@@ -345,18 +389,52 @@ AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetDepthBounds( AGSContext* co
345389
// Function used to submit a batch of draws via MultiDrawIndirect
346390
//
347391
// Input params
348-
// context - Pointer to a context.
392+
// context - Pointer to a context.
393+
// drawCount - The number of draws.
394+
// pBufferForArgs - The args buffer.
395+
// alignedByteOffsetForArgs - The offset into the args buffer.
396+
// byteStrideForArgs - The per element stride of the args buffer.
349397
//
350398
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawInstancedIndirect( AGSContext* context, unsigned int drawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs );
351399

352400
// Description
353401
// Function used to submit a batch of draws via MultiDrawIndirect
354402
//
355403
// Input params
356-
// context - Pointer to a context.
404+
// context - Pointer to a context.
405+
// drawCount - The number of draws.
406+
// pBufferForArgs - The args buffer.
407+
// alignedByteOffsetForArgs - The offset into the args buffer.
408+
// byteStrideForArgs - The per element stride of the args buffer.
357409
//
358410
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirect( AGSContext* context, unsigned int drawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs );
359411

412+
// Description
413+
// Function used to submit a batch of draws via MultiDrawIndirect
414+
//
415+
// Input params
416+
// context - Pointer to a context.
417+
// pBufferForDrawCount - The draw count buffer.
418+
// alignedByteOffsetForDrawCount - The offset into the draw count buffer.
419+
// pBufferForArgs - The args buffer.
420+
// alignedByteOffsetForArgs - The offset into the args buffer.
421+
// byteStrideForArgs - The per element stride of the args buffer.
422+
//
423+
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawInstancedIndirectCountIndirect( AGSContext* context, ID3D11Buffer* pBufferForDrawCount, unsigned int alignedByteOffsetForDrawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs );
424+
425+
// Description
426+
// Function used to submit a batch of draws via MultiDrawIndirect
427+
//
428+
// Input params
429+
// context - Pointer to a context.
430+
// pBufferForDrawCount - The draw count buffer.
431+
// alignedByteOffsetForDrawCount - The offset into the draw count buffer.
432+
// pBufferForArgs - The args buffer.
433+
// alignedByteOffsetForArgs - The offset into the args buffer.
434+
// byteStrideForArgs - The per element stride of the args buffer.
435+
//
436+
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirectCountIndirect( AGSContext* context, ID3D11Buffer* pBufferForDrawCount, unsigned int alignedByteOffsetForDrawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs );
437+
360438
// Description
361439
// Functions to create a Direct3D11 resource with the specified AFR transfer type
362440
//

ags_lib/lib/amd_ags_x64.dll

2.5 KB
Binary file not shown.

ags_lib/lib/amd_ags_x64.lib

1.44 KB
Binary file not shown.

ags_lib/lib/amd_ags_x86.dll

2 KB
Binary file not shown.

ags_lib/lib/amd_ags_x86.lib

1.46 KB
Binary file not shown.

0 commit comments

Comments
 (0)