# Getting started
Source: [https://docs.qualcomm.com/doc/80-70014-19/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70014-19/topic/graphics-getting-started.html)
Before compiling any sample application, generate Platform eSDK using one of the
following methods:
- Generate Platform eSDK using Qualcomm release archive
- Generate Platform eSDK by manually compiling the LE.QCLINUX.1.0 SDK
### Generate Platform eSDK using Qualcomm release archive
1. Download the eSDK from the Qualcomm release archive.
- For Ubuntu x86 architecture-based host
machines:
wget https://artifacts.codelinaro.org/artifactory/qli-ci/flashable-binaries/qimpsdk/qcm6490/x86/qcom-6.6.28-QLI.1.1-Ver.1.1_qim-product-sdk-1.1.3.zipCopy to clipboard
- For Arm architecture-based host machines:
wget https://artifacts.codelinaro.org/artifactory/qli-ci/flashable-binaries/qimpsdk/qcm6490/arm/qcom-6.6.28-QLI.1.1-Ver.1.1_qim-product-sdk-1.1.3.zipCopy to clipboard
2. Unzip the SDK to a folder of your choice:
unzip qcom-6.6.28-QLI.1.1-Ver.1.1_qim-product-sdk-1.1.3.zipCopy to clipboard
After
unzipping, verify that the platform eSDK installer
qcom-wayland-x86\_64-qcom-multimedia-image-armv8-2a-qcm6490-toolchain-ext-1.0.sh
is present at:
<unzip\_location>/target/qcm6490/sdk/.
3. Run the installer
script.
umask a+rxCopy to clipboard
sh ./qcom-wayland-x86_64-qcom-multimedia-image-armv8-2a-qcm6490-toolchain-ext-1.0.shCopy to clipboard
4. Follow the instructions on the console to install the Platform eSDK on your
host PC.
For more information on Platform eSDK, see [Download QIM Platform eSDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-51/install-sdk.html#download-qim-platform-esdk).
### Generate Platform eSDK by manually compiling LE.QCLINUX.1.0 SDK
1. Compile LE.QCLINUX.1.0 SDK and verify that the installer
(qcom-wayland-x86\_64-qcom-multimedia-image-armv8-2a-qcm6490-toolchain-ext-1.0.sh)
is generated at <root
directory>/build-qcom-wayland/tmp-glibc/deploy/sdk.
2. Run the installer
script.
umask a+rxCopy to clipboard
sh ./qcom-wayland-x86_64-qcom-multimedia-image-armv8-2a-qcm6490-toolchain-ext-1.0.shCopy to clipboard
3. Follow the instructions on the console to install the Platform eSDK on your
host PC.
For build compilation and SDK creation procedures, see [Qualcomm Linux Build
Guide](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254).
## OpenGL ES sample application
Source: [https://docs.qualcomm.com/doc/80-70014-19/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70014-19/topic/graphics-getting-started.html)
### About this task
**Supported EGL client extensions**
| EGL\_EXT\_client\_extensions, EGL\_KHR\_client\_get\_all\_proc\_addresses EGL\_EXT\_platform\_base, EGL\_KHR\_platform\_android EGL\_KHR\_platform\_wayland, EGL\_KHR\_platform\_gbm EGL\_KHR\_platform\_x11, OpenGL\_ES, EGL\_KHR\_image EGL\_KHR\_image\_base, EGL\_QCOM\_create\_image EGL\_KHR\_lock\_surface, EGL\_KHR\_lock\_surface2 EGL\_KHR\_lock\_surface3, EGL\_KHR\_gl\_texture\_2D\_image, EGL\_KHR\_gl\_texture\_cubemap\_image, EGL\_KHR\_gl\_texture\_3D\_image EGL\_KHR\_gl\_renderbuffer\_image, EGL\_ANDROID\_blob\_cache EGL\_KHR\_create\_context, EGL\_KHR\_surfaceless\_context , EGL\_KHR\_create\_context\_no\_error, EGL\_KHR\_get\_all\_proc\_addresses EGL\_QCOM\_lock\_image2, EGL\_KHR\_no\_config\_context EGL\_EXT\_surface\_SMPTE2086\_metadata, EGL\_EXT\_image\_dma\_buf\_import, EGL\_EXT\_image\_dma\_buf\_import\_modifiers EGL\_EXT\_yuv\_surface, EGL\_IMG\_context\_priority , EGL\_WL\_bind\_wayland\_display, EGL\_WL\_create\_wayland\_buffer\_from\_image, EGL\_ANDROID\_native\_fence\_sync , EGL\_EXT\_create\_context\_robustness, EGL\_KHR\_fence\_sync EGL\_KHR\_wait\_sync, EGL\_KHR\_mutable\_render\_buffer EGL\_KHR\_partial\_update, EGL\_KHR\_surfaceless\_context |
| --- |
**Supported GL extensions**
| GL\_OES\_EGL\_image GL\_OES\_EGL\_image\_external, GL\_OES\_EGL\_sync GL\_OES\_vertex\_half\_float, GL\_OES\_framebuffer\_object GL\_OES\_rgb8\_rgba8, GL\_OES\_compressed\_ETC1\_RGB8\_texture, GL\_AMD\_compressed\_ATC\_texture, GL\_KHR\_texture\_compression\_astc\_ldr, GL\_KHR\_texture\_compression\_astc\_hdr, GL\_OES\_texture\_compression\_astc GL\_EXT\_texture\_compression\_s3tc, GL\_EXT\_texture\_compression\_s3tc\_srgb, GL\_EXT\_texture\_compression\_rgtc GL\_EXT\_texture\_compression\_bptc, GL\_OES\_texture\_npot , GL\_EXT\_texture\_filter\_anisotropic, GL\_EXT\_texture\_format\_BGRA8888 GL\_EXT\_read\_format\_bgra, GL\_OES\_texture\_3D GL\_EXT\_color\_buffer\_float, GL\_EXT\_color\_buffer\_half\_float GL\_EXT\_float\_blend, GL\_QCOM\_alpha\_test , GL\_OES\_depth24 GL\_OES\_packed\_depth\_stencil, GL\_OES\_depth\_texture GL\_OES\_depth\_texture\_cube\_map GL\_EXT\_sRGB, GL\_OES\_texture\_float GL\_OES\_texture\_float\_linear, GL\_OES\_texture\_half\_float , GL\_OES\_texture\_half\_float\_linear, GL\_EXT\_texture\_type\_2\_10\_10\_10\_REV GL\_EXT\_texture\_sRGB\_decode, GL\_EXT\_texture\_compression\_astc\_decode\_mode, GL\_EXT\_texture\_mirror\_clamp\_to\_edge, GL\_EXT\_texture\_format\_sRGB\_override GL\_OES\_element\_index\_uint GL\_EXT\_copy\_image GL\_EXT\_geometry\_shader, GL\_EXT\_tessellation\_shader GL\_OES\_texture\_stencil8, GL\_EXT\_shader\_io\_blocks GL\_OES\_shader\_image\_atomic, GL\_OES\_sample\_variables GL\_EXT\_texture\_border\_clamp, GL\_EXT\_EGL\_image\_external\_wrap\_modes, GL\_EXT\_multisampled\_render\_to\_texture, GL\_EXT\_multisampled\_render\_to\_texture2, GL\_OES\_shader\_multisample\_interpolation, GL\_EXT\_texture\_cube\_map\_array GL\_EXT\_draw\_buffers\_indexed, GL\_EXT\_gpu\_shader5 GL\_EXT\_robustness , GL\_EXT\_texture\_buffer, GL\_EXT\_shader\_framebuffer\_fetch, GL\_ARM\_shader\_framebuffer\_fetch\_depth\_stencil, GL\_OES\_texture\_storage\_multisample\_2d\_array, GL\_OES\_sample\_shading GL\_OES\_get\_program\_binary, GL\_EXT\_debug\_label GL\_KHR\_blend\_equation\_advanced, GL\_KHR\_blend\_equation\_advanced\_coherent GL\_QCOM\_tiled\_rendering, GL\_ANDROID\_extension\_pack\_es31a GL\_EXT\_primitive\_bounding\_box, GL\_OES\_standard\_derivatives GL\_OES\_vertex\_array\_object, GL\_EXT\_disjoint\_timer\_query GL\_KHR\_debug, GL\_EXT\_YUV\_target, GL\_EXT\_sRGB\_write\_control GL\_EXT\_texture\_norm16, GL\_EXT\_discard\_framebuffer , GL\_OES\_surfaceless\_context, GL\_OVR\_multiview GL\_OVR\_multiview2 GL\_EXT\_texture\_sRGB\_R8, GL\_KHR\_no\_error GL\_EXT\_debug\_marker, GL\_OES\_EGL\_image\_external\_essl3, GL\_OVR\_multiview\_multisampled\_render\_to\_texture, GL\_EXT\_buffer\_storage GL\_EXT\_external\_buffer, GL\_EXT\_blit\_framebuffer\_params GL\_EXT\_clip\_cull\_distance, GL\_EXT\_shader\_non\_constant\_global\_initializers, GL\_QCOM\_texture\_foveated GL\_QCOM\_texture\_foveated2, GL\_QCOM\_texture\_foveated\_subsampled\_layout, GL\_QCOM\_shader\_framebuffer\_fetch\_noncoherent, GL\_QCOM\_shader\_framebuffer\_fetch\_rate GL\_EXT\_memory\_object, GL\_EXT\_memory\_object\_fd GL\_EXT\_EGL\_image\_array, GL\_NV\_shader\_noperspective\_interpolation, GL\_KHR\_robust\_buffer\_access\_behavior GL\_EXT\_EGL\_image\_storage, GL\_EXT\_blend\_func\_extended GL\_EXT\_clip\_control, GL\_OES\_texture\_view GL\_EXT\_fragment\_invocation\_density, GL\_QCOM\_motion\_estimation , GL\_QCOM\_YUV\_texture\_gather, GL\_QCOM\_shading\_rate GL\_IMG\_texture\_filter\_cubic, GL\_EXT\_polygon\_offset\_clamp GL\_EXT\_texture\_sRGB\_RG8, GL\_EXT\_shader\_implicit\_conversions GL\_EXT\_render\_snorm, GL\_QCOM\_render\_sRGB\_R8\_RG8 |
| --- |
**Prerequisites:**
- Generate the Platform eSDK. For instructions, see [Getting started](https://docs.qualcomm.com/doc/80-70014-19/topic/graphics-getting-started.html).
- Enable SSH in Permissive mode to securely access your host device. For
instructions, see [How to SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/how_to.html#how-to-ssh-).
glmark2 is an OpenGL ES based sample application provided in the Platform eSDK.
Following are the steps to compile and run the glmark2 application:
### Procedure
1. Compile glmark2 application:
1. Set the SDK environment in the Linux terminal.
source environment-setup-armv8-2a-qcom-linuxCopy to clipboard
2. Compile and generate a binary.
devtool modify glmark2Copy to clipboard
devtool build glmark2Copy to clipboard
If
there is any umask error, set umask 022.
Upon successful compilation, the output files are generated at
<path-to-installed-eSDK>/workspace/sources/glmark2/oe-workdir/image/usr/bin.
2. Push the glmark2 binary to the device.
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
3. Run the glmark2 application on the device using SSH.
1. Open the SSH terminal using the device IP address.
2. Run the following commands:
setenforce 0Copy to clipboard
mount -o remount,rw /Copy to clipboard
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: Before executing the glmark2 application, ensure
that the Weston application is running. To launch Weston, run the following
commands:
setenforce 0Copy 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
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-70014-18).
## OpenCL sample application
Source: [https://docs.qualcomm.com/doc/80-70014-19/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70014-19/topic/graphics-getting-started.html)
### About this task
**Supported OpenCL extensions**
| cl\_khr\_icd, cl\_img\_egl\_image, cl\_khr\_3d\_image\_writes, cl\_khr\_byte\_addressable\_store, cl\_khr\_depth\_images, cl\_khr\_egl\_event, cl\_khr\_egl\_image, cl\_khr\_fp16, cl\_khr\_gl\_sharing, cl\_khr\_global\_int32\_base\_atomics, cl\_khr\_global\_int32\_extended\_atomics, cl\_khr\_image2d\_from\_buffer, cl\_khr\_local\_int32\_base\_atomics, cl\_khr\_local\_int32\_extended\_atomics, cl\_khr\_mipmap\_image, cl\_khr\_srgb\_image\_writes, cl\_khr\_subgroups, cl\_qcom\_accelerated\_image\_ops, cl\_qcom\_compressed\_image, cl\_qcom\_compressed\_yuv\_image\_read, cl\_qcom\_create\_buffer\_from\_image, cl\_qcom\_dot\_product8, cl\_qcom\_ext\_host\_ptr, cl\_qcom\_ext\_host\_ptr\_iocoherent,cl\_qcom\_extended\_query\_image\_info, cl\_qcom\_extract\_image\_plane, cl\_qcom\_dmabuf\_host\_ptr, cl\_qcom\_other\_image, cl\_qcom\_perf\_hint, cl\_qcom\_priority\_hint, cl\_qcom\_protected\_context, cl\_qcom\_recordable\_queues, cl\_qcom\_reqd\_sub\_group\_size, cl\_qcom\_subgroup\_shuffle, cl\_qcom\_vector\_image\_op |
| --- |
**Prerequisites:**
- Generate the Platform eSDK. For instructions, see [Getting started](https://docs.qualcomm.com/doc/80-70014-19/topic/graphics-getting-started.html).
- Enable SSH in Permissive mode to securely access your host device. For
instructions, see [How to SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/how_to.html#how-to-ssh-).
- Download the Adreno OpenCL [SDK 2.0](https://developer.qualcomm.com/software/adreno-gpu-sdk/tools).
Note: You must be a registered user to download the
Adreno OpenCL SDK.
Multiple sample applications are provided in the Adreno OpenCL SDK. The
steps to compile and run any application remain the same. Following are the steps to
compile and run the hello world sample application:
### Procedure
1. Compile the application on the host machine.
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 in the
build directory.
2. Run the application:
1. Open the SSH terminal using the device IP address.
2. Run the following commands on the device using the SSH terminal:
setenforce 0Copy to clipboard
mount -o remount,rw /Copy to clipboard
mkdir -p /opt/dataCopy to clipboard
mkdir -p /opt/data/openclCopy 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
## Vulkan sample applications
Source: [https://docs.qualcomm.com/doc/80-70014-19/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70014-19/topic/graphics-getting-started.html)
### About this task
**Supported Vulkan extensions**
| VK\_KHR\_get\_physical\_device\_properties2, VK\_KHR\_surface, VK\_KHR\_external\_semaphore\_capabilities, VK\_KHR\_external\_memory\_capabilities, VK\_KHR\_device\_group\_creation, VK\_EXT\_debug\_utils, VK\_KHR\_wayland\_surface, VK\_KHR\_external\_fence\_capabilities, VK\_KHR\_get\_surface\_capabilities2, VK\_EXT\_debug\_report, VK\_EXT\_subgroup\_size\_control, VK\_KHR\_external\_memory, VK\_EXT\_pipeline\_creation\_feedback, VK\_KHR\_shader\_float16\_int8, VK\_KHR\_get\_memory\_requirements2, VK\_KHR\_copy\_commands2, VK\_KHR\_spirv\_1\_4, VK\_EXT\_fragment\_density\_map, VK\_KHR\_external\_semaphore\_fd, VK\_KHR\_swapchain, VK\_QCOM\_render\_pass\_store\_ops, VK\_EXT\_astc\_decode\_mode, VK\_KHR\_shared\_presentable\_image, VK\_KHR\_external\_memory\_fd, VK\_QCOM\_render\_pass\_shader\_resolve, VK\_KHR\_maintenance1, VK\_KHR\_maintenance2, VK\_KHR\_maintenance3, VK\_KHR\_separate\_depth\_stencil\_layouts VK\_EXT\_image\_robustness, VK\_KHR\_buffer\_device\_address, VK\_EXT\_extended\_dynamic\_state, VK\_EXT\_queue\_family\_foreign, VK\_KHR\_bind\_memory2, VK\_KHR\_external\_semaphore, VK\_KHR\_shader\_terminate\_invocation, VK\_QCOM\_fragment\_density\_map\_offset, VK\_EXT\_scalar\_block\_layout, VK\_KHR\_sampler\_ycbcr\_conversion, VK\_EXT\_vertex\_attribute\_divisor, VK\_KHR\_variable\_pointers, VK\_QCOM\_multiview\_per\_view\_viewports, VK\_KHR\_push\_descriptor, VK\_KHR\_timeline\_semaphore, VK\_EXT\_device\_memory\_report, VK\_KHR\_imageless\_framebuffer, VK\_KHR\_device\_group, VK\_EXT\_device\_fault, VK\_KHR\_relaxed\_block\_layout, VK\_KHR\_external\_fence, VK\_KHR\_shader\_non\_semantic\_info, VK\_EXT\_shader\_atomic\_float, VK\_EXT\_custom\_border\_color, VK\_EXT\_host\_query\_reset, VK\_EXT\_index\_type\_uint8, VK\_KHR\_multiview, VK\_KHR\_storage\_buffer\_storage\_class, VK\_EXT\_image\_drm\_format\_modifier, VK\_EXT\_fragment\_density\_map2, VK\_QCOM\_rotated\_copy\_commands, VK\_KHR\_shader\_subgroup\_extended\_types, VK\_EXT\_private\_data, VK\_EXT\_pipeline\_creation\_cache\_control, VK\_EXT\_robustness2, VK\_EXT\_shader\_module\_identifier, VK\_EXT\_global\_priority\_query, VK\_EXT\_separate\_stencil\_usage, VK\_EXT\_vertex\_input\_dynamic\_state, VK\_IMG\_filter\_cubic, VK\_EXT\_filter\_cubic. VK\_QCOM\_tile\_properties, VK\_KHR\_image\_format\_list, VK\_EXT\_external\_memory\_dma\_buf, VK\_EXT\_sampler\_filter\_minmax, VK\_KHR\_16bit\_storage, VK\_KHR\_pipeline\_executable\_properties, VK\_EXT\_shader\_demote\_to\_helper\_invocation, VK\_QCOM\_render\_pass\_transform, VK\_KHR\_create\_renderpass2, VK\_EXT\_transform\_feedback, VK\_EXT\_blend\_operation\_advanced, VK\_EXT\_provoking\_vertex, VK\_QCOM\_multiview\_per\_view\_render\_areas, VK\_KHR\_depth\_stencil\_resolve, VK\_KHR\_shader\_float\_controls, VK\_EXT\_texture\_compression\_astc\_hdr, VK\_EXT\_global\_priority, VK\_KHR\_shader\_draw\_parameters, VK\_KHR\_vulkan\_memory\_model, VK\_EXT\_descriptor\_indexing, VK\_EXT\_depth\_clip\_enable, VK\_KHR\_synchronization2, VK\_EXT\_line\_rasterization, VK\_KHR\_fragment\_shading\_rate, VK\_KHR\_descriptor\_update\_template, VK\_KHR\_draw\_indirect\_count, VK\_KHR\_driver\_properties, VK\_KHR\_uniform\_buffer\_standard\_layout, VK\_KHR\_dedicated\_allocation, VK\_EXT\_primitive\_topology\_list\_restart, VK\_KHR\_global\_priority, VK\_EXT\_sample\_locations, VK\_KHR\_sampler\_mirror\_clamp\_to\_edge, VK\_KHR\_external\_fence\_fd |
| --- |
**Prerequisites**:
- Generate the Platform eSDK. For instructions, see [Getting started](https://docs.qualcomm.com/doc/80-70014-19/topic/graphics-getting-started.html).
- Enable SSH in Permissive mode to securely access your host device. For
instructions, see [How to SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/how_to.html#how-to-ssh-).
Multiple sample applications are provided in the Adreno SDK for Vulkan. The
steps to compile and run any 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-70014-19/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70014-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.
Following are the steps to compile and run the triangle bin
application:
### Procedure
1. Compile the application.
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. Run the application:
1. 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
2. Open the SSH terminal using the device IP address 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-70014-19/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70014-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.
Following are the steps to 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 Vulkan-Samples/build/linux/CmakeCache.txt
file.
2. Change `GLFW_BUILD_X11` to OFF.
2. Generate the binary files for the target device:
cmake --build build/linux --config Release --target vulkan_samples -j$(nproc)Copy to clipboard
After
successful compilation, binary files are generated at
Vulkan-Samples/build/linux/app/bin/Release/aarch64.
3. Run the application:
1. 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
2. Open the SSH terminal using the device IP address 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` location due to space issues, try
alternative locations such as `/etc`.
Last Published: Jul 12, 2024
[Previous Topic
Overview](https://docs.qualcomm.com/bundle/publicresource/80-70014-19/topics/graphics-overview.md) [Next Topic
Features](https://docs.qualcomm.com/bundle/publicresource/80-70014-19/topics/graphics_features.md)