Make Vulkan's surface config available before the swap chain is actually created/

Change-Id: I9da1c9f513d26aa95b40f97908bfc3a54c843053
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15541
Commit-Queue: Mark Henderson <mehe@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Mark Henderson 2020-01-29 23:11:17 +00:00 committed by Commit Bot service account
parent 7b6246a2ad
commit 7d56022a64
1 changed files with 3 additions and 0 deletions

View File

@ -66,6 +66,9 @@ namespace dawn_native { namespace vulkan {
NativeSwapChainImpl::NativeSwapChainImpl(Device* device, VkSurfaceKHR surface)
: mSurface(surface), mDevice(device) {
// Call this immediately, so that BackendBinding::GetPreferredSwapChainTextureFormat
// will return a correct result before a SwapChain is created.
UpdateSurfaceConfig();
}
NativeSwapChainImpl::~NativeSwapChainImpl() {