Skip to main content
The following workflow shows how to get started with a graphics application on a Qualcomm device.
Figure: Workflow of graphics applications

Figure: Workflow of graphics applications

The preceding flowchart outlines the steps involved in utilizing the Platform SDK for running and analyzing graphics and compute sample applications:
  1. Begin by generating the SDK tailored for the platform.
  2. Run OpenGL ES, OpenCL, and Vulkan sample applications to validate the functionality.
  3. Perform debugging to identify and resolve issues during the sample run.
  4. Use the Snapdragon Profiler tool to analyze graphics performance issues.

Compile and run OpenGL ES-based applications

The Platform SDK provides an OpenGL ES-based sample application called glmark2. This application renders a variety of scenes using the OpenGL ES API. To compile and run OpenGL ES-based applications, you must have an understanding of the OpenGL ES API. Prerequisites
  • Install the Platform SDK using either of the following methods:
  • Establish an SSH connection from the Linux host computer to the device. For instructions, see Sign in using SSH.
  • Ensure that the Weston application is running. If not, start the Weston application by running the following command:
    For more information about the Weston application, see Qualcomm Linux Display Guide.
For information about the OpenGL ES extensions supported on Qualcomm Linux devices, see EGL extensions. Compile and run the glmark2 application
  1. To set the SDK environment on the Linux host computer, run the following command:
  2. To compile and generate a binary, run the following command:
    If you encounter any umask error, set the umask to 022. After successful compilation, you can find the output files in the <path-to-installed-sdk>/workspace/sources/glmark2/oe-workdir/image/usr/bin directory.
  3. To push the binary to the device, run the following commands:
  4. To run the application on the device, open the SSH terminal using the IP address of the device and run the following commands:
    Note To run the sample application from the UART shell, remount the file system using the following command:
    Note The glmark2 and X11 applications encounter an X connection to :0 broken condition. The upcoming release will include a fix for this issue.

Compile and run OpenCL-based applications

The Adreno OpenCL SDK has many sample applications. The steps to compile and run them are the same. You can develop several applications using the Adreno OpenCL SDK. However, consider the GPU capabilities before you compile and run applications. The steps to run the hello world application are as follows: Prerequisites For information about the OpenCL extensions supported on Qualcomm Linux devices, see OpenCL extensions. Compile and run the hello world sample application
  1. To compile the application, run the following commands on the Linux host computer:
    After you successfully compile the code, the system generates binary files in the /build directory.
  2. To run the application, open the SSH terminal using the IP address of the device and run the following commands:
    Note To run the sample application from the UART shell, remount the file system using the following command:
  3. To push the binary to the device, run the following commands:
  4. To start the application, run the following command on the device using the SSH terminal. For all OpenCL use cases, ensure that the export OCL_ICD_FILENAMES=/usr/lib/libOpenCL_adreno.so.1 command is exported when using an overlay or qcom‑multimedia‑proprietary‑image.

Compile and run Vulkan-based applications

The Adreno SDK has many sample applications based on Vulkan. The steps to compile and run any Vulkan-based application are the same. You can develop Vulkan-based applications using the Adreno SDK. To compile and run these applications, see the following procedures. As an example, this section describes the steps to run Sascha Willems and Khronos Vulkan-based applications. Note The Dragonwing IQ-615 device doesn’t support the Vulkan-based applications that depend on the VK_EXT_debug_utils extension. Support for this extension will be provided in the upcoming release.

Compile and run Sascha Willems Vulkan-based applications

You can find the Sascha Willems Vulkan sample applications at https://github.com/SaschaWillems/Vulkan.git. The steps to compile and run any Sascha Willems Vulkan application are the same. For information about the Vulkan extensions supported on Qualcomm Linux devices, see Vulkan extensions. Prerequisites Steps to compile and run the triangle bin sample application
  1. To compile the application, run the following commands on the Linux host computer:
    After successful compilation, you can find the binary files in the build/linux/bin directory.
  2. To push the binary to the device, run the following commands:
  3. To run the application, open the SSH terminal using the IP address of the device and run the following commands. For all Vulkan-based use cases, ensure that the export VK_DRIVER_FILES=/usr/share/vulkan/icd.d/adrenovk.json command is exported when using an overlay or qcom‑multimedia‑proprietary‑image.

