Interface GPURequestAdapterOptions


  • GPURequestAdapterOptions


forceFallbackAdapter?: boolean

When set to true indicates that only a fallback adapter may be returned. If the user agent does not support a fallback adapter, will cause requestAdapter to resolve to null. Note: requestAdapter may still return a fallback adapter if forceFallbackAdapter is set to false and either no other appropriate adapter is available or the user agent chooses to return a fallback adapter. Developers that wish to prevent their applications from running on fallback adapters should check the GPUAdapter.isFallbackAdapter attribute prior to requesting a GPUDevice.

powerPreference?: GPUPowerPreference

Optionally provides a hint indicating what class of adapter should be selected from the system's available adapters. The value of this hint may influence which adapter is chosen, but it must not influence whether an adapter is returned or not. Note: The primary utility of this hint is to influence which GPU is used in a multi-GPU system. For instance, some laptops have a low-power integrated GPU and a high-performance discrete GPU. This hint may also affect the power configuration of the selected GPU to match the requested power preference. Note: Depending on the exact hardware configuration, such as battery status and attached displays or removable GPUs, the user agent may select different adapters given the same power preference. Typically, given the same hardware configuration and state and powerPreference, the user agent is likely to select the same adapter.

Generated using TypeDoc