Correctly print backend type in DiscoverAdapters logs.

Bug: chromium:1348664
Change-Id: Id2eaf25a9f46b1f6614d80642dc7f8e8aef09b9e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/100520
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Corentin Wallez 2022-08-29 16:38:39 +00:00 committed by Dawn LUCI CQ
parent 29d0a523f2
commit bc93cbc2a2
1 changed files with 6 additions and 6 deletions
src/dawn/native

View File

@ -194,9 +194,9 @@ ResultOrError<Ref<AdapterBase>> InstanceBase::RequestAdapterInternal(
MaybeError result = DiscoverAdaptersInternal(&vulkanOptions);
if (result.IsError()) {
dawn::WarningLog()
<< "Skipping Vulkan Swiftshader adapter because initialization failed: "
<< result.AcquireError()->GetFormattedMessage();
dawn::WarningLog() << absl::StrFormat(
"Skipping Vulkan Swiftshader adapter because initialization failed: %s",
result.AcquireError()->GetFormattedMessage());
return Ref<AdapterBase>(nullptr);
}
}
@ -297,9 +297,9 @@ bool InstanceBase::DiscoverAdapters(const AdapterDiscoveryOptionsBase* options)
MaybeError result = DiscoverAdaptersInternal(options);
if (result.IsError()) {
dawn::WarningLog() << "Skipping " << options->backendType
<< " adapter because initialization failed: "
<< result.AcquireError()->GetFormattedMessage();
dawn::WarningLog() << absl::StrFormat(
"Skipping %s adapter because initialization failed: %s", FromAPI(options->backendType),
result.AcquireError()->GetFormattedMessage());
return false;
}