# 运行示例应用程序

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

<?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" aria-label="../../_images/getting-started-graphics.svg"><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: sans-serif; font-size: 1.16666em }
.svg-1 .st4 { fill: #000000; font-family: Arial; font-size: 1.00001em }
.svg-1 .st5 { font-family: sans-serif; 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 的应用程序

平台 eSDK 提供了一个名为 glmark2 的基于 OpenGL ES 的示例应用程序。此应用程序使用 OpenGL ES API 渲染各种场景。

要编译和运行基于 OpenGL ES 的应用程序，您必须了解 [OpenGL ES API](https://registry.khronos.org/OpenGL/specs/es/3.0/es_spec_3.0.pdf)。

**前提条件**

- 使用以下任一方法安装 Platform eSDK：

    - [使用 Qualcomm 发布存档](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-51/install-sdk.html#download-qim-platform-esdk)
    - [手动编译 Qualcomm Linux SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/how_to.html#generate-an-esdk)
- 从 Linux 主机到设备建立 SSH 连接。有关说明，请参阅[使用 SSH 登录](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/how_to.html#use-ssh)。
- 确保 Weston 应用程序正在运行。否则，请通过运行以下命令启动 Weston 应用程序：

> 
> 
> mount -o remount,rw /
>         export XDG_RUNTIME_DIR=/dev/socket/weston && mkdir -p $XDG_RUNTIME_DIR
>         weston --idle-time=0 --continue-without-input
>         Copy to clipboard
> 
> 
> 关于 Weston 应用程序的更多信息，请参阅 [Qualcomm Linux 显示指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-18)。

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

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

1. 要在 Linux 主机上设置 SDK 环境，请运行以下命令：

source environment-setup-armv8-2a-qcom-linux
        Copy to clipboard
2. 要编译并生成二进制文件，请运行以下命令：

devtool modify glmark2
        devtool build glmark2
        Copy to clipboard

如果遇到任何 umask 错误，请将 umask 设置为 022。

    编译成功后，您可以在 `<path-to-installed-eSDK>/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]:/tmp
        Copy to clipboard

scp -r <path-to-installed-Platform-eSDK>/workspace/sources/glmark2/oe-workdir/image/usr/share/glmark2 root@[IP-address-of-device]:/tmp
        Copy to clipboard
4. 要在设备上运行应用程序，请使用设备的 IP 地址打开 SSH 终端并运行以下命令：

export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1
        chmod 777 /tmp/glmark2-es2-wayland
        chmod -R 777 /tmp/glmark2
        cd /tmp
        ./glmark2-es2-wayland --data-path /tmp/glmark2 -b jellyfish
        Copy to clipboard

Note

请使用以下命令重新挂载文件系统，以便从 UART shell 运行示例应用程序：

mount -o remount,rw /
        Copy to clipboard

## 编译并运行基于 OpenCL 的应用程序

[Adreno OpenCL SDK](https://softwarecenter.qualcomm.com/#/catalog/item/Adreno_OpenCL_SDK) 有许多示例应用程序。编译和运行它们的步骤相同。您可以使用 Adreno OpenCL SDK 开发多个应用程序。但是，在编译和运行应用程序之前，请考虑 GPU 功能。

Note

目前，Qualcomm Linux 支持 OpenCL v2.1。

运行 hello world 应用程序的步骤如下：

**前提条件**

- 使用以下任一方法安装 Platform eSDK：

    - [使用 Qualcomm 发布存档](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-51/install-sdk.html#download-qim-platform-esdk)
    - [手动编译 Qualcomm Linux SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/how_to.html#generate-an-esdk)
- 从 Linux 主机到设备建立 SSH 连接。有关说明，请参阅[使用 SSH 登录](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/how_to.html#use-ssh)。
- 下载 [Adreno OpenCL SDK](https://softwarecenter.qualcomm.com/#/catalog/item/Adreno_OpenCL_SDK)。

Note

只允许注册用户下载 Adreno OpenCL SDK。

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

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

1. 要编译应用程序，请在 Linux 主机上运行以下命令：

cd opencl-sdk
        Copy to clipboard

source <path-to-installed-Platform-eSDK>/environment-setup-armv8-2a-qcom-linux
        Copy 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=1
        cmake --build build
        Copy to clipboard

    成功编译代码后，系统会在 `/build` 目录中生成二进制文件。
2. 要运行应用程序，请使用设备的 IP 地址打开 SSH 终端并运行以下命令：

mkdir -p /opt/data
        mkdir -p /opt/data/opencl
        Copy 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/
        mkdir out
        chmod 777 ./*
        echo "run hello world 2.0 opencl sdk" > hello_world_input.txt
        touch out/hello_world_output.txt
        cat out/hello_world_output.txt
        ./cl_sdk_hello_world hello_world_input.txt out/hello_world_output.txt
        cat out/hello_world_output.txt
        Copy to clipboard

## 编译和运行基于 Vulkan 的应用程序

Adreno SDK 有许多基于 Vulkan 的示例应用程序。编译和运行任何基于 Vulkan 的应用程序的步骤相同。您可以使用 Adreno SDK 开发基于 Vulkan 的应用程序。要编译和运行这些应用程序，请参阅以下步骤。作为示例，本节介绍了运行 Sascha Willems 和 Khronos 基于 Vulkan 的应用程序的步骤。

### 编译和运行 Sascha Willems 基于 Vulkan 的应用程序

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

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

**前提条件**

- 使用以下任一方法安装 Platform eSDK：

    - [使用 Qualcomm 发布存档](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-51/install-sdk.html#download-qim-platform-esdk)
    - [手动编译 Qualcomm Linux SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/how_to.html#generate-an-esdk)
- 从 Linux 主机到设备建立 SSH 连接。有关说明，请参阅[使用 SSH 登录](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/how_to.html#use-ssh)。

**编译和运行三角形 bin 示例应用程序的步骤**

1. 要编译应用程序，请在 Linux 主机上运行以下命令：

git clone --recurse-submodules https://github.com/SaschaWillems/Vulkan.git
        cd Vulkan
        Copy to clipboard

source <path-to-installed-Platform-eSDK>/environment-setup-armv8-2a-qcom-linux
        Copy to clipboard

cmake -G "Unix Makefiles" -Bbuild/linux -DUSE_WAYLAND_WSI=ON -DRESOURCE_INSTALL_DIR="/tmp/"
        cmake --build build/linux --config Release  -j$(nproc)
        Copy to clipboard

    成功编译后，您可以在 `build/linux/bin` 目录中找到二进制文件。
2. 要将二进制文件推送到设备，请运行以下命令：

cd Vulkan
        Copy 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 /tmp
        chmod -R 777 assets/
        chmod -R 777 shaders/
        chmod 777 triangle
        export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1
        ./triangle
        Copy to clipboard

### 编译和运行 Khronos 基于 Vulkan 的应用程序

您可以在 [https://github.com/KhronosGroup/Vulkan-Samples.git](https://github.com/KhronosGroup/Vulkan-Samples.git) 找到 Khronos 基于 Vulkan 的应用程序。编译和运行任何 Khronos 基于 Vulkan 的应用程序的步骤都是相同的。

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

**前提条件**

- 使用以下任一方法安装 Platform eSDK：

    - [使用 Qualcomm 发布存档](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-51/install-sdk.html#download-qim-platform-esdk)
    - [手动编译 Qualcomm Linux SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/how_to.html#generate-an-esdk)
- 从 Linux 主机到设备建立 SSH 连接。有关说明，请参阅[使用 SSH 登录](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/how_to.html#use-ssh)。

**编译和运行 vulkan\_samples 应用程序的步骤**

1. 要编译应用程序，请在 Linux 主机上运行以下命令：

sudo apt-get install -y libwayland-dev
        git clone --recurse-submodules https://github.com/KhronosGroup/Vulkan-Samples.git
        cd Vulkan-Samples/
        Copy to clipboard

source <path-to-installed-Platform-eSDK>/environment-setup-armv8-2a-qcom-linux
        Copy to clipboard

cmake -G "Unix Makefiles" -Bbuild/linux -DCMAKE_BUILD_TYPE=Release -DVKB_WSI_SELECTION=WAYLAND -DGLFW_BUILD_X11=OFF
        Copy 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-Samples
        Copy 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 /tmp
        chmod -R 777 assets/
        chmod -R 777 shaders/
        chmod 777 vulkan_samples
        export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1
        ./vulkan_samples sample swapchain_images
        Copy to clipboard

Note

如果在编译或运行应用程序时遇到问题，请使用以下命令检出特定版本。之后，重复步骤 2 到 4，重新编译并运行应用程序。

git checkout b3cb3822e8896ab650c4310f2c5f66a101469e9e
        git submodule sync
        git submodule update
        Copy to clipboard

如果由于存储问题而无法从 `/tmp` 目录运行这些示例应用程序，请尝试其他目录，例如 `/etc`。

Last Published: May 06, 2025

[Previous Topic
图形概述](https://docs.qualcomm.com/bundle/publicresource/80-70018-19SC/topics/graphics-overview.md) [Next Topic
Snapdragon Profiler 工具](https://docs.qualcomm.com/bundle/publicresource/80-70018-19SC/topics/graphics_developer_tools.md)