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

Field Documentation

◆ nextInChain

WGPUChainedStruct* WGPURequestAdapterOptions::nextInChain

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

◆ powerPreference

WGPUPowerPreference WGPURequestAdapterOptions::powerPreference

The INIT macro sets this to WGPUPowerPreference_Undefined.

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

Definition at line 4081 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 4088 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 4095 of file webgpu.h.