请输入您要查询的百科知识:

 

词条 Metal (API)
释义

  1. History

  2. Supported GPUs

  3. Design

  4. Performance

  5. Adoption

  6. See also

  7. References

  8. External links

{{Use mdy dates|date=January 2015}}{{Infobox software
| name = Metal
| logo = Apple Metal logo, version 2.png
| screenshot = File:Vainglory Halcyon Fold map.tif
| caption = Apple used the mobile multiplayer online battle arena game Vainglory (Halcyon Fold map pictured) to demonstrate Metal's graphics capabilities at the iPhone 6's September 2014 announcement event
| developer = Apple Inc.
| released = {{start date and age|2014|06}}
| latest release version =
| latest release date =
| programming language = C++14
| operating system = iOS, macOS, tvOS
| platform =
| genre = 3D graphics and compute API
| license = proprietary
| website = {{URL|https://developer.apple.com/metal/}}
}}

Metal is a low-level, low-overhead hardware-accelerated 3D graphic and compute shader application programming interface (API) developed by Apple Inc., and which debuted in iOS 8. Metal combines functions similar to OpenGL and OpenCL under one API. It is intended to bring to iOS, macOS, and tvOS apps some of the performance benefits of similar APIs on other platforms, such as Vulkan (which debuted in mid-February 2016) and DirectX 12.

Metal is an object-oriented API that can be invoked using the Swift or Objective-C programming languages. Full-blown control of the Metal framework (as well as the related MetalKit framework) is accessible via the Metal Unified Graphics and Compute Language. According to Apple promotional materials: "Metal is a C++ based programming language that developers can use to write code that is executed on the GPU for graphics and general-purpose data-parallel computations. Since Metal is based on C++, developers will find it familiar and easy to use. With Metal, both graphics and compute programs can be written with a single, unified language, which allows tighter integration between the two."[1]

History

Metal has been available since June 2, 2014 on iOS devices powered by Apple A7 or later,[2] and since June 8, 2015 on Macs (2012 models or later) running OS X El Capitan.[3]

On June 5, 2017 at WWDC, Apple announced the second version of Metal, to be supported by macOS High Sierra, iOS 11 and tvOS 11. Metal 2 is not a separate API from Metal and is supported by the same hardware. Metal 2 enables more efficient profiling and debugging in Xcode, accelerated machine learning, lower CPU workload, support for virtual reality on macOS, and specificities of the Apple A11 GPU, in particular.[4]

Supported GPUs

On iOS and tvOS, Metal supports Apple-designed SoCs from the Apple A7 or newer. On macOS, Metal supports Intel HD and Iris Graphics from the HD 4000 series or newer, AMD GCN-based GPUs, and Nvidia Kepler-based GPUs or newer.

Design

Metal is designed around principles of modern graphics and compute APIs, such as Vulkan and Direct3D 12, in that instructions are sent to the GPU in command buffers obtained from command queues.

Metal improves the capabilities of GPGPU programming by using compute shaders.

Metal uses a specific shading language based on C++14; this is implemented using Clang and LLVM.[5]

Performance

Metal should have better performance than OpenGL, for several reasons:

  • Precomputed shaders and up-front state validation
  • Explicit synchronization between GPU and CPU
  • Shared memory space between GPU and CPU
  • Lower driver overhead[6]
  • Efficient multithreading: every CPU thread can send commands to the GPU.

Some of these points reduce the amount of work the CPU is required to do to successfully execute commands on the GPU. This can lead to overall performance gain because the CPU can then be used to compute other tasks.

Adoption

According to Apple, more than 148,000 applications use Metal directly, and 1.7 million use it through high-level frameworks, as of June 2017.[7]

Presumably, most of these are applications and games on iOS. Notable macOS games using Metal for rendering are listed below.

TitleDeveloper (macOS version)Game engineRelease date (macOS)Notes
Dota 2Valve CorporationSource 218/07/2013}}26/02/2018}}.[8] The option to use this became available on {{Dts|31/05/2018}}.[9]
Quake 2id SoftwareQuake II engine09/02/2019}}The original game using MoltenVK to support Vulkan via Metal was released to the public as vkQuake2.[10]
Rise of the Tomb RaiderFeral InteractiveFoundation engine12/04/2018}}Metal support shipping at launch
Shadow of the Tomb RaiderFeral InteractiveFoundation Engine2019Metal support shipping at launch
F1 2016Feral InteractiveEGO Engine 4.006/04/2017}}Metal support shipping at launch
Life is Strange 2Feral InteractiveUnreal Engine 42019Metal support shipping at launch
Life is Strange: Before the StormFeral InteractiveUnity Engine13 September 2018Metal support shipping at launch
Divinity: Original Sin 2Larian StudiosDivinity Engine 231/01/2019}}Metal support shipping at launch
Company of Heroes 2Feral InteractiveEssence Engine 321/01/2015}}19/10/2018}}
Sid Meier's Railroads!Feral InteractiveGamebryo01/11/2012}}18/12/2018}}
Dawn of War IIIFeral InteractiveEssence Engine 49/6/2017}}Metal support shipping at launch
WarhammerFeral InteractiveTotal War Engine 319/4/2017}}Metal support shipping at launch
Total War: Warhammer 2Feral InteractiveTotal War Engine 320/11/2018}}Metal support shipping at launch
Total War Saga: Thrones of BritanniaFeral InteractiveTotal War Engine 324/05/2018}}Metal support shipping at launch
Medieval II: Total WarFeral InteractiveTotal War Engine 217/12/2015}}Metal support since 25 October 2018
HitmanFeral InteractiveGlacier Engine20/6/2017}}Metal support shipping at launch
Bioshock RemasteredFeral InteractiveUnreal Engine 2.522/8/2017}}Metal support shipping at launch
F1 2017Feral InteractiveEGO Engine 4.025/8/2017}}Metal support shipping at launch
Mankind DividedFeral InteractiveDawn Engine12/12/2017}}Metal support shipping at launch
DiRT RallyFeral InteractiveEGO Engine 2.516/11/2017}}Metal support shipping at launch
Ballistic OverkillAquiris Game StudioUnity Engine 528/3/2017}}Metal support shipping at launch
BattleTechHarebrained SchemesUnity Engine 524/4/2018}}Metal support shipping at launch
Mafia IIIAspyr MediaIllusion Engine11/5/2017}}Metal support shipping at launch
World of WarcraftBlizzard EntertainmentWoW Engine23/11/2004}}Metal support since August 2016
StarCraft IIBlizzard EntertainmentSC2 Engine27/7/2010}}24/1/2017}}
Heroes of the StormBlizzard EntertainmentSC2 Engine2/6/2015}}24/1/2017}},

