# Getting started Source: [https://docs.qualcomm.com/doc/80-70015-19/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70015-19/topic/graphics-getting-started.html) The following workflow shows how to get started with a graphics application on a Qualcomm device. Figure : Workflow of graphics applications Page-1 Run sample applications Run sample applications OpenCL sample application OpenCL sample application OpenGL ES sample application OpenGL ES sample application Vulkan sample application Vulkan sample application Generate Platform eSDK Generate Platform eSDK Debug sample applications Debug sample applications Run the Snapdragon Profiler tool for profiling sample applica... Run the Snapdragon Profiler tool for profiling sample applications ## Run OpenGL ES sample application Source: [https://docs.qualcomm.com/doc/80-70015-19/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70015-19/topic/graphics-getting-started.html) ### About this task **Prerequisites** - Install Platform eSDK using either of the following methods: - [Using Qualcomm release archive](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-51/install-sdk.html#download-qim-platform-esdk) - [Manually compile the Qualcomm Linux SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#generate-an-esdk) - Enable SSH to access the host device securely. For instructions, see [Use SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#use-ssh). For information on the OpenGL ES extensions supported on Qualcomm Linux devices, see [EGL extensions](https://docs.qualcomm.com/doc/80-70015-19/topic/supported_extensions.html#supported-egl-client-extensions). **Compile and run glmark2 application** `glmark2` is an OpenGL ES-based sample application provided in the Platform eSDK. ### Procedure 1. To set the SDK environment in the Linux terminal, run the following command: source environment-setup-armv8-2a-qcom-linuxCopy to clipboard 2. To compile and generate a binary, run the following commands: devtool modify glmark2Copy to clipboard devtool build glmark2Copy to clipboard If there is any umask error, set the umask to 022. After successful compilation, the output files are generated at <path-to-installed-eSDK>/workspace/sources/glmark2/oe-workdir/image/usr/bin. 3. To push the binary to the device, run the following commands: scp -r /workspace/sources/glmark2/oe-workdir/image/usr/bin/glmark2-es2-wayland root@[IP-address-of-device]:/tmpCopy to clipboard scp -r /workspace/sources/glmark2/oe-workdir/image/usr/share/glmark2 root@[IP-address-of-device]:/tmpCopy to clipboard 4. To run the application on the device using SSH, open the SSH terminal using the IP address of the device and run the following commands: export XDG_RUNTIME_DIR=/dev/socket/weston export WAYLAND_DISPLAY=wayland-1Copy to clipboard chmod 777 /tmp/glmark2-es2-waylandCopy to clipboard chmod -R 777 /tmp/glmark2Copy to clipboard cd /tmpCopy to clipboard ./glmark2-es2-wayland --data-path /tmp/glmark2 -b jellyfishCopy to clipboard Note: - To run sample application from the UART shell, remount the file system using the following command: mount -o remount,rw /Copy to clipboard - Before running the application, ensure that the Weston application is running. If the Weston application is not running, launch the Weston application by running the following commands: . /etc/profileCopy to clipboard export XDG_RUNTIME_DIR=/dev/socket/westonCopy to clipboard mkdir --parents $XDG_RUNTIME_DIRCopy to clipboard chmod 0700 $XDG_RUNTIME_DIRCopy to clipboard cd /usr/bin/Copy to clipboard killall westonCopy to clipboard weston --tty=2 --idle-time=0 --log=/tmp/weston.log --config=/etc/xdg/weston/weston.ini --continue-without-inputCopy to clipboard For more information about the Weston application, see [Qualcomm Linux Display Guide](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-18). ## Run OpenCL sample application Source: [https://docs.qualcomm.com/doc/80-70015-19/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70015-19/topic/graphics-getting-started.html) ### About this task **Prerequisites** - Install Platform eSDK using either of the following methods: - [Using Qualcomm release archive](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-51/install-sdk.html#download-qim-platform-esdk) - [Manually compile the Qualcomm Linux SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#generate-an-esdk) - Enable SSH to access the host device securely. For instructions, see [Use SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#use-ssh). - Download the Adreno OpenCL [SDK 2.0](https://qpm.qualcomm.com/#/main/tools/details/Adreno_OpenCL_SDK). Note: You must be a registered user to download the Adreno OpenCL SDK. For information on the OpenCL extensions supported on Qualcomm Linux devices, see [OpenCL extensions](https://docs.qualcomm.com/doc/80-70015-19/topic/supported_extensions.html#supported-opencl-extensions). **Compile and run the hello world sample application** Multiple sample applications are provided in the Adreno OpenCL SDK. The steps to compile and run any sample application remain the same. ### Procedure 1. To compile the application on the host machine, run the following commands: cd opencl-sdkCopy to clipboard source /environment-setup-armv8-2a-qcom-linuxCopy to clipboard cmake -B build -DCLSDK_OPENCL_LIBRARY=$OECORE_TARGET_SYSROOT/usr/lib/libOpenCL.so -DCLSDK_DMABUFHEAP_LIBRARY=$OECORE_TARGET_SYSROOT/usr/lib/libdmabufheap.so -DOPEN_EMBEDDED=1Copy to clipboard cmake --build buildCopy to clipboard After successful compilation, binary files are generated at /build. 2. To run the application, open the SSH terminal using the IP address of the device and run the following commands on the device using the SSH terminal: mkdir -p /opt/dataCopy to clipboard mkdir -p /opt/data/openclCopy to clipboard Note: If you want to run a sample application from the UART shell, remount the file system using the following command: mount -o remount,rw /Copy to clipboard 3. Run the following commands on the host machine: scp -r /build/* root@[IP-address-of-the device]:/opt/data/opencl/Copy to clipboard scp -r /example_images/* root@[IP-address-of-the device]:/opt/data/opencl/Copy to clipboard 4. Run the following commands on the device using the SSH terminal: cd /opt/data/opencl/Copy to clipboard mkdir outCopy to clipboard chmod 777 ./*Copy to clipboard echo "run hello world 2.0 opencl sdk" > hello_world_input.txtCopy to clipboard touch out/hello_world_output.txtCopy to clipboard cat out/hello_world_output.txtCopy to clipboard ./cl_sdk_hello_world hello_world_input.txt out/hello_world_output.txtCopy to clipboard cat out/hello_world_output.txtCopy to clipboard ## Run Vulkan sample applications Source: [https://docs.qualcomm.com/doc/80-70015-19/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70015-19/topic/graphics-getting-started.html) ### About this task **Prerequisites** - Generate Platform eSDK using either of the following methods: - [Using Qualcomm release archive](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-51/install-sdk.html#download-qim-platform-esdk) - [Manually compile the Qualcomm Linux SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#generate-an-esdk) - Enable SSH to access the host device securely. For instructions, see [Use SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#use-ssh). For information on the Vulkan extensions supported on Qualcomm Linux devices, see [Vulkan extensions](https://docs.qualcomm.com/doc/80-70015-19/topic/supported_extensions.html#supported-vulkan-extensions). Multiple sample applications are provided in the Adreno SDK for Vulkan. The steps to compile and run any sample application remain the same. As an example, the steps to run a Sascha Willems and Khronos Vulkan sample applications are described here. ### Sascha Willems Vulkan sample application Source: [https://docs.qualcomm.com/doc/80-70015-19/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70015-19/topic/graphics-getting-started.html) ### About this task The Sascha Willems Vulkan sample applications are available at [https://github.com/SaschaWillems/Vulkan.git](https://github.com/SaschaWillems/Vulkan.git). The steps to compile and run any Sascha Willems Vulkan application are the same. **Compile and run the triangle bin application** ### Procedure 1. To compile the application, run the following commands on the host machine: git clone --recurse-submodules https://github.com/SaschaWillems/Vulkan.gitCopy to clipboard cd VulkanCopy to clipboard source /environment-setup-armv8-2a-qcom-linuxCopy to clipboard cmake -G "Unix Makefiles" -Bbuild/linux -DUSE_WAYLAND_WSI=ON -DRESOURCE_INSTALL_DIR="/tmp/"Copy to clipboard cmake --build build/linux --config Release -j$(nproc)Copy to clipboard After successful compilation, binary files are generated at build/linux/bin. 2. To push the binary to the device, run the following commands on the host machine: cd VulkanCopy to clipboard scp -r assets root@[IP-address-of-device]:/tmp/Copy to clipboard scp -r shaders root@[IP-address-of-device]:/tmp/Copy to clipboard scp -r build/linux/bin/triangle root@[IP-address-of-device]:/tmp/Copy to clipboard 3. To run the application, open the SSH terminal using the IP address of the device and run the following commands: cd /tmpCopy to clipboard chmod -R 777 assetsCopy to clipboard chmod -R 777 shadersCopy to clipboard chmod 777 triangleCopy to clipboard . /etc/profileCopy to clipboard export XDG_RUNTIME_DIR=/dev/socket/westonCopy to clipboard mkdir --parents $XDG_RUNTIME_DIRCopy to clipboard chmod 0700 $XDG_RUNTIME_DIRCopy to clipboard export WAYLAND_DISPLAY=wayland-1Copy to clipboard ./triangleCopy to clipboard ### Khronos Vulkan sample application Source: [https://docs.qualcomm.com/doc/80-70015-19/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70015-19/topic/graphics-getting-started.html) ### About this task The Khronos Vulkan sample applications are available at [https://github.com/KhronosGroup/Vulkan-Samples.git](https://github.com/KhronosGroup/Vulkan-Samples.git). The steps to compile and run any Khronos Vulkan application are the same. **Compile and run the vulkan\_samples application** ### Procedure 1. To compile the application, run the following commands on the host machine: sudo apt-get install -y libwayland-devCopy to clipboard git clone --recurse-submodules https://github.com/KhronosGroup/Vulkan-Samples.gitCopy to clipboard cd Vulkan-Samples/Copy to clipboard source /environment-setup-armv8-2a-qcom-linuxCopy to clipboard cmake -G "Unix Makefiles" -Bbuild/linux -DCMAKE_BUILD_TYPE=Release -DVKB_WSI_SELECTION=WAYLAND -DGLFW_BUILD_X11=OFFCopy to clipboard If the compilation fails, do the following: 1. Open the Vulkan-Samples/build/linux/CmakeCache.txt file. 2. Change `GLFW_BUILD_X11` to `OFF`. 2. To generate the binary files, run the following command on the host machine: cmake --build build/linux --config Release --target vulkan_samples -j$(nproc)Copy to clipboard After successful compilation, the binary files are generated at Vulkan-Samples/build/linux/app/bin/Release/aarch64. 3. Run the following commands on the host machine: cd Vulkan-SamplesCopy to clipboard scp -r assets root@[IP-address-of-device]:/tmp/Copy to clipboard scp -r shaders root@[IP-address-of-device]:/tmp/Copy to clipboard scp -r build/linux/app/bin/Release/aarch64/vulkan_samples root@[IP-address-of-device]:/tmp/Copy to clipboard 4. Open the SSH terminal using the IP address of the device and run the following commands: cd /tmpCopy to clipboard chmod -R 777 assetsCopy to clipboard chmod -R 777 shadersCopy to clipboard chmod 777 vulkan_samplesCopy to clipboard . /etc/profileCopy to clipboard export XDG_RUNTIME_DIR=/dev/socket/westonCopy to clipboard mkdir --parents $XDG_RUNTIME_DIRCopy to clipboard chmod 0700 $XDG_RUNTIME_DIRCopy to clipboard export WAYLAND_DISPLAY=wayland-1Copy to clipboard ./vulkan_samples sample swapchain_imagesCopy to clipboard Note: If you are unable to run these sample applications from the `/tmp` directory due to storage issues, try alternative directories such as `/etc`. Last Published: Oct 14, 2024 [Previous Topic Overview](https://docs.qualcomm.com/bundle/publicresource/80-70015-19/topics/graphics-overview.md) [Next Topic Features](https://docs.qualcomm.com/bundle/publicresource/80-70015-19/topics/graphics_features.md)