WebGPU Headers
The WebGPU C API
 
Loading...
Searching...
No Matches
WGPURequestAdapterOptions Struct Reference

Data Fields

WGPUChainedStruct const * nextInChain
 
WGPUFeatureLevel featureLevel
 
WGPUPowerPreference powerPreference
 
WGPUBool forceFallbackAdapter
 
WGPUBackendType backendType
 
WGPUSurface compatibleSurface
 

Detailed Description

Default values can be set using WGPU_REQUEST_ADAPTER_OPTIONS_INIT as initializer.

Definition at line 2520 of file webgpu.h.

Field Documentation

◆ nextInChain

WGPUChainedStruct const* WGPURequestAdapterOptions::nextInChain

Definition at line 2521 of file webgpu.h.

◆ featureLevel

WGPUFeatureLevel WGPURequestAdapterOptions::featureLevel

"Feature level" for the adapter request. If an adapter is returned, it must support the features and limits in the requested feature level.

Implementations may ignore WGPUFeatureLevel_Compatibility and provide WGPUFeatureLevel_Core instead. WGPUFeatureLevel_Core is the default in the JS API, but in C, this field is required (must not be undefined).

Defaults to (WGPUFeatureLevel)0.

Definition at line 2529 of file webgpu.h.

◆ powerPreference

WGPUPowerPreference WGPURequestAdapterOptions::powerPreference

Defaults to WGPUPowerPreference_Undefined.

Definition at line 2533 of file webgpu.h.

◆ forceFallbackAdapter

WGPUBool WGPURequestAdapterOptions::forceFallbackAdapter

If true, requires the adapter to be a "fallback" adapter as defined by the JS spec. If this is not possible, the request returns null.

Defaults to 0.

Definition at line 2540 of file webgpu.h.

◆ backendType

WGPUBackendType WGPURequestAdapterOptions::backendType

If set, requires the adapter to have a particular backend type. If this is not possible, the request returns null.

Defaults to WGPUBackendType_Undefined.

Definition at line 2547 of file webgpu.h.

◆ compatibleSurface

WGPUSurface WGPURequestAdapterOptions::compatibleSurface

If set, requires the adapter to be able to output to a particular surface. If this is not possible, the request returns null.

Defaults to NULL.

Definition at line 2554 of file webgpu.h.