temporarily removed on {{DTS|29/11/2017}}

FortniteEpic GamesUnreal Engine 425/7/2017}}Metal support shipping at launch
ObductionCyan WorldsUnreal Engine 429/3/2017}}Metal support shipping at launch
EverspaceRockfishUnreal Engine 426/5/2017}}Metal support shipping at launch
Survival EvolvedStudio WildcardUnreal Engine 429/8/2017}}Metal support shipping at launch
ObserverBloober TeamUnreal Engine 424/10/2017}}Metal support shipping at launch
Unreal TournamentEpic GamesUnreal Engine 4{{TBA}}Metal support since January 2017
RefunctDominique GrieshoferUnreal Engine 45/9/2016}}Metal support shipping at launch
SkylinesParadox InteractiveUnity Engine 510/3/2015}}18/05/2017}}
Universe Sandbox 2Giant ArmyUnity Engine 5{{TBA}}Metal support in beta since June 2017
War ThunderGaijin EntertainmentDagor Engine 41/11/2012}}24/5/2017}}, removed at some point in 2018
The WitnessThekla, Inc Thekla Engine8/3/2017}}Metal support shipping at launch
Micro Machines World SeriesVirtual ProgrammingUnity Engine 530/6/2017}}Metal support shipping at launch
The Telltale SeriesTelltale GamesTelltale Tool18/4/2017}}Metal support shipping at launch
The Enemy WithinTelltale GamesTelltale Tool08/08/2017}}Metal support shipping at launch
Story Mode - Season TwoTelltale GamesTelltale Tool11/7/2017}}Metal support shipping at launch
ARMA 3Virtual ProgrammingReal Virtuality{{TBA}}17/9/2017}}
MXGP3Virtual ProgrammingUnreal Engine 423/11/2018}}Metal support shipping at launch
GravelVirtual ProgrammingUnreal Engine 420/1/2019}}Metal support shipping at launch
X-Plane 11Laminar ResearchCustom engine30/5/2017}}Metal support upcoming
HeadlanderDouble Fine ProductionsBuddha Engine18/11/2016}}Metal support shipping at launch

