Fix WebGPU adapter discovery on Windows to only find ANGLE-compatible
Keeps discovery in compat-mode the same. Bug: 1417523 Change-Id: I2c8df46ed1ab8b4f7a6bcadc1dc520b84a56789d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4273366 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org> Cr-Commit-Position: refs/heads/main@{#1107821}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
bc324e05cd
commit
f0e3044fd4
@ -1532,8 +1532,17 @@ void WebGPUDecoderImpl::DiscoverAdapters() {
|
||||
swiftShaderOptions.forceSwiftShader = true;
|
||||
dawn_instance_->DiscoverAdapters(&swiftShaderOptions);
|
||||
#endif // BUILDFLAG(ENABLE_VULKAN)
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
if (use_webgpu_adapter_ == WebGPUAdapterName::kCompat) {
|
||||
// On compat, discover default adapters to also discover the compat adapter.
|
||||
// TODO(senorblanco): This may incorrectly discover a compat adapter that
|
||||
// does not match the one ANGLE is using.
|
||||
dawn_instance_->DiscoverDefaultAdapters();
|
||||
}
|
||||
#else // BUILDFLAG(IS_WIN)
|
||||
// Only discover default adapters on non-Windows. Windows requires
|
||||
// compatibility with ANGLE. Other adapters will not be compatible.
|
||||
dawn_instance_->DiscoverDefaultAdapters();
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
std::vector<dawn::native::Adapter> adapters = dawn_instance_->GetAdapters();
|
||||
for (dawn::native::Adapter& adapter : adapters) {
|
||||
|
Reference in New Issue
Block a user