WebGPU Headers
The WebGPU C API
 
All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
Loading...
Searching...
No Matches
WGPURequestAdapterOptions Struct Reference

Data Fields

WGPUChainedStructnextInChain
 
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 2609 of file webgpu.h.

Field Documentation

◆ nextInChain

WGPUChainedStruct* WGPURequestAdapterOptions::nextInChain

Definition at line 2610 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.

If set to WGPUFeatureLevel_Undefined, defaults to WGPUFeatureLevel_Core. Additionally, implementations may ignore WGPUFeatureLevel_Compatibility and provide WGPUFeatureLevel_Core instead.

The INIT macro sets this to WGPUFeatureLevel_Undefined.

Definition at line 2621 of file webgpu.h.

◆ powerPreference

WGPUPowerPreference WGPURequestAdapterOptions::powerPreference

The INIT macro sets this to WGPUPowerPreference_Undefined.

Definition at line 2625 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.

The INIT macro sets this to 0.

Definition at line 2632 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.

The INIT macro sets this to WGPUBackendType_Undefined.

Definition at line 2639 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.

The INIT macro sets this to NULL.

Definition at line 2646 of file webgpu.h.