Function wgpu::util::initialize_adapter_from_env_or_default[][src]

pub async fn initialize_adapter_from_env_or_default(
    instance: &Instance,
    backend_bits: Backends,
    compatible_surface: Option<&Surface>
) -> Option<Adapter>
Expand description

Initialize the adapter obeying the WGPU_ADAPTER_NAME environment variable and if it doesn’t exist fall back on a default adapter.