GPUAdapter

class wgpu.GPUAdapter

Bases: object

Represents an abstract wgpu implementation.

An adapter represents both an instance of a hardware accelerator (e.g. GPU or CPU) and an implementation of WGPU on top of that accelerator.

The adapter is used to request a device object. The adapter object enumerates its capabilities (features) and limits.

If an adapter becomes unavailable, it becomes invalid. Once invalid, it never becomes valid again.

property features

A set of feature names supported by the adapter.

property is_fallback_adapter

Whether this adapter runs on software (rather than dedicated hardware).

property limits

A dict with limits for the adapter.

request_adapter_info()

Get a dict with information about this adapter, such as the vendor and devicen name.

async request_adapter_info_async()

Async get information about this adapter.

request_device(**parameters)

Request a GPUDevice from the adapter.

Parameters:
  • label (str) – A human readable label. Optional.

  • required_features (list of str) – the features (extensions) that you need. Default [].

  • required_limits (dict) – the various limits that you need. Default {}.

  • default_queue (structs.QueueDescriptor) – Descriptor for the default queue. Optional.

async request_device_async(**parameters)

Async version of request_device().

property summary

A one-line summary of the info of this adapter (name, adapter_type, backend_type).