# 入门指南

Source: [https://docs.qualcomm.com/doc/80-70015-19SC/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70015-19SC/topic/graphics-getting-started.html)

以下工作流显示了如何在 Qualcomm 设备上开始使用图形应用程序。

Figure : 图形应用程序的工作流
                <?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">
<!-- 由 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" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="15.5833in" height="2.50694in" viewbox="0 0 1122 180.5" xml:space="preserve" color-interpolation-filters="sRGB" class="st11"><v:documentproperties v:langid="2052">	<v:userdefs>		<v:ud v:nameu="msvNoAutoConnect" v:val="VT0(1):26"></v:ud>	</v:userdefs></v:documentproperties>
<style>.svg-1 .st1 { fill: #f7f8fa; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.49999 }
.svg-1 .st2 { fill: none; stroke: #3253dc; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.49999 }
.svg-1 .st3 { fill: #000000; font-family: 黑体; font-size: 1.16666em }
.svg-1 .st4 { fill: #000000; font-family: Arial; font-size: 1.00001em }
.svg-1 .st5 { font-family: 黑体; font-size: 1em }
.svg-1 .st6 { font-family: Arial; font-size: 1em }
.svg-1 .st7 { baseline-shift: 32.4943%; font-family: Arial; font-size: 0.649886em }
.svg-1 .st8 { font-size: 1em }
.svg-1 .st9 { marker-end: url("#mrkr5-41"); stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.49999 }
.svg-1 .st10 { fill: #000000; fill-opacity: 1; stroke: #000000; stroke-opacity: 1; stroke-width: 0.49800743337605 }
.svg-1 .st11 { 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-41" class="st10" v:arrowtype="5" v:arrowsize="2" v:setback="0" refx="-0" orient="auto" markerunits="strokeWidth" overflow="visible">		<use xlink:href="#lend5" transform="scale(-2.0080021561543,-2.0080021561543) "></use>	</marker></defs><g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>Page-1</title>	<v:pageproperties v:drawingscale="0.0138889" v:pagescale="0.0138889" v:drawingunits="29" v:shadowoffsetx="8.99998" v:shadowoffsety="-8.99998"></v:pageproperties>	<v:layer v:name="Connector" v:index="0"></v:layer>	<g id="shape1-1" v:mid="1" v:groupcontext="shape" transform="translate(19.25,-19.25)">		<title>shape1009-1</title>		<rect x="0" y="38.5" width="1083.5" height="142" class="st1"></rect>	</g>	<g id="shape2-3" v:mid="2" v:groupcontext="shape" transform="translate(248.124,-40.4969)">		<title>shape3-3</title>		<desc>Run sample applications</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(3.99999,3.99999,3.99999,3.99999)" v:verticalalign="0"></v:textblock>		<v:textrect cx="195.75" cy="129.748" width="391.5" height="101.503"></v:textrect>		<path d="M0 171.5 A9.00019 9.00019 -180 0 0 9 180.5 L382.5 180.5 A9.00019 9.00019 -180 0 0 391.5 171.5 L391.5 88 A9.00019					 9.00019 -180 0 0 382.5 79 L9 79 A9.00019 9.00019 -180 0 0 -0 88 L0 171.5 Z" class="st2"></path>		<text x="153.75" y="113.45" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist><v:lf></v:lf>运行示例程序</text>		</g>	<g id="shape3-6" v:mid="3" v:groupcontext="shape" transform="translate(394.186,-47.4997)">		<title>shape7-6</title>		<desc>OpenCL sample application</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(3.99999,3.99999,3.99999,3.99999)"></v:textblock>		<v:textrect cx="55.717" cy="154.946" width="111.44" height="51.1071"></v:textrect>		<path d="M0 171.5 A9.00019 9.00019 -180 0 0 9 180.5 L102.43 180.5 A9.00019 9.00019 -180 0 0 111.43 171.5 L111.43 138.39					 A9.00019 9.00019 -180 0 0 102.43 129.39 L9 129.39 A9.00019 9.00019 -180 0 0 -0 138.39 L0 171.5 Z" class="st2"></path>		<text x="7.7" y="158.85" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>OpenCL <tspan class="st5">示例程序</tspan></text>		</g>	<g id="shape4-10" v:mid="4" v:groupcontext="shape" transform="translate(260.285,-47.4997)">		<title>shape8-10</title>		<desc>OpenGL ES sample application</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(3.99999,3.99999,3.99999,3.99999)"></v:textblock>		<v:textrect cx="62.0889" cy="154.946" width="124.18" height="51.1071"></v:textrect>		<path d="M0 171.5 A9.00019 9.00019 -180 0 0 9 180.5 L115.18 180.5 A9.00019 9.00019 -180 0 0 124.18 171.5 L124.18 138.39					 A9.00019 9.00019 -180 0 0 115.18 129.39 L9 129.39 A9.00019 9.00019 -180 0 0 0 138.39 L0 171.5 Z" class="st2"></path>		<text x="4.07" y="158.85" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>OpenGL ES <tspan class="st5">示例程序</tspan></text>		</g>	<g id="shape5-14" v:mid="5" v:groupcontext="shape" transform="translate(515.874,-47.5)">		<title>shape10-14</title>		<desc>Vulkan sample application</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(3.99999,3.99999,3.99999,3.99999)"></v:textblock>		<v:textrect cx="55.717" cy="153.38" width="111.44" height="54.2408"></v:textrect>		<path d="M0 171.5 A9.00019 9.00019 -180 0 0 9 180.5 L102.43 180.5 A9.00019 9.00019 -180 0 0 111.43 171.5 L111.43 135.26					 A9.00019 9.00019 -180 0 0 102.43 126.26 L9 126.26 A9.00019 9.00019 -180 0 0 -0 135.26 L0 171.5 Z" class="st2"></path>		<text x="11.7" y="157.28" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Vulkan <tspan class="st5">示例程序</tspan></text>		</g>	<g id="shape6-18" v:mid="6" v:groupcontext="shape" transform="translate(29.8749,-40.4969)">		<title>shape1016-18</title>		<desc>Generate Platform eSDK</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(3.99999,3.99999,3.99999,3.99999)"></v:textblock>		<v:textrect cx="80.1983" cy="129.748" width="160.4" height="101.503"></v:textrect>		<path d="M0 171.5 A9.00019 9.00019 -180 0 0 9 180.5 L151.4 180.5 A9.00019 9.00019 -180 0 0 160.4 171.5 L160.4 88 A9.00019					 9.00019 -180 0 0 151.4 79 L9 79 A9.00019 9.00019 -180 0 0 0 88 L0 171.5 Z" class="st2"></path>		<text x="31.97" y="134.3" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>生成平台<tspan class="st6"> </tspan><tspan class="st6">eSDK</tspan></text>		</g>	<g id="shape7-23" v:mid="7" v:groupcontext="shape" transform="translate(697.977,-41.7484)">		<title>shape1017-22</title>		<desc>Debug sample applications</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(3.99999,3.99999,3.99999,3.99999)"></v:textblock>		<v:textrect cx="80.1983" cy="129.748" width="160.4" height="101.503"></v:textrect>		<path d="M0 171.5 A9.00019 9.00019 -180 0 0 9 180.5 L151.4 180.5 A9.00019 9.00019 -180 0 0 160.4 171.5 L160.4 88 A9.00019					 9.00019 -180 0 0 151.4 79 L9 79 A9.00019 9.00019 -180 0 0 0 88 L0 171.5 Z" class="st2"></path>		<text x="38.2" y="134.3" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>调试示例程序</text>		</g>	<g id="shape8-26" v:mid="8" v:groupcontext="shape" transform="translate(912.373,-41.7484)">		<title>shape1018-26</title>		<desc>Run the Snapdragon Profiler tool for profiling sample applica...</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(3.99999,3.99999,3.99999,3.99999)"></v:textblock>		<v:textrect cx="89.9373" cy="129.748" width="179.88" height="101.503"></v:textrect>		<path d="M0 171.5 A9.00019 9.00019 -180 0 0 9 180.5 L170.87 180.5 A9.00019 9.00019 -180 0 0 179.87 171.5 L179.87 88 A9.00019					 9.00019 -180 0 0 170.87 79 L9 79 A9.00019 9.00019 -180 0 0 -0 88 L0 171.5 Z" class="st2"></path>		<text x="8.38" y="116.09" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>运行<tspan class="st6"> </tspan><tspan class="st6">Snapdragon</tspan><tspan dy="-0.235em" class="st7" v:basefontsize="13.9999">®</tspan><tspan dy="0.153em" class="st6"> </tspan><tspan class="st6">Profiler </tspan><tspan x="33.94" dy="1.3em" class="st8">工具以对示例程序<v:lf></v:lf></tspan><tspan x="47.94" dy="1.3em" class="st8">进行性能分析</tspan></text>		</g>	<g id="shape9-36" v:mid="9" v:groupcontext="shape" v:layermember="0" transform="translate(190.272,-91.2482)">		<title>shape1022-31</title>		<path d="M0 180.5 L49.07 180.5 L57.85 180.5" class="st9"></path>	</g>	<g id="shape10-42" v:mid="10" v:groupcontext="shape" v:layermember="0" transform="translate(639.624,-91.874)">		<title>shape1024-37</title>		<path d="M0 180.5 L49.57 180.5 L58.35 180.5" class="st9"></path>	</g>	<g id="shape11-47" v:mid="11" v:groupcontext="shape" v:layermember="0" transform="translate(858.373,-92.4998)">		<title>shape1025-42</title>		<path d="M0 180.5 L45.21 180.5 L53.99 180.5" class="st9"></path>	</g></g>
</svg>

## 运行 OpenGL ES 示例程序

Source: [https://docs.qualcomm.com/doc/80-70015-19SC/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70015-19SC/topic/graphics-getting-started.html)

### About this task

**前提条件**
- 通过以下方式之一安装平台 eSDK：
    - [使用 Qualcomm 发布存档](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-51/install-sdk.html#download-qim-platform-esdk)
    - [手动编译 Qualcomm Linux SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#generate-an-esdk)
- 启用 SSH 以安全地访问主机设备。相关说明，可参见[使用 SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#use-ssh)。

有关 Qualcomm Linux 设备上支持的 OpenGL ES 扩展的信息，参见 [EGL 扩展](https://docs.qualcomm.com/doc/80-70015-19SC/topic/supported_extensions.html#supported-egl-client-extensions)。

**编译并运行 glmark2 应用程序**

`glmark2` 是平台 eSDK 提供的基于 OpenGL ES 的示例程序。

### Procedure

1. 要设置 SDK 环境以运行 Linux 终端，可运行以下命令：
                
source environment-setup-armv8-2a-qcom-linuxCopy to clipboard
2. 要编译和生成二进制文件，可运行以下命令：
                
devtool modify glmark2Copy to clipboard

        devtool build glmark2Copy to clipboard

如有任何 umask 错误，将 umask 设置为 022。

编译成功后，将在 &lt;path-to-installed-eSDK&gt;/workspace/sources/glmark2/oe-workdir/image/usr/bin 中生成输出文件。
3. 要将该二进制文件推送到设备，可运行以下命令：
                
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
4. 要使用 SSH 在设备上运行该应用程序，可使用设备的 IP 地址打开 SSH 终端，并运行以下命令：
                
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:
    - 要从 UART shell 运行示例程序，可使用以下命令重新挂载文件系统：

            mount -o remount,rw /Copy to clipboard
    - 在运行该应用程序之前，确保 Weston 应用程序正在运行。如果 Weston 应用程序未运行，可通过运行以下命令启动 Weston 应用程序：

            . /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

        有关 Weston 应用程序的更多信息，参见 [Qualcomm Linux 显示指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-18)。

## 运行 OpenCL 示例程序

Source: [https://docs.qualcomm.com/doc/80-70015-19SC/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70015-19SC/topic/graphics-getting-started.html)

### About this task

**前提条件**
- 通过以下方式之一安装平台 eSDK：
    - [使用 Qualcomm 发布存档](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-51/install-sdk.html#download-qim-platform-esdk)
    - [手动编译 Qualcomm Linux SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#generate-an-esdk)
- 启用 SSH 以安全地访问主机设备。相关说明，可参见[使用 SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#use-ssh)。
- 下载 Adreno OpenCL [SDK 2.0](https://qpm.qualcomm.com/#/main/tools/details/Adreno_OpenCL_SDK)。
Note: 只允许注册用户下载 Adreno OpenCL SDK。

有关 Qualcomm Linux 设备上支持的 OpenCL 扩展的信息，参见 [OpenCL 扩展](https://docs.qualcomm.com/doc/80-70015-19SC/topic/supported_extensions.html#supported-opencl-extensions)。

**编译并运行 hello world 示例程序**

Adreno OpenCL SDK 提供多个示例程序。任一示例程序的编译和运行步骤都相同。

### Procedure

1. 要在主机上编译应用程序，可运行以下命令：
                
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

编译成功后，将在 /build 下生成二进制文件。
2. 要运行该应用程序，可使用设备的 IP 地址打开 SSH 终端，然后使用 SSH 终端在设备上运行以下命令：
                
mkdir -p /opt/dataCopy to clipboard

        mkdir -p /opt/data/openclCopy to clipboard

Note: 如果要从 UART shell 运行示例程序，可使用以下命令重新挂载文件系统：

        mount -o remount,rw /Copy to clipboard
3. 在主机上运行以下命令：
                
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. 使用 SSH 终端在设备上运行如下命令：
                
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 示例程序

Source: [https://docs.qualcomm.com/doc/80-70015-19SC/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70015-19SC/topic/graphics-getting-started.html)

### About this task

**前提条件**
- 通过以下方式之一生成平台 eSDK：
    - [使用 Qualcomm 发布存档](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-51/install-sdk.html#download-qim-platform-esdk)
    - [手动编译 Qualcomm Linux SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#generate-an-esdk)
- 启用 SSH 以安全地访问主机设备。相关说明，可参见[使用 SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#use-ssh)。

有关 Qualcomm Linux 设备上支持的 Vulkan 扩展的信息，参见 [Vulkan 扩展](https://docs.qualcomm.com/doc/80-70015-19SC/topic/supported_extensions.html#supported-vulkan-extensions)。

Adreno SDK 中提供了多个 Vulkan 示例程序。任一示例程序的编译和运行步骤都相同。本指南以运行 Sascha Willems 和 Khronos Vulkan 示例程序的步骤为例进行了说明。

### Sascha Willems Vulkan 示例程序

Source: [https://docs.qualcomm.com/doc/80-70015-19SC/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70015-19SC/topic/graphics-getting-started.html)

### About this task

Sascha Willems Vulkan 示例程序位于 [https://github.com/SaschaWillems/Vulkan.git](https://github.com/SaschaWillems/Vulkan.git)。编译和运行任何 Sascha Willems Vulkan 应用程序的步骤均相同。

**编译并运行 triangle bin 应用程序**

### Procedure

1. 要编译应用程序，可在主机上运行以下命令：
                
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

编译成功后，将在 build/linux/bin 下生成二进制文件。
2. 要将该二进制文件推送到设备，可在主机上运行以下命令：
                
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. 要运行该应用程序，可使用设备的 IP 地址打开 SSH 终端，并运行以下命令：
                
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 示例程序

Source: [https://docs.qualcomm.com/doc/80-70015-19SC/topic/graphics-getting-started.html](https://docs.qualcomm.com/doc/80-70015-19SC/topic/graphics-getting-started.html)

### About this task
Khronos Vulkan 示例程序位于 [https://github.com/KhronosGroup/Vulkan-Samples.git](https://github.com/KhronosGroup/Vulkan-Samples.git)。编译和运行任何 Khronos Vulkan 应用程序的步骤均相同。 
**编译并运行 vulkan\_samples 应用程序**

### Procedure

1. 要编译应用程序，可在主机上运行以下命令：
                
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

如果编译失败，则执行以下操作：
    1. 打开 Vulkan-Samples/build/linux/CmakeCache.txt 文件。
    2. 将 `GLFW_BUILD_X11` 改为 `OFF`。
2. 要生成二进制文件，可在主机上运行以下命令：
                
cmake --build build/linux --config Release --target vulkan_samples -j$(nproc)Copy to clipboard

编译成功后，将在 Vulkan-Samples/build/linux/app/bin/Release/aarch64 下生成二进制文件。
3. 在主机上运行以下命令：
                
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. 使用设备的 IP 地址打开 SSH 终端，并运行以下命令：
                
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: 如因存储问题无法从 `/tmp` 目录运行这些示例程序，可尝试从 `/etc` 等目录运行。

Last Published: Dec 02, 2024

[Previous Topic
概述](https://docs.qualcomm.com/bundle/publicresource/80-70015-19SC/topics/graphics-overview.md) [Next Topic
功能](https://docs.qualcomm.com/bundle/publicresource/80-70015-19SC/topics/graphics_features.md)