gfx-rs / wgpu-native

Native WebGPU implementation based on wgpu-core
Apache License 2.0
865 stars 103 forks source link

Add workaround for gfx-rs/wgpu#5289 #372

Closed rajveermalviya closed 7 months ago

rajveermalviya commented 7 months ago

Updates #337

Add a temporary workaround for unsupported request_adapter call with a specific backend type. Instead encourage the use of InstanceExtras extension for InstanceDescriptor for that usecase.

Upstream issue:

Example usage:

WGPUInstanceExtras instanceExtras = { 0 };
instanceExtras.chain.sType = (WGPUSType)WGPUSType_InstanceExtras;
instanceExtras.backends = WGPUInstanceBackend_DX12;

WGPUInstanceDescriptor instanceDescriptor = { 0 };
instanceDescriptor.nextInChain = &instanceExtras.chain;

WGPUInstance instance = wgpuCreateInstance(&instanceDescriptor);