GPUAdapterInfo

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。

WebGPU APIGPUAdapterInfo インターフェイスには、GPUAdapter に関する特定用の情報が格納されています。

GPUAdapterInfo オブジェクトのインスタンスは、GPUAdapter.requestAdapterInfo() メソッドを用いて要求できます。

インスタンスプロパティ

architecture Experimental 読取専用

アダプターが属している GPU のファミリーまたはクラスの名前です。取得できない場合は空文字列を返します。

description Experimental 読取専用

アダプターを表現する人間に読める文字列です。取得できない場合は空文字列を返します。

device Experimental 読取専用

アダプターのベンダー固有の識別子です。取得できない場合は空文字列を返します。

vendor Experimental 読取専用

アダプターのベンダーの名前です。取得できない場合は空文字列を返します。

js
async function init() {
  if (!navigator.gpu) {
    throw Error("WebGPU に対応していません。");
  }

  const adapter = await navigator.gpu.requestAdapter();
  if (!adapter) {
    throw Error("WebGPU アダプターを要求できませんでした。");
  }

  const adapterInfo = await adapter.requestAdapterInfo();
  console.log(adapterInfo.architecture);
  console.log(adapterInfo.vendor);

  // ...
}

仕様書

Specification
WebGPU
# gpu-adapterinfo

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
GPUAdapterInfo
Experimental
architecture
Experimental
description
Experimental
device
Experimental
subgroupMaxSize
Experimental
subgroupMinSize
Experimental
vendor
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
In development. Supported in a pre-release version.
In development. Supported in a pre-release version.
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.
User must explicitly enable this feature.
Has more compatibility info.

関連情報