Metal (API)

Metal(メタル)はAppleのオペレーティングシステム上でサポートされる、オーバーヘッドの小さいローレベル(low level)…

Metal (API)
Metal
開発元 Apple
初版 2014年6月 (12年前) (2014-06)
最新版
4 / 2025年6月 (1年前) (2025-06)
プログラミング
言語
シェーディング言語: C++14, ランタイム/API: Objective-C
対応OS macOS, iOS, iPadOS, visionOS, tvOS
種別 3Dグラフィックス・演算用API
ライセンス プロプライエタリ
公式サイト developer.apple.com/jp/metal/
テンプレートを表示

Metal(メタル)はAppleオペレーティングシステム上でサポートされる、オーバーヘッドの小さいローレベル(low level)なコンピュータグラフィックスAPIである。Metalでは、OpenGLOpenCLに似た機能を一つのAPIに統合している。Metalはクロノス・グループによるVulkanや、マイクロソフトによるWindows向けのDirect3D 12といった、他のプラットフォームにおける類似のAPIによるパフォーマンス上の利点をmacOSiPadOSiOSvisionOSにもたらしている。

MetalはC++11をベースとした新しいシェーディング言語Metal Shading Language(MSL)を利用する。これはClangLLVMによって実装されている[1]。Metalはコンピュートシェーダーを導入することでGPGPUプログラミングのしやすさも向上している[注 1]

macOS Ventura, iOS/iPadOS 16のMetal 3では、MetalFX Upscalingという超解像度技術を実装している[2]

macOS Sonomaでは、Xcode 15向けThe Game Porting Toolkit[3]のMetal shader converter[4]で、Windows向けゲームを移植する際、DirectX 12からMetal 3へ変換できる[5]

対応環境

2023年現在、Metal 3での動作条件は、Apple A13 Bionic以上を搭載したiPhone 11/SE (第2世代)以降とiPad (第9世代)以降、AppleシリコンまたはIntel UHD Graphics 630以降のGPUを搭載したMacが必須となっている[6]。対応OSは、macOS Ventura, iOS 16, iPadOS 16以降である[6]

初期のMetalはApple A7以降を搭載したiOS機器、およびOS X El Capitan以降が動作する一部のMacコンピュータで利用可能であった。OS X El Capitanに対応しているMacであっても、Metalに対応しているとは限らない。

2017年10月時点でのMetal及びMetal2対応Macコンピュータは以下の通り[7]

MetalはWWDC 2014にて発表され、iOS 8で初めて導入された[8]

macOSでのMetalのサポート(Metal for Mac)はWWDC 2015において発表された。

パフォーマンス

Metalの登場以前は、macOSにはOpenGLが、そしてiOSにはOpenGL ESがそれぞれ提供されていたが、いずれも高度にハードウェアが抽象化されていることから性能上のオーバーヘッドが大きい。Metalは以下のような理由から、OpenGLよりも優れたパフォーマンスを期待できる[9]

  • シェーダーの事前コンパイルおよび最適化や、前もって実行されるステートの結合と評価(Validation)
  • GPUCPUの明確な同期
  • GPUとCPUで共有されるメモリ空間
  • より小さくなったドライバのオーバーヘッド

これらのうちいくつかは、GPUでコマンドを実行するために必要になるCPUのタスクを低減する。そのため、他の仕事のためにCPUを使えるようになり、全般的なパフォーマンスの向上につながる。

脚注

注釈

  1. ^ OpenGL 4.3/OpenGL ES 3.1以降でもコンピュートシェーダーはサポートされるが、Metal登場時にmacOS/iOSはこれらのAPIをサポートしていなかった。

出典

  1. ^ Metal Shading Language Guide”. アップル (2014年9月17日). 2015年10月28日閲覧。
  2. ^ Inc, Aetas. “西川善司の3DGE:Appleのゲーム向けAPI「Metal 3」は,DirectX 12 Ultimateに一層近づいた”. 4Gamer.net. 2023年6月21日閲覧。
  3. ^ Technologies for Game Developers” (英語). Apple Developer. 2023年6月21日閲覧。
  4. ^ Metal shader converter - Metal” (英語). Apple Developer. 2023年6月21日閲覧。
  5. ^ Apple、WindowsゲームをMacに移植する「Game Porting Tool」リリース”. ITmedia NEWS. 2023年6月21日閲覧。
  6. ^ a b Discover Metal 3 - WWDC22 - Videos” (英語). Apple Developer. 2023年6月21日閲覧。
  7. ^ Metal に対応している Mac コンピュータの一覧”. アップル (2017年10月10日). 2017年11月14日閲覧。
  8. ^ 【西田宗千佳のRandomTracking】WWDC 2014 開発環境編:「機器の外の魅力」で戦う準備を進めるアップル - AV Watch
  9. ^ Unity - Unity Japan Official Blog – Metal, iOS 8 の新グラフィクス API”. Unity Technologies Japan G.K. (2014年7月4日). 2015年10月28日閲覧。

関連項目

  • Direct3D 12 - DirectX 12において導入されたローレベルAPI
  • Glide - 3dfxによるローレベルAPI
  • Mantle (API) - AMDによるローレベルAPI
  • Vulkan (API) - OpenGLの後継となるクロスプラットフォームなローレベルAPI, MoltenVKによりMetal上で動作するものが開発出来る

外部リンク

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.