# Vulkan

**Vulkan** 是由[科纳斯集团](https://www.edgepedia.org/zh/khronos-group)（Khronos Group）标准化的跨平台图形与计算 API，让应用程序能够以较低的 CPU 开销对现代 GPU 进行显式、底层的控制。它是一个由公开规范定义的 C99 API，GPU 厂商在 Windows、Linux、Android 上提供实现，并通过翻译层在 Apple 平台上提供实现。<sup>[1](https://github.khronos.org/Vulkan-Site/spec/latest/index.html)</sup><sup> • </sup><sup>[2](https://docs.vulkan.org/guide/latest/what_is_vulkan.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 首次发布 | Vulkan 1.0，免版税的开放标准，2016 年 2 月 16 日发布<sup>[3](https://www.khronos.org/news/press/khronos-releases-vulkan-1-0-specification?sf20977155=1)</sup> |
| 起源 | 源自 AMD 的 Mantle API，捐赠给科纳斯；由开发 OpenGL 的同一联盟开发<sup>[3](https://www.khronos.org/news/press/khronos-releases-vulkan-1-0-specification?sf20977155=1)</sup><sup> • </sup><sup>[4](https://www.amd.com/en/products/graphics/ecosystems/vulkan.html)</sup> |
| 核心版本 | 1.1（2018 年 3 月 7 日）、1.2（2020 年 1 月 15 日）、1.3（2022 年 1 月 25 日）、1.4（2024 年 12 月 3 日），均向后兼容<sup>[5](https://docs.vulkan.org/guide/latest/vulkan_release_summary.html)</sup><sup> • </sup><sup>[6](https://docs.vulkan.org/guide/latest/versions.html)</sup> |
| 着色器 | 图形和计算着色器以名为 SPIR-V 的中间表示编写<sup>[7](https://registry.khronos.org/vulkan/)</sup> |
| 执行模型 | 工作被记录到命令缓冲区并提交到队列；提交到同一队列的批次遵循提交顺序，但除此之外可能重叠或乱序执行<sup>[8](https://docs.vulkan.org/spec/latest/chapters/fundamentals.html)</sup> |
| 一致性 | Vulkan 一致性测试套件包含近三百万个开源测试，所有实现者都必须通过<sup>[9](https://www.khronos.org/news/press/khronos-streamlines-development-and-deployment-of-gpu-accelerated-applications-with-vulkan-1.4)</sup> |
| Android 状态 | 自 2025 年 3 月 Google 将其设为官方图形 API 以来，它是 Android 上的主要底层图形 API；自 Android 7（API 级别 24）起可用<sup>[10](https://developer.android.com/games/develop/vulkan/overview?authuser=8)</sup><sup> • </sup><sup>[11](https://android-developers.googleblog.com/2025/03/building-excellent-games-with-better-graphics-and-performance.html)</sup> |

## 目的与设计

Vulkan 为从 PC 和游戏主机到移动电话和嵌入式平台的设备提供高效、跨平台的 GPU 访问能力。它是一个显式 API：不让驱动去推断应用程序的意图，而是由应用程序描述它打算做什么，相比 OpenGL 和 Direct3D 等旧式 API，这可以带来更好的性能和更可预期的驱动行为。<sup>[2](https://docs.vulkan.org/guide/latest/what_is_vulkan.html)</sup><sup> • </sup><sup>[12](https://docs.vulkan.org/tutorial/latest/00_Introduction.html)</sup>

这种控制权的代价是繁琐。应用程序必须设置旧式 API 隐式处理的细节，包括帧缓冲区的创建以及缓冲区和纹理图像的内存管理，驱动承担的辅助工作大大减少。科纳斯自己的教程将 Vulkan 描述为面向那些愿意投入这些工作以换取控制和性能的程序员。<sup>[12](https://docs.vulkan.org/tutorial/latest/00_Introduction.html)</sup>

与 OpenGL 相比，Vulkan 大幅降低了 API 开销——即 CPU 为解释应用程序对硬件的请求而执行的背景工作——并暴露了 OpenGL 无法访问的 GPU 特性。<sup>[4](https://www.amd.com/en/products/graphics/ecosystems/vulkan.html)</sup> 其设计思路类似于 Direct3D 12 和 Apple 的 Metal，但 Vulkan 完全跨平台，允许用一套代码库为 Windows、Linux 和 Android 开发。<sup>[12](https://docs.vulkan.org/tutorial/latest/00_Introduction.html)</sup>

## 历史

Vulkan 1.0 于 2016 年 2 月 16 日在旧金山[游戏开发者大会](https://www.edgepedia.org/zh/game-developers-conference)期间发布，多个硬件驱动和 SDK 即刻可用。规范、一致性测试以及开源 SDK 和编译器组件在 18 个月内完成，科纳斯集团总裁兼 NVIDIA 副总裁尼尔·特雷维特（Neil Trevett）称，该工作组汲取的开发者积极性超过了以往任何科纳斯项目。<sup>[3](https://www.khronos.org/news/press/khronos-releases-vulkan-1-0-specification?sf20977155=1)</sup> 该 API 源自 AMD 的 Mantle，AMD 将其低开销架构捐赠给了这项工作。<sup>[3](https://www.khronos.org/news/press/khronos-releases-vulkan-1-0-specification?sf20977155=1)</sup><sup> • </sup><sup>[4](https://www.amd.com/en/products/graphics/ecosystems/vulkan.html)</sup>

后续核心版本大约每两年发布一次：2018 年 3 月的 1.1 引入了子组、受保护内存和设备组；2020 年 1 月的 1.2 将时间线信号量、缓冲区设备地址和 Vulkan 内存模型提升为核心功能；2022 年 1 月的 1.3 将动态渲染和 synchronization2 纳入核心；2024 年 12 月的 1.4 将此前可选的扩展——包括推送描述符、动态渲染本地读取和主机图像复制——整合进核心规范。<sup>[5](https://docs.vulkan.org/guide/latest/vulkan_release_summary.html)</sup><sup> • </sup><sup>[9](https://www.khronos.org/news/press/khronos-streamlines-development-and-deployment-of-gpu-accelerated-applications-with-vulkan-1.4)</sup>

## 执行模型：队列、命令缓冲区与同步

应用程序向 `VkQueue` 提交工作，通常以 `VkCommandBuffer` 对象或稀疏绑定的形式。命令首先被记录到命令缓冲区，然后提交到队列执行。在同一个队列内，命令缓冲区遵循提交顺序，并享有隐式顺序保证，但它们仍可能重叠或乱序执行；当命令缓冲区进入不同队列时，除非应用程序通过 `VkSemaphore` 显式同步，否则它们之间不存在顺序关系。<sup>[8](https://docs.vulkan.org/spec/latest/chapters/fundamentals.html)</sup><sup> • </sup><sup>[13](https://docs.vulkan.org/guide/latest/queues.html)</sup>

队列通过队列族来宣告其支持的功能。规范将图形、计算、视频解码、视频编码、受保护内存管理、稀疏内存管理和传输定义为队列可能支持的功能类型。仅传输队列族通常用于独立 GPU 上的异步主机到设备数据传输，使传输可以与独立的图形或计算工作并发进行。<sup>[8](https://docs.vulkan.org/spec/latest/chapters/fundamentals.html)</sup><sup> • </sup><sup>[13](https://docs.vulkan.org/guide/latest/queues.html)</sup>

由于命令可能以任意顺序执行，正确性依赖于显式同步。Vulkan 定义了一个形式化的内存模型，包含可用性、可见性和内存域操作，并将提交顺序作为构建显式和隐式保证的基础顺序。队列提交命令会自动为命令执行前进行的写入执行主机到设备域操作，因此在这种情况下通常不需要显式的内存屏障。<sup>[14](https://docs.vulkan.org/spec/latest/chapters/synchronization.html)</sup><sup> • </sup><sup>[15](https://docs.vulkan.org/spec/latest/appendices/memorymodel.html)</sup>

## 着色器与 SPIR-V

Vulkan 的图形和计算着色器以 SPIR-V 定义，这是一种二进制中间表示，拥有自己的科纳斯注册表和规范。着色器在管线创建时提供，shaderc、glslang、SPIRV-Cross 以及开源的 DXC HLSL 编译器等工具从 GLSL、HLSL 和 Slang 等高级语言生成或转换 SPIR-V。<sup>[7](https://registry.khronos.org/vulkan/)</sup><sup> • </sup><sup>[16](https://docs.vulkan.org/guide/latest/what_is_spirv.html)</sup><sup> • </sup><sup>[17](https://www.khronos.org/assets/uploads/developers/library/2016-vulkan-devday-uk/4-Using-spir-v-with-spirv-cross.pdf)</sup>

## 工具与验证

按照设计，Vulkan 驱动内部执行的错误检查极少。验证改由拦截 API 的层来提供：科纳斯验证层 `VK_LAYER_KHRONOS_validation` 捆绑了标准验证、同步验证（识别因缺失或错误同步导致的资源访问冲突）、GPU 辅助验证（对着色器进行插桩以进行运行时检查）、着色器 printf 调试以及最佳实践警告。<sup>[18](https://docs.vulkan.org/guide/latest/layers.html)</sup><sup> • </sup><sup>[19](https://github.khronos.org/Vulkan-Site/guide/latest/development_tools.html)</sup>

LunarG 由私人赞助维护生态系统组件，管理 Vulkan 加载器和验证层仓库，并交付 Vulkan SDK，其中还包括 API 转储层、GFXReconstruct 捕获与回放工具，以及用于管理层设置的 Vulkan 配置器。<sup>[19](https://github.khronos.org/Vulkan-Site/guide/latest/development_tools.html)</sup>

## 平台覆盖

**Android。** Vulkan 是 Android 上的主要底层图形 API，取代了 [OpenGL ES](https://www.edgepedia.org/zh/opengl-es)——后者仍受支持但已不再积极开发新功能。Vulkan 自 Android 7（API 级别 24）起就存在于 Android 上；所有运行 [Android 10](https://www.edgepedia.org/zh/android-10)（API 级别 29）或以上的 64 位设备都提供 Vulkan 1.1 支持，Vulkan 在 85% 的活跃 Android 设备上可用。Android UI 渲染框架在兼容设备上使用 Vulkan，当前版本的 Unity 和 Unreal 引擎在兼容设备上选择 Vulkan 作为默认渲染器。2025 年 3 月，Google 将 Vulkan 设为 Android 的官方图形 API，[Android 15](https://www.edgepedia.org/zh/android-15) 及以上版本包含 ANGLE——一个构建在 Vulkan 之上的合规 OpenGL ES 实现——作为可选的翻译层。<sup>[10](https://developer.android.com/games/develop/vulkan/overview?authuser=8)</sup><sup> • </sup><sup>[11](https://android-developers.googleblog.com/2025/03/building-excellent-games-with-better-graphics-and-performance.html)</sup>

**Apple 平台。** macOS 和 iOS 没有原生 Vulkan 驱动；支持通过 MoltenVK 实现，这是一个运行在 Apple Metal API 之上的分层实现，作为科纳斯开源项目管理。Vulkan 可移植性扩展标准化了对分层实现的功能查询，使其功能可以进行一致性测试，MoltenVK 是这种方法的主要范例。<sup>[20](https://dev.vulkan.org/porting)</sup><sup> • </sup><sup>[21](https://members.khronos.org/document/dl/28194)</sup>

**翻译层。** 在 Linux 上，Valve 的 Proton 通过 [DXVK](https://www.edgepedia.org/zh/dxvk) 运行 Windows 游戏，后者将 Direct3D 9、10 和 11 翻译为 Vulkan；vkd3d-proton 则将 Direct3D 12 翻译为 Vulkan。<sup>[22](https://github.com/ValveSoftware/Proton)</sup> 另一个独立项目 D7VK 将这一方法回溯到 Direct3D 7 并实验性地支持 Direct3D 6，让老游戏在现代硬件上运行，其作者称与完整模拟相比性能损失较小。<sup>[23](https://www.tomshardware.com/video-games/retro-gaming/d7vk-reaches-version-1-1-and-adds-new-frontend-and-experimental-direct3d-6-support-direct3d-7-to-vulkan-translation-layer-runs-old-games-with-native-performance)</sup>

## 光栅化之外的能力

跨厂商光线追踪在 1.2.162 规范中作为扩展加入 Vulkan，主要是 `VK_KHR_ray_tracing_pipeline`、`VK_KHR_ray_query` 和 `VK_KHR_acceleration_structure`；在此之前有一个较早的 NVIDIA 厂商扩展，新的开发工作则指向 KHR 扩展。Vulkan Video 通过 `VK_KHR_video_queue`、`VK_KHR_video_decode_queue`、`VK_KHR_video_decode_h264` 和 `VK_KHR_video_decode_h265` 扩展暴露硬件加速的实时视频解码，编码则通过相应的编码扩展提供。Vulkan 工作组还研究了使 Vulkan 成为机器学习计算的一等 API，但目前尚无公开的 Vulkan ML API。<sup>[24](https://docs.vulkan.org/guide/latest/what_vulkan_can_do.html)</sup>

另一项独立标准 Vulkan SC（“安全关键”）于 2022 年 3 月 1 日公开发布，将 Vulkan 图形和计算带入汽车、航空电子、工业和医疗领域的安全关键系统。它基于 Vulkan 1.2，但移除了这些市场不需要的功能，消除了被忽略的参数和未定义行为，并增加了对运行时故障的增强检测和报告。<sup>[24](https://docs.vulkan.org/guide/latest/what_vulkan_can_do.html)</sup>

## 采用情况

Vulkan 1.4 一致性测试已由 AMD、Arm、Imagination、Intel、NVIDIA、Qualcomm 和三星的开发驱动通过，Mesa 开源 Linux 驱动也在 AMD、Apple、Intel、NVIDIA 和 Qualcomm 硬件上通过了测试。<sup>[9](https://www.khronos.org/news/press/khronos-streamlines-development-and-deployment-of-gpu-accelerated-applications-with-vulkan-1.4)</sup> 在游戏方面，《博德之门 3》提供 DirectX 11 或 Vulkan 作为图形选项，这是 Vulkan 在同时发行 Windows 版本的作品中充当跨平台替代方案的一个例子。<sup>[25](https://www.pcgamer.com/hardware/microsoft-celebrates-10-years-of-directx-12-a-decade-of-updates-to-the-low-level-graphics-api-but-its-still-not-the-master-of-all-things-rendering/)</sup> Mojang Studios 已开始用 Vulkan 多线程渲染器替换《我的世界》Java 版使用了 17 年的 OpenGL 渲染器，理由是预期性能提升、稳定性改善以及对当代图形效果更好的支持。<sup>[26](https://www.tomshardware.com/video-games/after-17-years-minecraft-java-edition-starts-replacing-opengl-with-a-vulkan-multi-threaded-renderer-update-will-prove-a-boon-for-performance-and-modding)</sup>

## References

1. [Vulkan Documentation, Khronos Vulkan Documentation Project](https://github.khronos.org/Vulkan-Site/spec/latest/index.html)
2. [What is Vulkan?, Vulkan Documentation Project](https://docs.vulkan.org/guide/latest/what_is_vulkan.html)
3. [Khronos Releases Vulkan 1.0 Specification, Khronos press release, February 16, 2016](https://www.khronos.org/news/press/khronos-releases-vulkan-1-0-specification?sf20977155=1)
4. [AMD Vulkan Graphics API](https://www.amd.com/en/products/graphics/ecosystems/vulkan.html)
5. [Vulkan Release Summary, Vulkan Documentation Project](https://docs.vulkan.org/guide/latest/vulkan_release_summary.html)
6. [Vulkan Versions & Porting Guide, Vulkan Documentation Project](https://docs.vulkan.org/guide/latest/versions.html)
7. [Khronos Vulkan Registry](https://registry.khronos.org/vulkan/)
8. [Fundamentals, Vulkan Specification](https://docs.vulkan.org/spec/latest/chapters/fundamentals.html)
9. [Khronos Streamlines Development and Deployment of GPU-Accelerated Applications with Vulkan 1.4, December 3, 2024](https://www.khronos.org/news/press/khronos-streamlines-development-and-deployment-of-gpu-accelerated-applications-with-vulkan-1.4)
10. [Use Vulkan for graphics, Android Developers](https://developer.android.com/games/develop/vulkan/overview?authuser=8)
11. [Building excellent games with better graphics and performance, Android Developers Blog, March 13, 2025](https://android-developers.googleblog.com/2025/03/building-excellent-games-with-better-graphics-and-performance.html)
12. [Khronos Vulkan Tutorial, Introduction](https://docs.vulkan.org/tutorial/latest/00_Introduction.html)
13. [Queues, Vulkan Documentation Project](https://docs.vulkan.org/guide/latest/queues.html)
14. [Synchronization and Cache Control, Vulkan Specification](https://docs.vulkan.org/spec/latest/chapters/synchronization.html)
15. [Memory Model appendix, Vulkan Specification](https://docs.vulkan.org/spec/latest/appendices/memorymodel.html)
16. [What is SPIR-V, Vulkan Documentation Project](https://docs.vulkan.org/guide/latest/what_is_spirv.html)
17. [Using SPIR-V with SPIRV-Cross, Khronos Vulkan DevDay UK 2016](https://www.khronos.org/assets/uploads/developers/library/2016-vulkan-devday-uk/4-Using-spir-v-with-spirv-cross.pdf)
18. [Layers, Vulkan Documentation Project](https://docs.vulkan.org/guide/latest/layers.html)
19. [Development Tools, Vulkan Documentation Project](https://github.khronos.org/Vulkan-Site/guide/latest/development_tools.html)
20. [Porting, Vulkan Portability Initiative](https://dev.vulkan.org/porting)
21. [Vulkan Conformance Testing on VK_KHR_portability_subset, Khronos members document](https://members.khronos.org/document/dl/28194)
22. [ValveSoftware/Proton, GitHub](https://github.com/ValveSoftware/Proton)
23. [D7VK reaches version 1.1, Tom's Hardware, December 29, 2025](https://www.tomshardware.com/video-games/retro-gaming/d7vk-reaches-version-1-1-and-adds-new-frontend-and-experimental-direct3d-6-support-direct3d-7-to-vulkan-translation-layer-runs-old-games-with-native-performance)
24. [What Vulkan Can Do, Vulkan Documentation Project](https://docs.vulkan.org/guide/latest/what_vulkan_can_do.html)
25. [Microsoft celebrates 10 years of DirectX 12, PC Gamer](https://www.pcgamer.com/hardware/microsoft-celebrates-10-years-of-directx-12-a-decade-of-updates-to-the-low-level-graphics-api-but-its-still-not-the-master-of-all-things-rendering/)
26. [Minecraft Java Edition starts replacing OpenGL with a Vulkan multi-threaded renderer, Tom's Hardware, February 2026](https://www.tomshardware.com/video-games/after-17-years-minecraft-java-edition-starts-replacing-opengl-with-a-vulkan-multi-threaded-renderer-update-will-prove-a-boon-for-performance-and-modding)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Development tools and collaboration infrastructure › Frameworks, libraries, and APIs › Graphics and multimedia APIs

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/vulkan

English original: https://www.edgepedia.org/vulkan
