Surface: Fix errors messages printing format instead of present/alphaMode
Fixed: 348590029
Change-Id: Icbf67399a49f49fde5f735584f346a261418158b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/194841
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
diff --git a/src/dawn/native/Surface.cpp b/src/dawn/native/Surface.cpp
index 811fec7..c0b322b 100644
--- a/src/dawn/native/Surface.cpp
+++ b/src/dawn/native/Surface.cpp
@@ -218,13 +218,13 @@
capabilities.presentModes.end(), config->presentMode);
DAWN_INVALID_IF(presentModeIt == capabilities.presentModes.end(),
"Present mode (%s) is not supported by the adapter (%s) for this surface.",
- config->format, config->device->GetAdapter());
+ config->presentMode, config->device->GetAdapter());
auto alphaModeIt = std::find(capabilities.alphaModes.begin(), capabilities.alphaModes.end(),
config->alphaMode);
DAWN_INVALID_IF(alphaModeIt == capabilities.alphaModes.end(),
"Alpha mode (%s) is not supported by the adapter (%s) for this surface.",
- config->format, config->device->GetAdapter());
+ config->alphaMode, config->device->GetAdapter());
// Validate the surface would produce valid textures.
TextureDescriptor textureDesc;