Vulkan

本頁使用了標題或全文手工轉換
維基百科,自由的百科全書
Vulkan
開發者科納斯組織,基於AMDMantle開發[1][2][3][4][5]
首次發佈2016年2月16日,​8年前​(2016-02-16[6]
目前版本
  • 1.3.283 (2024年4月19日;穩定版本)[7]
編輯維基數據連結
原始碼庫 編輯維基數據連結
作業系統AndroidLinuxTizenMicrosoft Windows[8][9]
平台跨平台
類型3D圖形與計算API[10]
許可協定 編輯維基數據連結
網站www.khronos.org/vulkan/

Vulkan是一個低開銷、跨平台的二維、三維圖形與計算的應用程式介面(API),[11]最早由科納斯組織在2015年遊戲開發者大會(GDC)上發表。[12][13]OpenGL類似,Vulkan針對全平台即時3D圖形程式(如電子遊戲互動媒體)而設計,並提供高效能與更均衡的CPUGPU佔用,這也是Direct3D 12和AMDMantle的目標。與Direct3D(12版之前)和OpenGL的其他主要區別是,Vulkan是一個底層API,而且能執行並列任務。除此之外,Vulkan還能更好地分配多個CPU核心的使用。[14]

科納斯最先把Vulkan API稱為「次世代OpenGL行動」(next generation OpenGL initiative)或「glNext」,但在正式宣佈Vulkan之後這些名字就沒有再使用了。[15]Vulkan基於Mantle構建,AMD將其Mantle API捐贈給科納斯組織,給予該組織開發底層API的基礎,使其像OpenGL一樣成為行業標準。[3][10][16][17][18][19][20]

特性

OpenGL與Vulkan都是圖形彩現API,GPU處理着色器,而CPU執行其他任務。

Vulkan旨在提供更低的CPU開銷與更直接的GPU控制,其理念大致與Direct3D 12和Mantle類似。[21]

以下是Vulkan相對於上一代API的優勢:[22]

  • Vulkan API適用於從高效能電腦到移動低功耗裝置的顯示卡(OpenGL具有名為OpenGL ES的流動裝置API子集,它仍是支援Vulkan裝置的備選API)。
  • 相比於Direct3D 12,Vulkan與前身OpenGL類似,受多種作業系統支援。Vulkan已經能在Windows 7Windows 8Windows 10TizenLinuxAndroid上執行(iOSmacOS有第三方支援[23])。
  • 通過批次處理(Batching)減少CPU負載,使CPU可以執行更多其他的計算或彩現任務。[21][24]
  • 在多核心CPU上,Vulkan能對核心與線程進行最佳化。Direct3D 11與OpenGL 4最初為單核心CPU設計,儘管後來出現了針對多核心CPU最佳化的擴充,不過與Vulkan相比,最佳化仍不是很好。[25]
  • 減少了驅動程式的開銷與維護工作。OpenGL使用進階着色語言GLSL編寫着色器,不同的驅動在程式執行時需要執行自身的GLSL編譯器,將程式的着色器轉換為GPU可執行的機械碼。而Vulkan驅動將着色器語言預先轉化為SPIR-V英語Standard Portable Intermediate Representation(Standard Portable Intermediate Representation)的中間二進制格式,其行為類似於Direct3DHLSL着色器。通過着色器預編譯,應用程式載入速度更快,並且3D場景可以使用更多種着色器。Vulkan驅動只需對GPU進行最佳化並生成代碼,這使得驅動程式更容易維護,驅動程式包更小(目前GPU供應商仍需在驅動程式中提供OpenGL與OpenCL的支援)。[26]
  • 計算與圖形處理的統一管理,因此Vulkan無需與單獨的計算API配合使用。

輝達在2016年時指出,由於OpenGL的複雜度和維護難度比Vulkan低很多,在多數情況下也能提供理想的整體效能,現階段OpenGL仍是個很好的選擇。[27] AMD表示, Vulkan支援Close-To-Metal控制的獨特能力可加快跨 Windows和 Linux的效能並且提高影像質素。現今無其他圖形 API 提供如此強大的作業系統相容性、成像功能和硬件效率組合[28] 。 例如,CPU中包含的整合GPU可與高端專用GPU結合使用,以略微提高效能。

Vulkan 1.1

科納斯在SIGGRAPH2016上宣佈Vulkan將支援自動多GPU功能,類似於Direct3D 12所提供的功能[29] ,顯示驅動程式不再需要處理多個GPU的使用,相反,兩個或更多完全不同的GPU之間可以智能地分配工作負載[30]

科納斯於2018年3月7日發佈了Vulkan 1.1[31] 。它擴展了幾個核心功能,包括子集操作,例如多視圖、裝置組、高級彩現和編輯操作程式跨流程API互動操作。這些核心功能還包括16位元記憶體獲取高級計算,HLSL記憶體分佈支援,影片流的顯示,處理和編程,通過許多影片編輯解碼器生成的YCbcRr顏色格式化紋理的直接抽樣。同時,它還帶來了與DirectX 12的更好相容性,顯式支援多GPU,光線跟蹤支援[32][33],為下一代GPU奠定了基礎。[34]

vulkan 1.2

2020年1月15日,科納斯組織發佈了Vulkan 1.2,將23個已經通過驗證的擴展整合到基本Vulkan標準中[35],大部份用來幫助提升Vulkan與其他圖形API之間的相容層效能。

Vulkan 1.3

2022年1月25日,科納斯組織發佈了Vulkan 1.3。[36] 這次更新將另外23個常用的成熟的Vulkan擴充整合到基本的Vulkan標準中。

計劃中的功能

科納斯在SIGGRAPH 2016上宣佈,Vulkan將提供類似於Direct3D 12的多卡互聯功能。[37]通過Vulkan,不同型號的顯示卡也能協同工作,而無需NVIDIA SLIAMD Crossfire的支援。Vulkan多卡互聯功能允許API在多個不同的顯示卡之間智能分配負載,例如,CPU上的整合顯示卡與高端獨立顯示卡協同工作,能夠略微提升顯示效能。[38]

在OpenCL 2.2規範發佈時,科納斯宣佈OpenCL將在未來融入Vulkan。[39][40]

歷史

2014年6月,科納斯組織開始了「次世代OpenGL」圖形API的計劃,並在Valve公司舉行專案啟動會議。[41]在SIGGRAPH 2014上,專案公之於世。[10]2015年2月19日,Vulkan的商標在美國專利及商標局提交。[42]

2015年早些時候,LunarG英語LunarG(由Valve資助)開發並展示了一款支援Vulkan API的Intel HD Graphics 4000系列Linux驅動程式,不過當時的Mesa開源驅動並不完全相容OpenGL 4.0。[43][44]

2016年2月16日,科納斯組織發佈了Vulkan 1.0版規範與開源軟件開發套件(SDK)。[6]

支援Vulkan的軟件

電子遊戲

遊戲引擎

開發工具

作業系統組件

Vulkan視窗系統介面(Window System Interface,WSI)的作用類似於OpenGL ESEGL英語EGL[72]EGL能使OpenGL ES程式跟原生視窗系統相通,並控制上下文管理英語Context management緩衝區繫結與彩現同步等。

相容性

初版Vulkan規範指出,Vulkan能在支援OpenGL ES 3.1或OpenGL 4.x及更高版本的顯示卡上執行。[73]但Vulkan API本身依賴於新版顯示卡驅動程式,而且並非所有符合Vulkan規範的顯示卡都能收到廠商提供的驅動程式更新。

2016年8月22日,Google發佈的Android Nougat(Android 7.x)提供對Vulkan的支援。[74]

蘋果公司沒有對iOS和macOS提供官方Vulkan支援,而Molten公司開發的MoltenVK執行於蘋果Metal API,提供Vulkan第三方支援。[23]

參見

  • OpenGL,科納斯組織的另一個圖形API
  • OpenCL,科納斯組織的一個異構計算框架
  • Mantle,AMD的底層圖形與計算API,Vulkan的前身
  • Direct3D,Windows和Xbox專有的圖形API
  • Metal,iOS和macOS的一個底層圖形與計算API

參考資料

  1. ^ Not dead yet: AMD's Mantle powers new Vulkan API, VR efforts. 2015-03-04 [2015-03-30]. (原始內容存檔於2016-04-22) (英語). 
  2. ^ Kirsch, Nathan. Is AMD Mantle Dead As We Have Known It? Vulcan API Uses Mantle Technology for OpenGL. Legit Reviews. [2015-06-25]. (原始內容存檔於2015-06-26) (英語). 
  3. ^ 3.0 3.1 Shilov, Anton. AMD: Vulkan absorbed 'best and brightest' parts of Mantle. KitGuru. [2015-06-26]. (原始內容存檔於2015-06-26) (英語). 
  4. ^ Koduri, Raja. On APIs and the future of Mantle. AMD. 2015-03-04 [2015-05-19]. (原始內容存檔於2015-05-20) (英語). ...(T)he Khronos Group has selected Mantle to serve as the foundation for Vulkan... 
  5. ^ Michaud, Scott. GDC 15: Khronos Acknowledges Mantle's Start of Vulkan. PC Perspective. 2015-03-03 [2015-05-19]. (原始內容存檔於2015-05-20) (英語). 
  6. ^ 6.0 6.1 Khronos Releases Vulkan 1.0 Specification - Khronos Group Press Release. [2017-02-10]. (原始內容存檔於2017-12-15) (英語). 
  7. ^ Release 1.3.283. 2024年4月19日 [2024年4月27日]. 
  8. ^ Bright, Peter; Walton, Mark. Vulkan now official, with 1.0 API release and AMD driver [Updated]. United Kingdom: Ars Technica. 2016-02-16 [2016-02-18]. (原始內容存檔於2016-02-17) (英國英語). 
  9. ^ Valich, Theo. Mantle Cycle is Complete as Khronos Releases Vulkan 1.0. VR World. 2016-02-17 [2016-02-19]. (原始內容存檔於2022-05-11) (英語). 
  10. ^ 10.0 10.1 10.2 More on Vulkan and SPIR - V: The future of high-performance graphics (PDF). Khronos Group: 10. [2015-06-27]. (原始內容 (PDF)存檔於2016-08-11) (英語). 
  11. ^ Does Vulkan support 2D graphics? - LunarG. www.lunarg.com. [2017-02-17]. (原始內容存檔於2019-05-02) (美國英語). 
  12. ^ Vulkan : Graphics and compute Belong Together (PDF). Khronos.org. March 2015 [2015-03-05]. (原始內容 (PDF)存檔於2016-12-18). 
  13. ^ Vulkan - Graphics and compute belong together. Khronos.org. [2015-03-05]. (原始內容存檔於2021-05-09). 
  14. ^ Next-generation Vulkan API could be Valve's killer advantage in battling Microsoft - ExtremeTech. ExtremeTech. 2015-03-10 [2017-02-17]. (原始內容存檔於2015-03-13) (美國英語). 
  15. ^ glNext revealed as Vulkan graphics API. 2015-03-03 [2015-03-30]. (原始內容存檔於2016-10-14) (英語). 
  16. ^ Mantle is a Vulkan: AMD's dead graphics API rises from the ashes in OpenGL's successor. PCWorld. [2017-02-17]. (原始內容存檔於2016-11-07) (英語). 
  17. ^ AMD Gaming: One of Mantle's Futures: Vulkan | AMD Blogs. Community.amd.com. [2015-03-05]. (原始內容存檔於2015-03-06). 
  18. ^ Not dead yet: AMD's Mantle powers new Vulkan API, VR efforts. ExtremeTech. [2015-03-05]. (原始內容存檔於2016-04-22). 
  19. ^ AMD's Mantle Lives On In Vulkan - Lays The Foundation For The Next OpenGL. Wccftech.com. 2014-06-20 [2015-03-05]. (原始內容存檔於2020-08-19). 
  20. ^ Kirsch, Nathan. Is AMD Mantle Dead As We Have Known It? Vulcan API Uses Mantle Technology for OpenGL. Legit Reviews. [2015-03-05]. (原始內容存檔於2015-06-26). 
  21. ^ 21.0 21.1 Khronos Group Announces The Next-Generation 'Vulkan' Graphics And Compute API. Tom's Hardware. 2015-03-03 [2017-02-18] (英語). 
  22. ^ FOSDEM 2016 - Vulkan in Open-Source. Fosdem.org. [2017-03-17]. (原始內容存檔於2016-03-09) (英語). 
  23. ^ 23.0 23.1 MoltenVK | Run Vulkan on iOS and OS X. Molten. [2017-02-18]. (原始內容存檔於2018-01-05) (美國英語). 
  24. ^ Vulkan: High efficiency on mobile - Imagination Technologies. Imagination Technologies. 2015-11-05 [2017-02-18]. (原始內容存檔於2015-11-09) (英國英語). 
  25. ^ Vulkan: Scaling to multiple threads - Imagination Technologies. Imagination Technologies. 2015-11-24 [2017-02-18]. (原始內容存檔於2015-11-26) (英國英語). 
  26. ^ Kessenich, John. An Introduction to SPIR-V (PDF). Khronos Group. [2017-02-18]. (原始內容 (PDF)存檔於2015-03-09). 
  27. ^ Transitioning from OpenGL to Vulkan. NVIDIA Developer. 2016-02-11 [2017-03-17]. (原始內容存檔於2020-04-25) (英語). 
  28. ^ AMD Vulkan API. AMD. [2020-07-26]. (原始內容存檔於2019-07-14). 
  29. ^ Vulkan Next will bring better support for VR and multiple GPUs. PC World. [2017-03-17]. (原始內容存檔於2018-12-06). 
  30. ^ Smith, Daniel Williams, Ryan. Ashes of the Singularity Revisited: A Beta Look at Direct3D 12 & Asynchronous Shading. AnandTech. [2017-03-17]. (原始內容存檔於2022-04-22). 
  31. ^ Khronos Group Releases Vulkan 1.1. The Khronos Group (新聞稿). 2018-03-07 [2018-03-21]. (原始內容存檔於2022-04-14) (英語). 
  32. ^ Larabel, Michael. Vulkan 1.1.85 Released With Raytracing, Mesh Shaders & Other New NVIDIA Extensions. Phoronix. 2018-09-19 [2018-09-19]. (原始內容存檔於2022-05-11). 
  33. ^ Larabel, Michael. Vulkan 1.1.91 Released With NV_ray_tracing, AMD Memory Overallocation Behavior. Phoronix. 2018-11-04 [2018-11-04]. (原始內容存檔於2022-05-11). 
  34. ^ Bright, Peter. Vulkan 1.1 out today, with multi-GPU support, better DirectX compatibility. Ars Terchnica. 2018-03-07 [2018-03-07]. (原始內容存檔於2022-04-29). 
  35. ^ Khronos Group Releases Vulkan 1.2. The Khronos Group (新聞稿). 2020-01-15 [2020-02-27]. (原始內容存檔於2022-05-11) (英語). 
  36. ^ Khronos Strengthens Vulkan Ecosystem with Release of Vulkan 1.3, Public Roadmap and Profiles. January 25, 2022 [2023-02-13]. (原始內容存檔於2022-01-25). 
  37. ^ Vulkan Next will bring better support for VR and multiple GPUs. PCWorld. [2017-03-17]. (原始內容存檔於2018-12-06) (英語). 
  38. ^ Smith, Daniel Williams, Ryan. Ashes of the Singularity Revisited: A Beta Look at DirectX 12 & Asynchronous Shading. [2017-03-17]. (原始內容存檔於2022-04-22). 
  39. ^ Breaking: OpenCL Merging Roadmap into Vulkan. www.pcper.com. [2017-06-05]. (原始內容存檔於2017-11-01) (英語). 
  40. ^ 超能網. 计算与图形API合体,Khronos要把OpenCL与Vulkan融合在一起. [2017-06-05]. (原始內容存檔於2019-05-03). 
  41. ^ The Khronos Group, SIGGRAPH 2015: 3D Graphics API State of the Union, 2015-09-16 [2017-03-17], (原始內容存檔於2022-05-11) 
  42. ^ Trademark Status & Document Retrieval. tsdr.uspto.gov. [2017-03-17]. (原始內容存檔於2013-05-11) (英語). 
  43. ^ Valve Developed An Intel Linux Vulkan GPU Driver - Phoronix. www.phoronix.com. [2017-03-17]. (原始內容存檔於2022-05-11) (英語). 
  44. ^ Learning More About The Intel Vulkan Driver, Linux Vulkan Plans - Phoronix. www.phoronix.com. [2017-03-17]. (原始內容存檔於2021-04-17) (英語). 
  45. ^ Smith, Daniel Williams, Ryan. Quick Look: Vulkan Performance on The Talos Principle. [2017-03-17]. (原始內容存檔於2022-05-15). 
  46. ^ 新闻 - Dota 2 Update - May 23rd 2016. store.steampowered.com. [2017-03-17]. (原始內容存檔於2020-11-08) (中文(中國大陸)). 
  47. ^ Bethesda.net. Bethesda.net. [2017-03-17]. (原始內容存檔於2022-05-11). 
  48. ^ 存档副本. [2020-02-01]. (原始內容存檔於2022-04-08). 
  49. ^ Quake 1 Ported To Run On Vulkan - Phoronix. www.phoronix.com. [2017-03-17]. (原始內容存檔於2022-05-11) (英語). 
  50. ^ Here is your first look at the first Quake being recreated in Unreal Engine 4 (fan project) - DSOGaming - The Dark Side Of Gaming. www.dsogaming.com. [2017-03-17]. (原始內容存檔於2022-04-12) (美國英語). 
  51. ^ Valve announces Source 2 engine, free for developers. Polygon. 2015-03-03 [2017-03-17]. (原始內容存檔於2015-03-05). 
  52. ^ Mahardy, Mike. GDC 2015: Valve Announces Source 2 Engine. IGN. 2015-03-03 [2017-03-17]. (原始內容存檔於2015-03-04) (美國英語). 
  53. ^ The Talos Principle will support Vulkan – first screenshot released - Croteam. Croteam. 2016-02-05 [2017-03-17]. (原始內容存檔於2022-04-12) (美國英語). 
  54. ^ Epic Games adds Vulkan support to Unreal Engine 4. bit-tech. [2017-03-17]. (原始內容存檔於2017-01-19) (英語). 
  55. ^ Epic Games Unveils ProtoStar at Samsung Galaxy Unpacked. www.unrealengine.com. [2017-03-17]. (原始內容存檔於2016-08-10) (英語). 
  56. ^ Closing in on 3.9 - Forums - Torque 3D. forums.torque3d.org. [2017-03-17]. (原始內容存檔於2021-03-18) (英國英語). 
  57. ^ Torque 3D 3.8 Released! • r/gamedev. reddit. [2017-03-17]. (原始內容存檔於2022-05-11) (英語). 
  58. ^ Kharytoniuk, Artem, GitHub - kennyalive/Quake-III-Arena-Kenny-Edition: The cradle of Quake III Arena., 2019-05-16 [2019-05-16], (原始內容存檔於2022-05-11) 
  59. ^ Vulkan DOOM 3 port based on DOOM 3 BFG Edition. July 2018 [2020-07-26]. (原始內容存檔於2022-05-11). 
  60. ^ DOOM on Twitter. Twitter. [2017-03-17]. (原始內容存檔於2022-05-11) (英語). 
  61. ^ DirectX 12, Vulkan support on the way for CryEngine. TweakTown. 2016-08-19 [2017-03-17]. (原始內容存檔於2022-05-11) (美國英語). 
  62. ^ Xenko Game Engine - Xenko 1.7β released!. xenko.com. [2017-03-17]. (原始內容存檔於2019-06-23). 
  63. ^ Intrinsic - Open-source cross-platform graphics and game engine. Intrinsic. [2017-03-17]. (原始內容存檔於2016-10-27) (美國英語). 
  64. ^ Unity engine adds Vulkan support for a big performance boost. The Tech Report. [2017-03-17]. (原始內容存檔於2021-09-12). 
  65. ^ Introducing the Vulkan renderer preview – Unity Blog. Unity Technologies Blog. [2017-03-17]. (原始內容存檔於2021-04-20) (美國英語). 
  66. ^ Linietsky, Juan. Godot Engine - Moving to Vulkan (and ES 2.0) instead of OpenGL ES 3.0. Godot. 2018-02-26 [2018-03-07]. (原始內容存檔於2020-06-17). 
  67. ^ Flax Facts #25 – Vulkan. 2019-04-16 [2020-07-26]. (原始內容存檔於2022-05-11). 
  68. ^ Rage 2 Uses Just Cause Series' Engine Instead of idTech. Shacknews. [2019-05-31]. (原始內容存檔於2022-04-12) (英語). 
  69. ^ Qualcomm and NetEase Announce Collaboration to Support Optimization of NetEase Games on Snapdragon 845 Flagship Mobile Platform. Qualcomm. 2017-12-07 [2019-08-03]. (原始內容存檔於2022-05-11) (英語). 
  70. ^ GPUPerfStudio Vulkan Tools - AMD. AMD. [2017-03-17]. (原始內容存檔於2017-01-29) (美國英語). 
  71. ^ gskvulkanrenderer.c - gtk+ - Multi-platform toolkit. git.gnome.org. [2017-03-17] (英語). 
  72. ^ Vulkan 1.0 specification released with day-one support for Wayland. Collabora - Open Source Consulting. [2017-03-17]. (原始內容存檔於2016-06-24) (英語). 
  73. ^ Vulkan Overview (PDF). Khronos Group. June 2015 [2015-08-18]. (原始內容 (PDF)存檔於2015-12-08).  p. 19 "Vulkan Status"
  74. ^ Developers, Android. Low-overhead rendering with Vulkan - Android Developers Blog. Low-overhead rendering with Vulkan - Android Developers Blog. 2015-08-10 [2017-03-17]. (原始內容存檔於2016-03-08). 

外部連結