mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 15:16:16 +00:00
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:
committed by
Commit Bot service account
parent
c8b067d2df
commit
7be2a71f2b
@@ -29,11 +29,10 @@ void init() {
|
||||
queue = dawnDeviceCreateQueue(device);
|
||||
|
||||
{
|
||||
dawnSwapChainBuilder builder = dawnDeviceCreateSwapChainBuilder(device);
|
||||
uint64_t swapchainImpl = GetSwapChainImplementation();
|
||||
dawnSwapChainBuilderSetImplementation(builder, swapchainImpl);
|
||||
swapchain = dawnSwapChainBuilderGetResult(builder);
|
||||
dawnSwapChainBuilderRelease(builder);
|
||||
dawnSwapChainDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.implementation = GetSwapChainImplementation();
|
||||
swapchain = dawnDeviceCreateSwapChain(device, &descriptor);
|
||||
}
|
||||
swapChainFormat = static_cast<dawnTextureFormat>(GetPreferredSwapChainTextureFormat());
|
||||
dawnSwapChainConfigure(swapchain, swapChainFormat, DAWN_TEXTURE_USAGE_BIT_OUTPUT_ATTACHMENT, 640,
|
||||
|
||||
Reference in New Issue
Block a user