# 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)

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export getting-started-graphics.svg Page-1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" width="15.5833in" height="2.50694in" viewbox="0 0 1122 180.5" xml:space="preserve" color-interpolation-filters="sRGB" class="st9"><style>.svg-1 .st1 { fill: #f7f8fa; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5 }
.svg-1 .st2 { fill: none; stroke: #3253dc; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5 }
.svg-1 .st3 { fill: #000000; font-family: Arial; font-size: 1.16666em }
.svg-1 .st4 { fill: #000000; font-family: Arial; font-size: 1.00001em }
.svg-1 .st5 { font-size: 1em }
.svg-1 .st6 { baseline-shift: 32.4943%; font-size: 0.649886em }
.svg-1 .st7 { marker-end: url("#mrkr5-38"); stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5 }
.svg-1 .st8 { fill: #000000; fill-opacity: 1; stroke: #000000; stroke-opacity: 1; stroke-width: 0.49800796812749 }
.svg-1 .st9 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<defs id="Markers">	<g id="lend5">		<path d="M 2 1 L 0 0 L 1.98117 -0.993387 C 1.67173 -0.364515 1.67301 0.372641 1.98465 1.00043 " style="stroke:none"></path>	</g>	<marker id="mrkr5-38" class="st8" refx="-3.514" orient="auto" markerunits="strokeWidth" overflow="visible">		<use xlink:href="#lend5" transform="scale(-2.008,-2.008) "></use>	</marker></defs><g>	<title>Page-1</title>	<g id="shape1009-1" transform="translate(19.25,-19.25)">		<title></title>		<rect x="0" y="38.5" width="1083.5" height="142" class="st1"></rect>	</g>	<g id="shape3-3" transform="translate(258.625,-40.4969)">		<title></title>		<desc>Run sample application</desc>		<rect x="0" y="78.9969" width="391.5" height="101.503" rx="9" ry="9" class="st2"></rect>		<text x="122.99" y="112.4" class="st3">Run sample application</text>		</g>	<g id="shape7-6" transform="translate(404.688,-47.5)">		<title></title>		<desc>OpenCL sample application</desc>		<rect x="0" y="129.393" width="111.434" height="51.1072" rx="9" ry="9" class="st2"></rect>		<text x="12.36" y="151.35" class="st4">OpenCL sample <tspan x="27.03" dy="1.2em" class="st5">application</tspan></text>		</g>	<g id="shape8-10" transform="translate(270.786,-47.5)">		<title></title>		<desc>OpenGL ES sample application</desc>		<rect x="0" y="129.393" width="124.178" height="51.1072" rx="9" ry="9" class="st2"></rect>		<text x="8.73" y="151.35" class="st4">OpenGL ES sample <tspan x="33.4" dy="1.2em" class="st5">application</tspan></text>		</g>	<g id="shape10-14" transform="translate(526.375,-47.5)">		<title></title>		<desc>Vulkan sample application</desc>		<rect x="0" y="126.259" width="111.434" height="54.2409" rx="9" ry="9" class="st2"></rect>		<text x="16.36" y="149.78" class="st4">Vulkan sample <tspan x="27.03" dy="1.2em" class="st5">application</tspan></text>		</g>	<g id="shape1016-18" transform="translate(40.375,-40.4969)">		<title></title>		<desc>Generate Platform eSDK</desc>		<rect x="0" y="78.9969" width="160.397" height="101.503" rx="9" ry="9" class="st2"></rect>		<text x="23.01" y="123.15" class="st3">Generate Platform <tspan x="61.91" dy="1.457em" class="st5">eSDK</tspan></text>		</g>	<g id="shape1017-22" transform="translate(708.478,-41.7484)">		<title></title>		<desc>Debug sample application</desc>		<rect x="0" y="78.9969" width="160.397" height="101.503" rx="9" ry="9" class="st2"></rect>		<text x="35.06" y="123.15" class="st3">Debug sample <tspan x="46.73" dy="1.457em" class="st5">application</tspan></text>		</g>	<g id="shape1018-26" transform="translate(922.875,-41.7484)">		<title></title>		<desc>Run the Snapdragon® Profiler tool for profiling sample applic...</desc>		<rect x="0" y="78.9969" width="179.875" height="101.503" rx="9" ry="9" class="st2"></rect>		<text x="21.98" y="114.75" class="st3">Run the Snapdragon<tspan dy="-0.235em" class="st6">®</tspan><tspan dy="0.153em" class="st5">  </tspan><tspan x="17.96" dy="1.2em" class="st5">Profiler tool for profiling </tspan><tspan x="28.46" dy="1.457em" class="st5">sample applications</tspan></text>		</g>	<g id="shape1022-33" transform="translate(200.772,-82.2484)">		<title></title>		<path d="M0 171.5 L49.07 171.5" class="st7"></path>	</g>	<g id="shape1024-39" transform="translate(650.125,-82.8742)">		<title></title>		<path d="M0 171.5 L49.57 171.5" class="st7"></path>	</g>	<g id="shape1025-44" transform="translate(868.875,-83.5)">		<title></title>		<path d="M0 171.5 L45.21 171.5" class="st7"></path>	</g></g>
</svg>

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:
                                &lt;unzip\_location&gt;/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 &lt;root
                            directory&gt;/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,<br>                                    EGL\_KHR\_client\_get\_all\_proc\_addresses EGL\_EXT\_platform\_base,<br>                                    EGL\_KHR\_platform\_android EGL\_KHR\_platform\_wayland,<br>                                    EGL\_KHR\_platform\_gbm EGL\_KHR\_platform\_x11, OpenGL\_ES,<br>                                    EGL\_KHR\_image EGL\_KHR\_image\_base, EGL\_QCOM\_create\_image<br>                                    EGL\_KHR\_lock\_surface, EGL\_KHR\_lock\_surface2<br>                                    EGL\_KHR\_lock\_surface3, EGL\_KHR\_gl\_texture\_2D\_image,<br>                                    EGL\_KHR\_gl\_texture\_cubemap\_image, EGL\_KHR\_gl\_texture\_3D\_image<br>                                    EGL\_KHR\_gl\_renderbuffer\_image, EGL\_ANDROID\_blob\_cache<br>                                    EGL\_KHR\_create\_context, EGL\_KHR\_surfaceless\_context ,<br>                                    EGL\_KHR\_create\_context\_no\_error, EGL\_KHR\_get\_all\_proc\_addresses<br>                                    EGL\_QCOM\_lock\_image2, EGL\_KHR\_no\_config\_context<br>                                    EGL\_EXT\_surface\_SMPTE2086\_metadata,<br>                                    EGL\_EXT\_image\_dma\_buf\_import,<br>                                    EGL\_EXT\_image\_dma\_buf\_import\_modifiers EGL\_EXT\_yuv\_surface,<br>                                    EGL\_IMG\_context\_priority , EGL\_WL\_bind\_wayland\_display,<br>                                    EGL\_WL\_create\_wayland\_buffer\_from\_image,<br>                                    EGL\_ANDROID\_native\_fence\_sync ,<br>                                    EGL\_EXT\_create\_context\_robustness, EGL\_KHR\_fence\_sync<br>                                    EGL\_KHR\_wait\_sync, EGL\_KHR\_mutable\_render\_buffer<br>                                    EGL\_KHR\_partial\_update, EGL\_KHR\_surfaceless\_context |
| --- |

**Supported GL extensions**

| GL\_OES\_EGL\_image GL\_OES\_EGL\_image\_external, GL\_OES\_EGL\_sync<br>                                        GL\_OES\_vertex\_half\_float, GL\_OES\_framebuffer\_object<br>                                        GL\_OES\_rgb8\_rgba8, GL\_OES\_compressed\_ETC1\_RGB8\_texture,<br>                                        GL\_AMD\_compressed\_ATC\_texture,<br>                                        GL\_KHR\_texture\_compression\_astc\_ldr,<br>                                        GL\_KHR\_texture\_compression\_astc\_hdr,<br>                                        GL\_OES\_texture\_compression\_astc<br>                                        GL\_EXT\_texture\_compression\_s3tc,<br>                                        GL\_EXT\_texture\_compression\_s3tc\_srgb,<br>                                        GL\_EXT\_texture\_compression\_rgtc<br>                                        GL\_EXT\_texture\_compression\_bptc, GL\_OES\_texture\_npot ,<br>                                        GL\_EXT\_texture\_filter\_anisotropic,<br>                                        GL\_EXT\_texture\_format\_BGRA8888 GL\_EXT\_read\_format\_bgra,<br>                                        GL\_OES\_texture\_3D GL\_EXT\_color\_buffer\_float,<br>                                        GL\_EXT\_color\_buffer\_half\_float GL\_EXT\_float\_blend,<br>                                        GL\_QCOM\_alpha\_test , GL\_OES\_depth24<br>                                        GL\_OES\_packed\_depth\_stencil, GL\_OES\_depth\_texture<br>                                        GL\_OES\_depth\_texture\_cube\_map GL\_EXT\_sRGB,<br>                                        GL\_OES\_texture\_float GL\_OES\_texture\_float\_linear,<br>                                        GL\_OES\_texture\_half\_float ,<br>                                        GL\_OES\_texture\_half\_float\_linear,<br>                                        GL\_EXT\_texture\_type\_2\_10\_10\_10\_REV<br>                                        GL\_EXT\_texture\_sRGB\_decode,<br>                                        GL\_EXT\_texture\_compression\_astc\_decode\_mode,<br>                                        GL\_EXT\_texture\_mirror\_clamp\_to\_edge,<br>                                        GL\_EXT\_texture\_format\_sRGB\_override<br>                                        GL\_OES\_element\_index\_uint GL\_EXT\_copy\_image<br>                                        GL\_EXT\_geometry\_shader, GL\_EXT\_tessellation\_shader<br>                                        GL\_OES\_texture\_stencil8, GL\_EXT\_shader\_io\_blocks<br>                                        GL\_OES\_shader\_image\_atomic, GL\_OES\_sample\_variables<br>                                        GL\_EXT\_texture\_border\_clamp,<br>                                        GL\_EXT\_EGL\_image\_external\_wrap\_modes,<br>                                        GL\_EXT\_multisampled\_render\_to\_texture,<br>                                        GL\_EXT\_multisampled\_render\_to\_texture2,<br>                                        GL\_OES\_shader\_multisample\_interpolation,<br>                                        GL\_EXT\_texture\_cube\_map\_array GL\_EXT\_draw\_buffers\_indexed,<br>                                        GL\_EXT\_gpu\_shader5 GL\_EXT\_robustness ,<br>                                        GL\_EXT\_texture\_buffer, GL\_EXT\_shader\_framebuffer\_fetch,<br>                                        GL\_ARM\_shader\_framebuffer\_fetch\_depth\_stencil,<br>                                        GL\_OES\_texture\_storage\_multisample\_2d\_array,<br>                                        GL\_OES\_sample\_shading GL\_OES\_get\_program\_binary,<br>                                        GL\_EXT\_debug\_label GL\_KHR\_blend\_equation\_advanced,<br>                                        GL\_KHR\_blend\_equation\_advanced\_coherent<br>                                        GL\_QCOM\_tiled\_rendering, GL\_ANDROID\_extension\_pack\_es31a<br>                                        GL\_EXT\_primitive\_bounding\_box, GL\_OES\_standard\_derivatives<br>                                        GL\_OES\_vertex\_array\_object, GL\_EXT\_disjoint\_timer\_query<br>                                        GL\_KHR\_debug, GL\_EXT\_YUV\_target, GL\_EXT\_sRGB\_write\_control<br>                                        GL\_EXT\_texture\_norm16, GL\_EXT\_discard\_framebuffer ,<br>                                        GL\_OES\_surfaceless\_context, GL\_OVR\_multiview<br>                                        GL\_OVR\_multiview2 GL\_EXT\_texture\_sRGB\_R8, GL\_KHR\_no\_error<br>                                        GL\_EXT\_debug\_marker, GL\_OES\_EGL\_image\_external\_essl3,<br>                                        GL\_OVR\_multiview\_multisampled\_render\_to\_texture,<br>                                        GL\_EXT\_buffer\_storage GL\_EXT\_external\_buffer,<br>                                        GL\_EXT\_blit\_framebuffer\_params GL\_EXT\_clip\_cull\_distance,<br>                                        GL\_EXT\_shader\_non\_constant\_global\_initializers,<br>                                        GL\_QCOM\_texture\_foveated GL\_QCOM\_texture\_foveated2,<br>                                        GL\_QCOM\_texture\_foveated\_subsampled\_layout,<br>                                        GL\_QCOM\_shader\_framebuffer\_fetch\_noncoherent,<br>                                        GL\_QCOM\_shader\_framebuffer\_fetch\_rate GL\_EXT\_memory\_object,<br>                                        GL\_EXT\_memory\_object\_fd GL\_EXT\_EGL\_image\_array,<br>                                        GL\_NV\_shader\_noperspective\_interpolation,<br>                                        GL\_KHR\_robust\_buffer\_access\_behavior<br>                                        GL\_EXT\_EGL\_image\_storage, GL\_EXT\_blend\_func\_extended<br>                                        GL\_EXT\_clip\_control, GL\_OES\_texture\_view<br>                                        GL\_EXT\_fragment\_invocation\_density,<br>                                        GL\_QCOM\_motion\_estimation , GL\_QCOM\_YUV\_texture\_gather,<br>                                        GL\_QCOM\_shading\_rate GL\_IMG\_texture\_filter\_cubic,<br>                                        GL\_EXT\_polygon\_offset\_clamp GL\_EXT\_texture\_sRGB\_RG8,<br>                                        GL\_EXT\_shader\_implicit\_conversions GL\_EXT\_render\_snorm,<br>                                        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
                        &lt;path-to-installed-eSDK&gt;/workspace/sources/glmark2/oe-workdir/image/usr/bin.
2. Push the glmark2 binary to the device.
                
scp -r <path-to-installed-Platform-eSDK>/workspace/sources/glmark2/oe-workdir/image/usr/bin/glmark2-es2-wayland root@[IP-address-of-device]:/tmpCopy to clipboard

        scp -r <path-to-installed-Platform-eSDK>/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,<br>                                    cl\_khr\_byte\_addressable\_store, cl\_khr\_depth\_images,<br>                                    cl\_khr\_egl\_event, cl\_khr\_egl\_image, cl\_khr\_fp16,<br>                                    cl\_khr\_gl\_sharing, cl\_khr\_global\_int32\_base\_atomics,<br>                                    cl\_khr\_global\_int32\_extended\_atomics,<br>                                    cl\_khr\_image2d\_from\_buffer, cl\_khr\_local\_int32\_base\_atomics,<br>                                    cl\_khr\_local\_int32\_extended\_atomics, cl\_khr\_mipmap\_image,<br>                                    cl\_khr\_srgb\_image\_writes, cl\_khr\_subgroups,<br>                                    cl\_qcom\_accelerated\_image\_ops, cl\_qcom\_compressed\_image,<br>                                    cl\_qcom\_compressed\_yuv\_image\_read,<br>                                    cl\_qcom\_create\_buffer\_from\_image, cl\_qcom\_dot\_product8,<br>                                    cl\_qcom\_ext\_host\_ptr,<br>                                    cl\_qcom\_ext\_host\_ptr\_iocoherent,cl\_qcom\_extended\_query\_image\_info,<br>                                    cl\_qcom\_extract\_image\_plane, cl\_qcom\_dmabuf\_host\_ptr,<br>                                    cl\_qcom\_other\_image, cl\_qcom\_perf\_hint, cl\_qcom\_priority\_hint,<br>                                    cl\_qcom\_protected\_context, cl\_qcom\_recordable\_queues,<br>                                    cl\_qcom\_reqd\_sub\_group\_size, cl\_qcom\_subgroup\_shuffle,<br>                                    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 <path-to-installed-Platform-eSDK>/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 <opencl-sdk>/build/* root@[IP-address-of-the device]:/opt/data/opencl/Copy to clipboard

            scp -r <opencl-sdk>/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,<br>                                        VK\_KHR\_external\_semaphore\_capabilities,<br>                                        VK\_KHR\_external\_memory\_capabilities,<br>                                        VK\_KHR\_device\_group\_creation, VK\_EXT\_debug\_utils,<br>                                        VK\_KHR\_wayland\_surface, VK\_KHR\_external\_fence\_capabilities,<br>                                        VK\_KHR\_get\_surface\_capabilities2, VK\_EXT\_debug\_report,<br>                                        VK\_EXT\_subgroup\_size\_control, VK\_KHR\_external\_memory,<br>                                        VK\_EXT\_pipeline\_creation\_feedback,<br>                                        VK\_KHR\_shader\_float16\_int8, VK\_KHR\_get\_memory\_requirements2,<br>                                        VK\_KHR\_copy\_commands2, VK\_KHR\_spirv\_1\_4,<br>                                        VK\_EXT\_fragment\_density\_map, VK\_KHR\_external\_semaphore\_fd,<br>                                        VK\_KHR\_swapchain, VK\_QCOM\_render\_pass\_store\_ops,<br>                                        VK\_EXT\_astc\_decode\_mode, VK\_KHR\_shared\_presentable\_image,<br>                                        VK\_KHR\_external\_memory\_fd,<br>                                        VK\_QCOM\_render\_pass\_shader\_resolve, VK\_KHR\_maintenance1,<br>                                        VK\_KHR\_maintenance2, VK\_KHR\_maintenance3,<br>                                        VK\_KHR\_separate\_depth\_stencil\_layouts<br>                                        VK\_EXT\_image\_robustness, VK\_KHR\_buffer\_device\_address,<br>                                        VK\_EXT\_extended\_dynamic\_state, VK\_EXT\_queue\_family\_foreign,<br>                                        VK\_KHR\_bind\_memory2, VK\_KHR\_external\_semaphore,<br>                                        VK\_KHR\_shader\_terminate\_invocation,<br>                                        VK\_QCOM\_fragment\_density\_map\_offset,<br>                                        VK\_EXT\_scalar\_block\_layout, VK\_KHR\_sampler\_ycbcr\_conversion,<br>                                        VK\_EXT\_vertex\_attribute\_divisor, VK\_KHR\_variable\_pointers,<br>                                        VK\_QCOM\_multiview\_per\_view\_viewports,<br>                                        VK\_KHR\_push\_descriptor, VK\_KHR\_timeline\_semaphore,<br>                                        VK\_EXT\_device\_memory\_report, VK\_KHR\_imageless\_framebuffer,<br>                                        VK\_KHR\_device\_group, VK\_EXT\_device\_fault,<br>                                        VK\_KHR\_relaxed\_block\_layout, VK\_KHR\_external\_fence,<br>                                        VK\_KHR\_shader\_non\_semantic\_info, VK\_EXT\_shader\_atomic\_float,<br>                                        VK\_EXT\_custom\_border\_color, VK\_EXT\_host\_query\_reset,<br>                                        VK\_EXT\_index\_type\_uint8, VK\_KHR\_multiview,<br>                                        VK\_KHR\_storage\_buffer\_storage\_class,<br>                                        VK\_EXT\_image\_drm\_format\_modifier,<br>                                        VK\_EXT\_fragment\_density\_map2, VK\_QCOM\_rotated\_copy\_commands,<br>                                        VK\_KHR\_shader\_subgroup\_extended\_types, VK\_EXT\_private\_data,<br>                                        VK\_EXT\_pipeline\_creation\_cache\_control, VK\_EXT\_robustness2,<br>                                        VK\_EXT\_shader\_module\_identifier,<br>                                        VK\_EXT\_global\_priority\_query, VK\_EXT\_separate\_stencil\_usage,<br>                                        VK\_EXT\_vertex\_input\_dynamic\_state, VK\_IMG\_filter\_cubic,<br>                                        VK\_EXT\_filter\_cubic. VK\_QCOM\_tile\_properties,<br>                                        VK\_KHR\_image\_format\_list, VK\_EXT\_external\_memory\_dma\_buf,<br>                                        VK\_EXT\_sampler\_filter\_minmax, VK\_KHR\_16bit\_storage,<br>                                        VK\_KHR\_pipeline\_executable\_properties,<br>                                        VK\_EXT\_shader\_demote\_to\_helper\_invocation,<br>                                        VK\_QCOM\_render\_pass\_transform, VK\_KHR\_create\_renderpass2,<br>                                        VK\_EXT\_transform\_feedback, VK\_EXT\_blend\_operation\_advanced,<br>                                        VK\_EXT\_provoking\_vertex,<br>                                        VK\_QCOM\_multiview\_per\_view\_render\_areas,<br>                                        VK\_KHR\_depth\_stencil\_resolve, VK\_KHR\_shader\_float\_controls,<br>                                        VK\_EXT\_texture\_compression\_astc\_hdr, VK\_EXT\_global\_priority,<br>                                        VK\_KHR\_shader\_draw\_parameters, VK\_KHR\_vulkan\_memory\_model,<br>                                        VK\_EXT\_descriptor\_indexing, VK\_EXT\_depth\_clip\_enable,<br>                                        VK\_KHR\_synchronization2, VK\_EXT\_line\_rasterization,<br>                                        VK\_KHR\_fragment\_shading\_rate,<br>                                        VK\_KHR\_descriptor\_update\_template,<br>                                        VK\_KHR\_draw\_indirect\_count, VK\_KHR\_driver\_properties,<br>                                        VK\_KHR\_uniform\_buffer\_standard\_layout,<br>                                        VK\_KHR\_dedicated\_allocation,<br>                                        VK\_EXT\_primitive\_topology\_list\_restart,<br>                                        VK\_KHR\_global\_priority, VK\_EXT\_sample\_locations,<br>                                        VK\_KHR\_sampler\_mirror\_clamp\_to\_edge,<br>                                        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 <path-to-installed-Platform-eSDK>/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 <path-to-installed-Platform-eSDK>/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)