requestAdapter method

JSPromise<GPUAdapter?> requestAdapter([
  1. GPURequestAdapterOptions options
])

The requestAdapter() method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits.

Note that the user agent chooses whether to return an adapter. If so, it chooses according to the provided options. If no options are provided, the device will provide access to the default adapter, which is usually good enough for most purposes.

Implementation

external JSPromise<GPUAdapter?> requestAdapter(
    [GPURequestAdapterOptions options]);