See also

  • Direct3D – DirectX 12 introduces low-level APIs
  • Mantle – low-level API by AMD
  • Vulkan – low-overhead successor to OpenGL
  • MoltenVK - software compatibility library to run Vulkan software on top of the Metal API
  • WebGPU

References

1. ^{{cite web|last1=Apple Inc.|title=Metal Shading Language Specification |url=https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf}}
2. ^{{Cite web |url=https://arstechnica.com/apple/2014/06/apple-gets-heavy-with-gaming-announces-metal-development-platform/ |title=Apple gets heavy with gaming, announces Metal development platform |work=Ars Technica |publisher=Condé Nast |date=2 June 2014 |first=Same |last=Machkovech}}
3. ^{{Cite web |url=https://www.apple.com/pr/library/2015/06/08Apple-Announces-OS-X-El-Capitan-with-Refined-Experience-Improved-Performance.html |title=Apple Announces OS X El Capitan with Refined Experience & Improved Performance |work=Newsroom |publisher=Apple |date=8 June 2015 |location=San Francisco |first=Colin |last=Smith |first2=Starlayne |last2=Meza}}
4. ^{{cite web |title=Archived copy of the Metal homepage, November 2017 |url=https://developer.apple.com/metal/ |website=Apple Developer |publisher=Apple |via=Wayback Machine |date=20 November 2017 |deadurl=bot: unknown |archiveurl=https://web.archive.org/web/20171120014933/https://developer.apple.com/metal/ |archivedate=November 20, 2017 |df=mdy-all }}
5. ^{{cite web|url=https://developer.apple.com/library/prerelease/ios/documentation/Metal/Reference/MetalShadingLanguageGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40014364|title=Metal Shading Language Guide|date=September 8, 2014|publisher=|accessdate=September 10, 2014}}
6. ^{{Cite news|url=http://blogs.unity3d.com/2014/07/03/metal-a-new-graphics-api-for-ios-8/|title=Metal, a new graphics API for iOS 8 – Unity Blog|work=Unity Technologies Blog|access-date=2017-06-16|language=en-US}}
7. ^{{cite web|last1=Apple Inc.|title=WWDC 2017 Platforms State of the Union|url=https://developer.apple.com/videos/play/wwdc2017/102/}}
8. ^{{Cite news|url=http://news.softpedia.com/news/vulkan-support-is-finally-coming-to-apple-s-macos-and-ios-operating-systems-519958.shtml|title=Vulkan Support Is Finally Coming to Apple's macOS & iOS to Make Games Run Faster|last=Nestor|first=Marius|work=softpedia|access-date=2018-02-28|language=en-us}}
9. ^{{cite web|url=https://www.phoronix.com/scan.php?page=news_item&px=Dota-2-Initial-Mac-Vulkan|title=Initial Vulkan Performance On macOS With Dota 2 Is Looking Very Good|last=Larabel|first=Michael|publisher=Phoronix|date=June 1, 2018|accessdate=June 5, 2018}}
10. ^{{cite tweet |last=Kondrak |first=Krzysztof| user=k_kondrak |number=1094192063292297217 |date=January 9, 2019 |title=vkQuake2 gets MacOS support |access-date=February 9, 2019}}

}}

External links

  • [https://developer.apple.com/metal/ Metal for Developers]
  • [https://developer.apple.com/library/prerelease/ios/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40014221 Metal Programming Guide] (preliminary)
  • [https://www.youtube.com/watch?v=NRoGwuSDh3E WWDC14 demo]; [https://www.youtube.com/watch?v=Br7qVnzxzv8#t=1013 extended version]
{{OS X}}{{iOS}}

4 : Computer-related introductions in 2014|3D graphics APIs|Graphics libraries|IOS

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/13 12:48:43