|
24 | 24 |
|
25 | 25 | #define AMD_AGS_VERSION_MAJOR 4 |
26 | 26 | #define AMD_AGS_VERSION_MINOR 0 |
27 | | -#define AMD_AGS_VERSION_PATCH 2 |
| 27 | +#define AMD_AGS_VERSION_PATCH 3 |
28 | 28 |
|
29 | 29 | #ifdef __cplusplus |
30 | 30 | extern "C" { |
@@ -65,14 +65,37 @@ enum AGSReturnCode |
65 | 65 |
|
66 | 66 | enum AGSDriverExtensionDX11 |
67 | 67 | { |
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 |
74 | 83 | }; |
75 | 84 |
|
| 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 | + |
76 | 99 | enum AGSPrimitiveTopology |
77 | 100 | { |
78 | 101 | AGS_PRIMITIVE_TOPOLOGY_QUADLIST = 7, |
@@ -284,15 +307,36 @@ AMD_AGS_API AGSReturnCode agsGetGPUMemorySize( AGSContext* context, int gpuIndex |
284 | 307 | AMD_AGS_API AGSReturnCode agsGetEyefinityConfigInfo( AGSContext* context, int displayIndex, AGSEyefinityInfo* eyefinityInfo, int* numDisplaysInfo, AGSDisplayInfo* displaysInfo ); |
285 | 308 |
|
286 | 309 |
|
| 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 | + |
287 | 329 | // Description |
288 | 330 | // Function used to initialize the AMD-specific driver extensions for D3D11 |
289 | 331 | // |
290 | 332 | // Input params |
291 | 333 | // context - Pointer to a context. This is generated by agsInit() |
292 | 334 | // 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. |
293 | 337 | // extensionsSupported - Pointer to a bit mask that this function will fill in to indicate which extensions are supported. |
294 | 338 | // |
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 ); |
296 | 340 |
|
297 | 341 | // Description |
298 | 342 | // Function used to cleanup any AMD-specific driver extensions for D3D11 |
@@ -345,18 +389,52 @@ AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetDepthBounds( AGSContext* co |
345 | 389 | // Function used to submit a batch of draws via MultiDrawIndirect |
346 | 390 | // |
347 | 391 | // 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. |
349 | 397 | // |
350 | 398 | AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawInstancedIndirect( AGSContext* context, unsigned int drawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs ); |
351 | 399 |
|
352 | 400 | // Description |
353 | 401 | // Function used to submit a batch of draws via MultiDrawIndirect |
354 | 402 | // |
355 | 403 | // 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. |
357 | 409 | // |
358 | 410 | AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirect( AGSContext* context, unsigned int drawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs ); |
359 | 411 |
|
| 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 | + |
360 | 438 | // Description |
361 | 439 | // Functions to create a Direct3D11 resource with the specified AFR transfer type |
362 | 440 | // |
|
0 commit comments