Adreno GPU上Windows基于Arm64游戏开发介绍(1)
Windows 上的 Arm64 开发入门
介绍
在过去几年中,Arm 芯片实现了从消费手机到笔记本电脑的飞跃。 Arm 功能强大、重量轻且始终处于连接状态,为用户可以随身携带的个人计算设备带来了新的未来。市场上有许多来自微软、联想和三星等制造商的 Windows 10 Arm 设备。用户可以在仿真中运行他们最喜欢的程序的 32 位 x86 版本,但这需要权衡性能。 64 位 x86-64 程序根本无法运行。随着安装基数的增长,对可以在此硬件上本地运行并利用其提供的所有功能的应用程序和游戏的需求不断增加。开发人员希望尽可能多的潜在用户可以使用软件,并且该软件可以毫不妥协地运行。然而,额外的平台通常会带来大量额外的工作。本通用开发指南描述了 Microsoft 和 Qualcomm® 之间的工作和协作,以尽可能简化将软件移植到 Windows 10 on Arm。以下部分将引导用户从他们当前的 x86-64 开发环境中舒适地完成这些过程和功能:
- Visual Studio 的必要设置
- 将 Arm64 作为构建目标添加到项目中
- 如何在 Arm 设备上启用远程调试以评估 Arm64 上的性能和问题
- 将 Arm64 与 x86-64 和 x86 系统区分开来的关键平台细节在开发过程中很重要
注意:
本指南假定您具备软件开发方面的知识和经验,基本熟悉 Visual Studio 和相关工具,并了解 x86/x86-64 系统。 它还假设开发工作将在 x86-64 Windows 10 设备上执行。 在撰写本文时(2020 年 5 月),Visual Studio 和虚幻引擎编辑器等开发工具无法在 Arm64 上本地运行,但可以针对 Arm64 目标构建应用程序和游戏。
Visual Studio 入门
本节提供在 Visual Studio 中启用 Arm64 开发的必要步骤。 Visual Studio 2017 和 Visual Studio 2019 的配置类似。 本指南中提供的示例使用 Visual Studio 2017。
先决条件
- 运行 Windows 10 的 64 位主机开发系统。您将在此处进行开发和大量调试。
- 运行 Windows 10 Arm64 的目标系统。 这是您最终运行和测试软件的地方。
在开发主机上安装和配置 Visual Studio
1.运行最新版本的 Visual Studio 安装程序。
2.使用以下工作负载安装 Visual Studio:
- 使用 C++ 进行桌面开发
- 通用 Windows 平台开发
- 使用 C++ 进行游戏开发(仅用于游戏开发)
3.安装以下单个组件:
- 用于 Arm 的 Visual C++ 编译器和库
- 适用于 Arm64 的 Visual C++ 编译器和库
- 适用于 UWP 的 Visual C++ 运行时
- 适用于 Arm64 的 C++ 通用 Windows 平台工具
- Windows 10 SDK(v10.0.18362 或更新版本)
安装和配置 Arm64 目标设备
注意
确保在配置 Arm64 目标设备之前安装了最新的 Windows 更新。
1.从以下位置下载 Windows 10 SDK(v10.0.18362 或更高版本):https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/
2.在安装过程中,选择 Windows 调试工具。
3.将 Arm64 平台添加到 Visual Studio 项目中:
a. 在 Visual Studio 中,单击生成 > 打开配置管理器。
b. 在活动解决方案平台列表中,选择 <新建...>。
c. 在“新建解决方案平台”对话框中,选择以下值:
- 键入或选择新平台列表:Arm64 – 从列表复制设置:x64
d. 点击 OK.
4.通过在解决方案资源管理器窗口中右键单击项目或从视图菜单中打开项目的属性页。
5.将 Windows SDK 版本更新到 10.0.18362.0 或更高版本。