Use VK_PRESENT_MODE_FIFO_KHR for Vulkan Swap Chain

Change Vulkan Swap Chain from VK_PRESENT_MODE_IMMEDIATE_KHR to
VK_PRESENT_MODE_FIFO_KHR. Some common GPUs don't support immediate mode,
so we should default to a value that is required to be supported.

Bug: dawn:90
Change-Id: I66dec23141e69637ccfa8a2ed0ee651114b9ddcf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6820
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Brandon Jones 2019-04-30 08:31:08 +00:00 committed by Commit Bot service account
parent bbed457796
commit 4baba8266b
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ namespace dawn_native { namespace vulkan {
// TODO(cwallez@chromium.org): This is upside down compared to what we want, at least // TODO(cwallez@chromium.org): This is upside down compared to what we want, at least
// on Linux // on Linux
config->preTransform = info.capabilities.currentTransform; config->preTransform = info.capabilities.currentTransform;
config->presentMode = VK_PRESENT_MODE_IMMEDIATE_KHR; config->presentMode = VK_PRESENT_MODE_FIFO_KHR;
config->compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; config->compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
return true; return true;
} }