зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1917512 - Do not request hardware adapter when RequestAdapterOptions::force_fallback_adapter = true r=webgpu-reviewers,teoxoy
On Windows, gecko request hardware adapter even when RequestAdapterOptions::force_fallback_adapter = true. The change avoids to do it. Differential Revision: https://phabricator.services.mozilla.com/D221696
This commit is contained in:
Родитель
ca093a8a78
Коммит
f7e9dffee2
|
@ -184,7 +184,7 @@ pub unsafe extern "C" fn wgpu_server_instance_request_adapter(
|
|||
// If wgpu uses a different adapter than WebRender, textures created by
|
||||
// webgpu::ExternalTexture do not work with wgpu.
|
||||
#[cfg(target_os = "windows")]
|
||||
if adapter_luid.is_some() {
|
||||
if adapter_luid.is_some() && !desc.force_fallback_adapter {
|
||||
if let Some(instance) = global.global.instance_as_hal::<wgc::api::Dx12>() {
|
||||
for adapter in instance.enumerate_adapters(None) {
|
||||
let raw_adapter = adapter.adapter.raw_adapter();
|
||||
|
|
Загрузка…
Ссылка в новой задаче