Descriptorize SwapChain.

This also makes SwapChain support WebGPU-style error handling.

BUG=dawn:8

Change-Id: I5a142ae58600445f0f44f6dbe419cb7c3cdc9464
Reviewed-on: https://dawn-review.googlesource.com/c/4660
Reviewed-by: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2019-02-15 11:15:58 +00:00
committed by Commit Bot service account
parent c8b067d2df
commit 7be2a71f2b
27 changed files with 212 additions and 111 deletions

View File

@@ -150,9 +150,9 @@ dawn::TextureFormat GetPreferredSwapChainTextureFormat() {
}
dawn::SwapChain GetSwapChain(const dawn::Device &device) {
return device.CreateSwapChainBuilder()
.SetImplementation(GetSwapChainImplementation())
.GetResult();
dawn::SwapChainDescriptor swapChainDesc;
swapChainDesc.implementation = GetSwapChainImplementation();
return device.CreateSwapChain(&swapChainDesc);
}
dawn::TextureView CreateDefaultDepthStencilView(const dawn::Device& device) {