Compile and run Khronos Vulkan-based applications

You can find the Khronos Vulkan-based applications at https://github.com/KhronosGroup/Vulkan-Samples.git. The steps to compile and run any Khronos Vulkan-based application are the same. For information about the Vulkan extensions supported on Qualcomm Linux devices, see Vulkan extensions. Prerequisites Steps to compile and run the vulkan_samples application
  1. To compile the application, run the following commands on the Linux host computer:
    If the compilation fails, do the following:
    1. Open the Vulkan-Samples/build/linux/CmakeCache.txt file.
    2. Change GLFW_BUILD_X11 to OFF.
    3. Run the following command:
  2. To generate the binary files, run the following command:
    After successful compilation, you can find the binary files in the Vulkan-Samples/build/linux/app/bin/Release/aarch64 directory.
  3. To push the binary to the device, run the following commands:
  4. To run the application, open the SSH terminal using the IP address of the device and run the following commands. For all Vulkan-based use cases, ensure that the export VK_DRIVER_FILES=/usr/share/vulkan/icd.d/adrenovk.json command is exported when using an overlay or qcom‑multimedia‑proprietary‑image.
    Note If you are facing issues compiling the application or running it, use the following commands to check out the specific version. Later, repeat the steps from 2 to 4 and recompile the application and run.
    If you are unable to run these sample applications from the /tmp directory due to storage issues, try alternative directories such as /etc.

Compile and run X11-based applications

The X11-based applications are graphical programs designed for the X Window system, a widely used display protocol on Linux and other Unix-like OS. Prerequisites
  • Install the Platform SDK using either of the following methods:
  • Establish an SSH connection from the Linux host computer to the device. For instructions, see Sign in using SSH.
  • Install X11-related binaries from GitLab.
    • Install libXt (X Toolkit Intrinsics)
    • Install libxmu (miscellaneous utility functions for X11)
    • Install X development libraries for host computer
  • Set up Meson
    1. Create the aarch64-qcom-linux-meson.cross file.
    2. Add the following text to the aarch64-qcom-linux-meson.cross file and save the changes.
    3. Create the meson.native file.
    4. Add the following text to the meson.native file and save the changes.
Compile and run X11-based glmark2 application
  1. To set the SDK environment run the following command in the Linux terminal:
  2. To clone the glmark2 source, run the following command:
  3. To configure, run the following command:
  4. To compile and generate a binary, run the following command:
    The generated binary file is available at: build/bin directory. For example, build/src/es-glmark2. The data file is available at: build/share/glmark2. For example, <path-to-installed-Platform-sdk>/glmark2/source/build/share/glmark2.
  5. To start the procedure, run the following commands:
  6. To run Weston, open a new SSH terminal using the IP address of the device and run the following command:
  7. To run the glmark2 application, open the original SSH terminal using the IP address of the device and run the following command:
Note When you run the glmark2 application, consider the run successful once the benchmark is complete and the final score is displayed. You can disregard any messages after this point. Compile and run X11-based VKCube application
  1. To set the SDK environment run the following command in the Linux terminal:
  2. To clone the VKCube source, run the following command:
  3. To configure, run the following command:
  4. To compile and generate a binary, run the following command:
    The generated binary file is available at: $PWD/build/. For example, <path-to-installed-Platform-sdk>/vkcube/build/.
  5. To start the procedure, open a new SSH terminal using the IP address of the device and run the following command:
  6. To start the VKCube application, open the original SSH terminal using the IP address of the device and run the following commands:
  7. Open a new SSH terminal using the IP address of the device, and run the following command:

Next steps