GPUAdapter

Limited availability

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

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

WebGPU APIGPUAdapter インターフェイスは、GPU アダプターを表します。これを用いて GPUDevice、アダプターの情報、機能、制限を要求できます。

GPUAdapter オブジェクトは GPU.requestAdapter() メソッドを用いて要求できます。

インスタンスプロパティ

features Experimental 読取専用

アダプターが対応している追加の機能を表現する GPUSupportedFeatures オブジェクトです。

isFallbackAdapter Experimental 読取専用

論理値です。アダプターがフォールバックアダプターである場合は true を返し、そうでない場合は false を返します。

limits Experimental 読取専用

アダプターが対応している制限を表現する GPUSupportedLimits オブジェクトです。

インスタンスメソッド

requestAdapterInfo() Experimental

アダプターに関する特定用の情報が格納された GPUAdapterInfo オブジェクトで解決する Promise を返します。

requestDevice() Experimental

GPU とのやりとり用の第一インターフェイスである GPUDevice オブジェクトで解決する Promise を返します。

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

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

  const device = await adapter.requestDevice();

  //...
}

仕様書

Specification
WebGPU
# gpu-adapter

ブラウザーの互換性

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
GPUAdapter
Experimental
features
Experimental
info
Experimental
isFallbackAdapter
Experimental
limits
Experimental
requestAdapterInfo
DeprecatedNon-standard
requestDevice
Experimental
Lost GPUDevice returned on duplicate calls.
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.
Non-standard. Check cross-browser support before using.
Deprecated. Not for use in new websites.
See implementation notes.
User must explicitly enable this feature.
Has more compatibility info.

関連情報