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

Field Documentation

◆ nextInChain

WGPUChainedStruct const* WGPURequestAdapterOptions::nextInChain

Definition at line 2523 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 2534 of file webgpu.h.

◆ powerPreference

WGPUPowerPreference WGPURequestAdapterOptions::powerPreference

The INIT macro sets this to WGPUPowerPreference_Undefined.

Definition at line 2538 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 2545 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 2552 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 2559 of file webgpu.h.