Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. GPUAdapterInfo

GPUAdapterInfo

Limited availability

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

Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.

Note: This feature is available inWeb Workers.

TheGPUAdapterInfo interface of theWebGPU API contains identifying information about aGPUAdapter.

An adapter'sGPUAdapterInfo can be retrieved using theGPUAdapter.info property of the adapter itself, or theGPUDevice.adapterInfo property of a device that originated from the adapter.

This object allows developers to access specific details about the user's GPU so that they can preemptively apply workarounds for GPU-specific bugs, or provide different codepaths to better suit different GPU architectures. Providing such information does present a security risk — it could be used for fingerprinting — therefore the information shared is kept at a minimum, and different browser vendors are likely to share different information types and granularities.

Instance properties

architectureRead only

The name of the family or class of GPUs the adapter belongs to. Returns an empty string if it is not available.

descriptionRead only

A human-readable string describing the adapter. Returns an empty string if it is not available.

deviceRead only

A vendor-specific identifier for the adapter. Returns an empty string if it is not available.

isFallbackAdapterRead only

A boolean value. Returnstrue if the adapter is afallback adapter, andfalse if not.

subgroupMaxSizeRead only

The maximum supportedsubgroup size for theGPUAdapter.

subgroupMinSizeRead only

The minimum supportedsubgroup size for theGPUAdapter.

vendorRead only

The name of the adapter vendor. Returns an empty string if it is not available.

Examples

Access GPUAdapterInfo via GPUAdapter.info

js
const adapter = await navigator.gpu.requestAdapter();if (!adapter) {  throw Error("Couldn't request WebGPU adapter.");}const adapterInfo = adapter.info;console.log(adapterInfo.vendor);console.log(adapterInfo.architecture);

Access GPUAdapterInfo via GPUDevice.adapterInfo

js
const adapter = await navigator.gpu.requestAdapter();if (!adapter) {  throw Error("Couldn't request WebGPU adapter.");}const myDevice = await adapter.requestDevice();function optimizeForGpuDevice(device) {  if (device.adapterInfo.vendor === "amd") {    // Use AMD-specific optimizations  } else if (device.adapterInfo.architecture.includes("turing")) {    // Optimize for NVIDIA Turing architecture  }}optimizeForGpuDevice(myDevice);

Specifications

Specification
WebGPU
# gpuadapterinfo

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp