Using ADLX in an application

The ADLX SDK provides different versions of the ADLX initialization function to use when you load ADLX into a new application or into an existing application that uses ADL.

Prerequisite(s)

  • Install the ADLX SDK before programming an application with ADLX. Native support is provided for C, and C++.

  • Build the ADLX binding wrapper when programming in C#, Java, or Python.

To access the ADLX System interface

  1. Program an application to load the ADLX library.

  2. Load the ADLX library.

  3. Initialize ADLX by locating and calling the pointer to the respective function.

    Result: Access to the ADLX System interface is provided on a successful Initialization call.

    Note: There are different ADLX initialization versions that correspond to a specific function. Program your application to only find one function pointer to call a specific ADLX Initialization function that best suits your requirement.

Context

The ADLX System interface is the gateway to all available ADLX interfaces. These interfaces provide the methods required to access all the features available in the AMD driver. The ADLX Helper code provided with the ADLX SDK simplifies the loading and unloading of ADLX by finding, and then calling the required function pointers whenever ADLX is initialized.

Using ADLX in a new application

You can program a new application to use ADLX to work with the AMD driver. You can load and initialize ADLX in a new application by accessing the ADLXInitialize function.

Using ADLX in an ADL application

An existing application that uses ADL can be programmed to support ADLX without rewriting the entire code. ADLX provides ADLXInitializeWithCallerADL as an initialization function to load and initialize ADLX in an application that already uses ADL. You can load and initialize ADLX in a application that uses ADL by accessing the ADLXInitializeWithCallerADL function:

Pass the ADL context and the ADLX_ADL_Main_Memory_Free function (previously passed during ADL initialization) as input parameters into ADLXInitializeWithCallerADL. The IADLMapping interface is provided as output parameter. This interface provides data mapping between ADL and ADLX for a specific entity (GPU, Display or Desktop).