GPUAdapter
WebGPU API
WebGPU API
The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits.
A `GPUAdapter` object is requested using the GPU.requestAdapter() method.
## Instance properties
- features
- : A GPUSupportedFeatures object that describes additional functionality supported by the adapter.
- info
- : A GPUAdapterInfo object containing identifying information about the adapter.
- limits
- : A GPUSupportedLimits object that describes the limits supported by the adapter.
### Deprecated properties
- isFallbackAdapter
- : A boolean value. Returns `true` if the adapter is a [fallback adapter](/docs/Web/API/GPU/requestAdapter#fallback_adapters), and `false` if not. This property has been removed from the web platform. Use GPUAdapterInfo.isFallbackAdapter instead.
## Instance methods
- requestAdapterInfo()
- : Returns a Promise that fulfills with a GPUAdapterInfo object containing identifying information about the adapter.
- requestDevice()
- : Returns a Promise that fulfills with a GPUDevice object, which is the primary interface for communicating with the GPU.
## Examples
```js
async function init() {
if (!navigator.gpu) {
throw Error("WebGPU not supported.");
}
const adapter = await navigator.gpu.requestAdapter();
if (!adapter) {
throw Error("Couldn't request WebGPU adapter.");
}
const device = await adapter.requestDevice();
// …
}
```
## Specifications
## Browser compatibility
## See also
- The [WebGPU API](/docs/Web/API/WebGPU_API)
Cite this
"GPUAdapter". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy