AMD GPU Services (AGS)
|
It is now mandatory to call agsDriverExtensionsDX12_CreateDevice when creating a device if the user wants to access any future DX12 AMD extensions. The corresponding agsDriverExtensionsDX12_DestroyDevice call must be called to release the device and free up the internal resources allocated by the create call. More...
Classes | |
struct | AGSDX12DeviceCreationParams |
The struct to specify the DX12 device creation parameters. More... | |
struct | AGSDX12ExtensionParams |
The struct to specify DX12 additional device creation parameters. More... | |
struct | AGSDX12ReturnedParams |
The struct to hold all the returned parameters from the device creation call. More... | |
Typedefs | |
typedef struct AGSDX12DeviceCreationParams | AGSDX12DeviceCreationParams |
The struct to specify the DX12 device creation parameters. | |
typedef struct AGSDX12ExtensionParams | AGSDX12ExtensionParams |
The struct to specify DX12 additional device creation parameters. | |
typedef struct AGSDX12ReturnedParams | AGSDX12ReturnedParams |
The struct to hold all the returned parameters from the device creation call. | |
Functions | |
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. More... | |
AMD_AGS_API AGSReturnCode | agsDriverExtensionsDX12_DestroyDevice (AGSContext *context, ID3D12Device *device, unsigned int *deviceReferences) |
Function to destroy the D3D12 device. More... | |
Variables | |
const unsigned int | AGS_DX12_SHADER_INTRINSICS_SPACE_ID = 0x7FFF0ADE |
The space id for DirectX12 intrinsic support. | |
It is now mandatory to call agsDriverExtensionsDX12_CreateDevice when creating a device if the user wants to access any future DX12 AMD extensions. The corresponding agsDriverExtensionsDX12_DestroyDevice call must be called to release the device and free up the internal resources allocated by the create call.
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.
When using the HLSL shader extensions please note:
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 AGS_DX12_SHADER_INTRINSICS_SPACE_ID. The HLSL expects this as default and the set up code would look similar to this:
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 AGSDX12ReturnedParams::ExtensionsSupported::UAVBindSlot bit is set. to ensure the driver can support this. If not, then u0 and AGS_DX12_SHADER_INTRINSICS_SPACE_ID must be used. 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.
[in] | context | Pointer to a context. This is generated by agsInitialize |
[in] | creationParams | Pointer to the struct to specify the existing DX12 device creation parameters. |
[in] | extensionParams | Optional pointer to the struct to specify DX12 additional device creation parameters. |
[out] | returnedParams | Pointer to struct to hold all the returned parameters from the call. |
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_DestroyDevice | ( | AGSContext * | context, |
ID3D12Device * | device, | ||
unsigned int * | deviceReferences | ||
) |
Function to destroy the D3D12 device.
This call will also cleanup any AMD-specific driver extensions for D3D12.
[in] | context | Pointer to a context. |
[in] | device | Pointer to the D3D12 device. |
[out] | deviceReferences | Optional pointer to an unsigned int that will be set to the value returned from device->Release(). |